Don't check whether an explosion damaging a room pisses of civilians if there is no room to begin with

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8839 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2020-07-04 18:51:58 +00:00
parent 8c2c0dd71d
commit 76302328c2
+8 -8
View File
@@ -5166,6 +5166,10 @@ void HandleBuldingDestruction( INT32 sGridNo, UINT8 ubOwner )
return;
}
// no point doing this if this is not part of a room
if ( sGridNo == NOWHERE || !InARoom( sGridNo, NULL ) )
return;
cnt = gTacticalStatus.Team[ CIV_TEAM ].bFirstID;
for ( pSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ CIV_TEAM ].bLastID; cnt++ ,pSoldier++ )
{
@@ -5190,14 +5194,12 @@ void HandleBuldingDestruction( INT32 sGridNo, UINT8 ubOwner )
INT32 FindActiveTimedBomb( void )
{
UINT32 uiWorldBombIndex;
UINT32 uiTimeStamp;
OBJECTTYPE * pObj;
uiTimeStamp = GetJA2Clock();
//UINT32 uiTimeStamp = GetJA2Clock();
// Go through all the bombs in the world, and look for timed ones
for (uiWorldBombIndex = 0; uiWorldBombIndex < guiNumWorldBombs; uiWorldBombIndex++)
for ( UINT32 uiWorldBombIndex = 0; uiWorldBombIndex < guiNumWorldBombs; ++uiWorldBombIndex)
{
if (gWorldBombs[uiWorldBombIndex].fExists)
{
@@ -5218,10 +5220,8 @@ BOOLEAN ActiveTimedBombExists( void )
{
return( FindActiveTimedBomb() != -1 );
}
else
{
return( FALSE );
}
return( FALSE );
}
void RemoveAllActiveTimedBombs( void )