mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
-put a stop to enemies and npcs running into gas and fire (hopefully)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@444 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -82,6 +82,18 @@ int LegalNPCDestination(SOLDIERTYPE *pSoldier, INT16 sGridno, UINT8 ubPathMode,
|
||||
if (!ubWaterOK && Water(sGridno))
|
||||
return(FALSE);
|
||||
|
||||
//Madd: added to prevent people from running into gas and fire
|
||||
if ( (gpWorldLevelData[sGridno].ubExtFlags[pSoldier->bLevel] & (MAPELEMENT_EXT_TEARGAS | MAPELEMENT_EXT_MUSTARDGAS)) &&
|
||||
FindGasMask(pSoldier) == NO_SLOT )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
if ( gpWorldLevelData[sGridno].ubExtFlags[pSoldier->bLevel] & MAPELEMENT_EXT_BURNABLEGAS )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
// passed all checks, now try to make sure we can get there!
|
||||
switch (ubPathMode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user