mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +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:
@@ -2500,6 +2500,8 @@ void LoadSkillTraitsExternalSettings()
|
||||
gSkillTraitValues.usVOMortarSignalShellRadius = iniReader.ReadInteger("Radio Operator","RADIO_OPERATOR_MORTAR_SIGNAL_SHELL_RADIUS", 2, 2, 100);
|
||||
gSkillTraitValues.sVOScanAssignmentBaseRange = iniReader.ReadInteger("Radio Operator","RADIO_OPERATOR_ASSIGNMENT_SCAN_BASE_RANGE", 5, 0, 20);
|
||||
gSkillTraitValues.sVOListeningHearingBonus = iniReader.ReadInteger("Radio Operator","RADIO_OPERATOR_LISTENING_HEARING_BONUS", 20, 0, 100);
|
||||
gSkillTraitValues.fVOJammingBlocksRemoteBombs = iniReader.ReadBoolean("Radio Operator","RADIO_OPERATOR_JAMMING_BLOCKSRADIOBOMBS", FALSE);
|
||||
gSkillTraitValues.fVOEnemyVOSetsOffRemoteBombs = iniReader.ReadBoolean("Radio Operator","RADIO_OPERATOR_ENEMY_JAMMINGSETSOFFRADIOBOMBS", TRUE);
|
||||
|
||||
// anv: SNITCH
|
||||
gSkillTraitValues.ubSNTBaseChance = iniReader.ReadInteger("Snitch","BASE_CHANCE", 50, 0, 100);
|
||||
|
||||
@@ -1826,6 +1826,8 @@ typedef struct
|
||||
UINT8 usVOMortarSignalShellRadius;
|
||||
INT8 sVOScanAssignmentBaseRange;
|
||||
INT8 sVOListeningHearingBonus;
|
||||
BOOLEAN fVOJammingBlocksRemoteBombs;
|
||||
BOOLEAN fVOEnemyVOSetsOffRemoteBombs;
|
||||
|
||||
|
||||
// SNITCH
|
||||
|
||||
@@ -5023,7 +5023,9 @@ void BombMessageBoxCallBack( UINT8 ubExitValue )
|
||||
|
||||
if (Item[ gpTempSoldier->inv[HANDPOS].usItem ].remotetrigger )
|
||||
{
|
||||
SetOffBombsByFrequency( gpTempSoldier->ubID, ubExitValue );
|
||||
// Flugente: jamming can prevent bomb activation
|
||||
if ( !gSkillTraitValues.fVOJammingBlocksRemoteBombs || !SectorJammed() )
|
||||
SetOffBombsByFrequency( gpTempSoldier->ubID, ubExitValue );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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