mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
fix tactical turncoat activation reducing enemy soldier count twice
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9366 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4487,23 +4487,14 @@ void MakeCivHostile(SOLDIERTYPE *pSoldier)
|
||||
if ( oldclass == SOLDIER_CLASS_ARMY )
|
||||
{
|
||||
pSoldier->ubSoldierClass = SOLDIER_CLASS_REG_MILITIA;
|
||||
|
||||
SectorInfo[sector].ubNumTroops = max( 0, SectorInfo[sector].ubNumTroops - 1 );
|
||||
SectorInfo[sector].ubTroopsInBattle = max( 0, SectorInfo[sector].ubTroopsInBattle - 1 );
|
||||
}
|
||||
else if ( oldclass == SOLDIER_CLASS_ELITE )
|
||||
{
|
||||
pSoldier->ubSoldierClass = SOLDIER_CLASS_ELITE_MILITIA;
|
||||
|
||||
SectorInfo[sector].ubNumElites = max( 0, SectorInfo[sector].ubNumElites - 1 );
|
||||
SectorInfo[sector].ubElitesInBattle = max( 0, SectorInfo[sector].ubElitesInBattle - 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
pSoldier->ubSoldierClass = SOLDIER_CLASS_GREEN_MILITIA;
|
||||
|
||||
SectorInfo[sector].ubNumAdmins = max( 0, SectorInfo[sector].ubNumAdmins - 1 );
|
||||
SectorInfo[sector].ubAdminsInBattle = max( 0, SectorInfo[sector].ubAdminsInBattle - 1 );
|
||||
}
|
||||
|
||||
StrategicAddMilitiaToSector( pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->ubSoldierClass - 4, 1 );
|
||||
|
||||
Reference in New Issue
Block a user