mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fix (by MH17):
- group assignment bug with multiple enemy groups in same sector - sector creature counter wasn't decreased properly when zombies died git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8686 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-2
@@ -55,8 +55,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
CHAR8 czVersionNumber[16] = { "Build 19.07.28" }; //YY.MM.DD
|
||||
CHAR8 czVersionNumber[16] = { "Build 19.08.11" }; //YY.MM.DD
|
||||
CHAR16 zTrackingNumber[16] = { L"Z" };
|
||||
CHAR16 zRevisionNumber[16] = { L"Revision 8684" };
|
||||
CHAR16 zRevisionNumber[16] = { L"Revision 8686" };
|
||||
|
||||
// SAVE_GAME_VERSION is defined in header, change it there
|
||||
|
||||
@@ -945,6 +945,9 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
sNumSlots = min( mapMaximumNumberOfEnemies, NumNonPlayerTeamMembersInSector( gWorldSectorX, gWorldSectorY, ENEMY_TEAM ) );
|
||||
|
||||
pGroup = gpGroupList;
|
||||
unsigned firstSlot = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID;
|
||||
unsigned lastSlot = gTacticalStatus.Team[ ENEMY_TEAM ].bLastID;
|
||||
unsigned slotsAvailable = lastSlot-firstSlot+1;
|
||||
while( pGroup && sNumSlots > 0 )
|
||||
{
|
||||
if ( pGroup->usGroupTeam != OUR_TEAM && !pGroup->fVehicle &&
|
||||
@@ -953,18 +956,13 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
ubNumAdmins = pGroup->pEnemyGroup->ubAdminsInBattle;
|
||||
ubNumTroops = pGroup->pEnemyGroup->ubTroopsInBattle;
|
||||
ubNumElites = pGroup->pEnemyGroup->ubElitesInBattle;
|
||||
ubNumTanks = pGroup->pEnemyGroup->ubTanksInBattle;
|
||||
ubNumTanks = pGroup->pEnemyGroup->ubTanksInBattle;
|
||||
ubNumJeeps = pGroup->pEnemyGroup->ubJeepsInBattle;
|
||||
unsigned num = ubNumAdmins + ubNumTroops + ubNumElites + ubNumTanks + ubNumJeeps;
|
||||
|
||||
unsigned firstSlot = gTacticalStatus.Team[ ENEMY_TEAM ].bFirstID;
|
||||
unsigned lastSlot = gTacticalStatus.Team[ ENEMY_TEAM ].bLastID;
|
||||
unsigned slotsAvailable = lastSlot-firstSlot+1;
|
||||
AssertGE((int)slotsAvailable, sNumSlots);
|
||||
|
||||
for (unsigned slot = firstSlot;
|
||||
(slot <= lastSlot) && num && sNumSlots;
|
||||
++slot)
|
||||
for (unsigned slot = firstSlot; (slot <= lastSlot) && num && sNumSlots; ++slot)
|
||||
{
|
||||
pSoldier = &Menptr[ slot ];
|
||||
|
||||
@@ -974,6 +972,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
// if this guy already has an ID, reduce the number of people who still need one
|
||||
--num;
|
||||
--sNumSlots;
|
||||
firstSlot = slot + 1;
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -990,6 +989,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
sNumSlots--;
|
||||
ubNumAdmins--;
|
||||
pSoldier->ubGroupID = pGroup->ubGroupID;
|
||||
firstSlot = slot + 1;
|
||||
}
|
||||
break;
|
||||
case SOLDIER_CLASS_ARMY:
|
||||
@@ -999,6 +999,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
sNumSlots--;
|
||||
ubNumTroops--;
|
||||
pSoldier->ubGroupID = pGroup->ubGroupID;
|
||||
firstSlot = slot + 1;
|
||||
}
|
||||
break;
|
||||
case SOLDIER_CLASS_ELITE:
|
||||
@@ -1008,6 +1009,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
sNumSlots--;
|
||||
ubNumElites--;
|
||||
pSoldier->ubGroupID = pGroup->ubGroupID;
|
||||
firstSlot = slot + 1;
|
||||
}
|
||||
break;
|
||||
// silversurfer: bugfix for Jaggzilla bug #623
|
||||
@@ -1022,6 +1024,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
sNumSlots--;
|
||||
ubNumElites--;
|
||||
pSoldier->ubGroupID = pGroup->ubGroupID;
|
||||
firstSlot = slot + 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1032,6 +1035,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
sNumSlots--;
|
||||
ubNumTanks--;
|
||||
pSoldier->ubGroupID = pGroup->ubGroupID;
|
||||
firstSlot = slot + 1;
|
||||
}
|
||||
break;
|
||||
case SOLDIER_CLASS_JEEP:
|
||||
@@ -1041,6 +1045,7 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
||||
sNumSlots--;
|
||||
ubNumJeeps--;
|
||||
pSoldier->ubGroupID = pGroup->ubGroupID;
|
||||
firstSlot = slot + 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1461,6 +1466,7 @@ void ProcessQueenCmdImplicationsOfDeath( SOLDIERTYPE *pSoldier )
|
||||
break;
|
||||
case SOLDIER_CLASS_CREATURE:
|
||||
case SOLDIER_CLASS_BANDIT:
|
||||
case SOLDIER_CLASS_ZOMBIE:
|
||||
if( pSoldier->ubBodyType != BLOODCAT )
|
||||
{
|
||||
#ifdef JA2BETAVERSION
|
||||
@@ -1566,6 +1572,7 @@ void ProcessQueenCmdImplicationsOfDeath( SOLDIERTYPE *pSoldier )
|
||||
break;
|
||||
case SOLDIER_CLASS_CREATURE:
|
||||
case SOLDIER_CLASS_BANDIT:
|
||||
case SOLDIER_CLASS_ZOMBIE:
|
||||
if (pSoldier->ubBodyType == BLOODCAT)
|
||||
{
|
||||
if( pSector->ubNumBloodcats > 0 )
|
||||
|
||||
Reference in New Issue
Block a user