mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Bugfix for JaggZilla Bug #623
The crash was caused by Mike or Iggy because they are created from an Elite but don't have ubSoldierClass set to SOLDIER_CLASS_ELITE. Therefore ubNumElites and num remained at 1 when the for loop was done. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6475 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -846,6 +846,21 @@ BOOLEAN PrepareEnemyForSectorBattle()
|
|||||||
pSoldier->ubGroupID = pGroup->ubGroupID;
|
pSoldier->ubGroupID = pGroup->ubGroupID;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
// silversurfer: bugfix for Jaggzilla bug #623
|
||||||
|
// Mike or Iggy can be part of the enemy team and they are created from an Elite but they don't have SOLDIER_CLASS_ELITE.
|
||||||
|
// Therefore once this for loop was done ubNumElites was still 1 which caused an assertion error.
|
||||||
|
case SOLDIER_CLASS_NONE:
|
||||||
|
if( ubNumElites )
|
||||||
|
{
|
||||||
|
if ( pSoldier->ubProfile == MIKE || pSoldier->ubProfile == IGGY )
|
||||||
|
{
|
||||||
|
num--;
|
||||||
|
sNumSlots--;
|
||||||
|
ubNumElites--;
|
||||||
|
pSoldier->ubGroupID = pGroup->ubGroupID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user