mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Merged revision(s) 7088 from branches/ja2_source_official_2014:
Radio operator improvements: - if RADIO_OPERATOR_JAMMING_BLOCKSRADIOBOMBS is TRUE, radio operator jamming will prevent remote activation or defusing of bombs. Quest-related remotes are still active. - if RADIO_OPERATOR_ENEMY_JAMMINGSETSOFFRADIOBOMBS is TRUE, there is a small chance that jamming enemy radio operators will set of remote bombs/defuses - removing a radio set from inventory ends scanning/jamming git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7089 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -17129,6 +17129,10 @@ void SOLDIERTYPE::SoldierPropertyUpkeep()
|
||||
if ( this->stats.bLife < OKLIFE )
|
||||
this->SwitchOffRadio();
|
||||
|
||||
// if we are an enemy radio operator, and we are jamming frequencies, there is a slight chance that we set off remote-controlled bombs/defuses!
|
||||
if ( !gSkillTraitValues.fVOJammingBlocksRemoteBombs && gSkillTraitValues.fVOEnemyVOSetsOffRemoteBombs && this->bTeam == ENEMY_TEAM && IsJamming() && Chance(5) )
|
||||
SetOffBombsByFrequency( this->ubID, 1 + Random(8) );
|
||||
|
||||
// effects eventually run out
|
||||
for (UINT8 counter = 0; counter < SOLDIER_COUNTER_MAX; ++counter)
|
||||
{
|
||||
@@ -17988,7 +17992,16 @@ BOOLEAN SOLDIERTYPE::OrderArtilleryStrike( UINT32 usSectorNr, INT32 sTargetGridN
|
||||
|
||||
BOOLEAN SOLDIERTYPE::IsJamming()
|
||||
{
|
||||
return ( (bSoldierFlagMask & SOLDIER_RADIO_OPERATOR_JAMMING) && CanUseRadio(FALSE) );
|
||||
if ( bSoldierFlagMask & SOLDIER_RADIO_OPERATOR_JAMMING )
|
||||
{
|
||||
if ( CanUseRadio(FALSE) )
|
||||
return TRUE;
|
||||
// if we cannot use the radio, remove that flag hile we're at it
|
||||
else
|
||||
bSoldierFlagMask &= ~SOLDIER_RADIO_OPERATOR_JAMMING;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN SOLDIERTYPE::JamCommunications()
|
||||
@@ -18018,7 +18031,16 @@ BOOLEAN SOLDIERTYPE::JamCommunications()
|
||||
|
||||
BOOLEAN SOLDIERTYPE::IsScanning()
|
||||
{
|
||||
return ( (bSoldierFlagMask & SOLDIER_RADIO_OPERATOR_SCANNING) && CanUseRadio(FALSE) );
|
||||
if ( bSoldierFlagMask & SOLDIER_RADIO_OPERATOR_SCANNING )
|
||||
{
|
||||
if ( CanUseRadio(FALSE) )
|
||||
return TRUE;
|
||||
// if we cannot use the radio, remove that flag hile we're at it
|
||||
else
|
||||
bSoldierFlagMask &= ~SOLDIER_RADIO_OPERATOR_SCANNING;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOLEAN SOLDIERTYPE::ScanForJam()
|
||||
|
||||
Reference in New Issue
Block a user