mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Bugfix: I've simply added a condition to a pair of assertions so that they won't run when a soldier is assigned to a vehicle.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2485 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1777,7 +1777,9 @@ BOOLEAN SetCurrentWorldSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
||||
{
|
||||
//CHRISL: We should only bother with this assertion if the soldier is alive. Dead soliders are moved to
|
||||
// GridNo = NOWHERE, which causes this assertion to fail
|
||||
if(!(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_DEAD))
|
||||
//CHRISL: There's also an issue with vehicles. Soldiers in any vehicle are considered to be in sGridNo = NOWHERE
|
||||
// This will result in an assertion error, so let's skip the assertion if the merc is assigned to a vehicle
|
||||
if(!(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_DEAD) && MercPtrs[i]->bAssignment != VEHICLE)
|
||||
{
|
||||
Assert( !MercPtrs[i]->bActive || !MercPtrs[i]->bInSector || MercPtrs[i]->sGridNo != NOWHERE || MercPtrs[i]->bVehicleID == iHelicopterVehicleId );
|
||||
}
|
||||
@@ -1821,7 +1823,9 @@ BOOLEAN SetCurrentWorldSector( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
||||
{
|
||||
//CHRISL: We should only bother with this assertion if the soldier is alive. Dead soliders are moved to
|
||||
// GridNo = NOWHERE, which causes this assertion to fail
|
||||
if(!(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_DEAD))
|
||||
//CHRISL: There's also an issue with vehicles. Soldiers in any vehicle are considered to be in sGridNo = NOWHERE
|
||||
// This will result in an assertion error, so let's skip the assertion if the merc is assigned to a vehicle
|
||||
if(!(MercPtrs[i]->flags.uiStatusFlags & SOLDIER_DEAD) && MercPtrs[i]->bAssignment != VEHICLE)
|
||||
{
|
||||
Assert( !MercPtrs[i]->bActive || !MercPtrs[i]->bInSector || MercPtrs[i]->sGridNo != NOWHERE || MercPtrs[i]->bVehicleID == iHelicopterVehicleId );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user