mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fix: enemy tanks spawned by cheats are not added to the sector count
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7980 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -6588,10 +6588,7 @@ void HandleShowingOfEnemyForcesInSector( INT16 sSectorX, INT16 sSectorY, INT8 bS
|
|||||||
// nope - display nothing
|
// nope - display nothing
|
||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
// Flugente: tanks get a special icon, so we need to count them separately
|
|
||||||
UINT16 usNumTanks = NumTanksInSector( sSectorX, sSectorY, ENEMY_TEAM );
|
|
||||||
|
|
||||||
switch ( WhatPlayerKnowsAboutEnemiesInSector( sSectorX, sSectorY ) )
|
switch ( WhatPlayerKnowsAboutEnemiesInSector( sSectorX, sSectorY ) )
|
||||||
{
|
{
|
||||||
// HEADROCK HAM 5: New cases below for showing enemy group heading.
|
// HEADROCK HAM 5: New cases below for showing enemy group heading.
|
||||||
@@ -6612,16 +6609,27 @@ void HandleShowingOfEnemyForcesInSector( INT16 sSectorX, INT16 sSectorY, INT8 bS
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case KNOWS_HOW_MANY:
|
case KNOWS_HOW_MANY:
|
||||||
// display individual icons for each enemy, starting at the received icon position index
|
{
|
||||||
ShowEnemiesInSector( sSectorX, sSectorY, sNumberOfEnemies, usNumTanks, ubIconPosition );
|
// Flugente: tanks get a special icon, so we need to count them separately
|
||||||
|
UINT16 usNumTanks = NumTanksInSector( sSectorX, sSectorY, ENEMY_TEAM );
|
||||||
|
|
||||||
|
// display individual icons for each enemy, starting at the received icon position index
|
||||||
|
ShowEnemiesInSector( sSectorX, sSectorY, sNumberOfEnemies, usNumTanks, ubIconPosition );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// HEADROCK HAM 5: New case for showing enemy groups AND where the are headed.
|
// HEADROCK HAM 5: New case for showing enemy groups AND where the are headed.
|
||||||
case KNOWS_HOW_MANY_AND_WHERE_GOING:
|
case KNOWS_HOW_MANY_AND_WHERE_GOING:
|
||||||
// display individual icons for each enemy, starting at the received icon position index
|
{
|
||||||
ShowEnemiesInSector( sSectorX, sSectorY, sNumberOfEnemies, usNumTanks, ubIconPosition );
|
// Flugente: tanks get a special icon, so we need to count them separately
|
||||||
// display their direction of movement, if valid.
|
UINT16 usNumTanks = NumTanksInSector( sSectorX, sSectorY, ENEMY_TEAM );
|
||||||
ShowNonPlayerGroupsInMotion( sSectorX, sSectorY, ENEMY_TEAM );
|
|
||||||
|
// display individual icons for each enemy, starting at the received icon position index
|
||||||
|
ShowEnemiesInSector( sSectorX, sSectorY, sNumberOfEnemies, usNumTanks, ubIconPosition );
|
||||||
|
|
||||||
|
// display their direction of movement, if valid.
|
||||||
|
ShowNonPlayerGroupsInMotion( sSectorX, sSectorY, ENEMY_TEAM );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1174,9 +1174,10 @@ UINT32 UIHandleNewBadMerc( UI_EVENT *pUIEvent )
|
|||||||
SECTORINFO *pSector = &SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ];
|
SECTORINFO *pSector = &SectorInfo[ SECTOR( gWorldSectorX, gWorldSectorY ) ];
|
||||||
switch( pSoldier->ubSoldierClass )
|
switch( pSoldier->ubSoldierClass )
|
||||||
{
|
{
|
||||||
case SOLDIER_CLASS_ADMINISTRATOR: pSector->ubNumAdmins++; pSector->ubAdminsInBattle++; break;
|
case SOLDIER_CLASS_ADMINISTRATOR: pSector->ubNumAdmins++; pSector->ubAdminsInBattle++; break;
|
||||||
case SOLDIER_CLASS_ARMY: pSector->ubNumTroops++; pSector->ubTroopsInBattle++; break;
|
case SOLDIER_CLASS_ARMY: pSector->ubNumTroops++; pSector->ubTroopsInBattle++; break;
|
||||||
case SOLDIER_CLASS_ELITE: pSector->ubNumElites++; pSector->ubElitesInBattle++; break;
|
case SOLDIER_CLASS_ELITE: pSector->ubNumElites++; pSector->ubElitesInBattle++; break;
|
||||||
|
case SOLDIER_CLASS_TANK: pSector->ubNumTanks++; pSector->ubTanksInBattle++; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1189,6 +1190,7 @@ UINT32 UIHandleNewBadMerc( UI_EVENT *pUIEvent )
|
|||||||
case SOLDIER_CLASS_ADMINISTRATOR: pSector->ubNumAdmins++; pSector->ubAdminsInBattle++; break;
|
case SOLDIER_CLASS_ADMINISTRATOR: pSector->ubNumAdmins++; pSector->ubAdminsInBattle++; break;
|
||||||
case SOLDIER_CLASS_ARMY: pSector->ubNumTroops++; pSector->ubTroopsInBattle++; break;
|
case SOLDIER_CLASS_ARMY: pSector->ubNumTroops++; pSector->ubTroopsInBattle++; break;
|
||||||
case SOLDIER_CLASS_ELITE: pSector->ubNumElites++; pSector->ubElitesInBattle++; break;
|
case SOLDIER_CLASS_ELITE: pSector->ubNumElites++; pSector->ubElitesInBattle++; break;
|
||||||
|
case SOLDIER_CLASS_TANK: pSector->ubNumTanks++; pSector->ubTanksInBattle++; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user