mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New feature: delayed grenade explosions:
- use transformation menu to change explosion mode - only Normal/Stun/Flashbang type grenades can be delayed - AI soldiers will avoid staying close to armed grenades\explosives - use option DELAYED_GRENADE_EXPLOSION to make all hand\GL grenades work as delayed - new value AP_GRENADE_MODE = 4 in APBPConstants.ini - new item flag DELAYED_GRENADE_EXPLOSION Other changes: - fixed call to sqrt in DrawExplosionWarning() that prevented compiling in VS2010 - correctly update interface after transformations - PATHAI: AI soldiers will skip gassed tiles if not in gas already - InGas check: AI soldiers will avoid mustard gas even when wearing gas mask - Yellow AI: added check to avoid gas/water/bomb using FindNearestUngassedLand - gas/flare grenades will always explode instantly even when in bad state - LegalNPCDestination: locations near armed bombs are not legal - FindBestNearbyCover: avoid locations near armed bombs git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8324 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+13
-22
@@ -59,28 +59,19 @@ int LegalNPCDestination(SOLDIERTYPE *pSoldier, INT32 sGridNo, UINT8 ubPathMode,
|
||||
// skip mercs if turnbased and adjacent AND not doing an IGNORE_PATH check (which is used almost exclusively by GoAsFarAsPossibleTowards)
|
||||
fSkipTilesWithMercs = (gfTurnBasedAI && ubPathMode != IGNORE_PATH && SpacesAway( pSoldier->sGridNo, sGridNo ) == 1 );
|
||||
|
||||
// if this gridno is an OK destination
|
||||
// AND the gridno is NOT in a tear-gassed tile when we have no gas mask
|
||||
// AND someone is NOT already standing there
|
||||
// AND we're NOT already standing at that gridno
|
||||
// AND the gridno hasn't been black-listed for us
|
||||
|
||||
// Nov 28 98: skip people in destination tile if in turnbased
|
||||
if ( ( NewOKDestination(pSoldier, sGridNo, fSkipTilesWithMercs, pSoldier->pathing.bLevel ) ) &&
|
||||
( !InGas( pSoldier, sGridNo ) ) &&
|
||||
( sGridNo != pSoldier->sGridNo ) &&
|
||||
( sGridNo != pSoldier->pathing.sBlackList ) )
|
||||
/*
|
||||
if ( ( NewOKDestination(pSoldier, sGridno, FALSE, pSoldier->pathing.bLevel ) ) &&
|
||||
( !(gpWorldLevelData[ sGridno ].ubExtFlags[0] & (MAPELEMENT_EXT_SMOKE | MAPELEMENT_EXT_TEARGAS | MAPELEMENT_EXT_MUSTARDGAS)) || ( pSoldier->inv[ HEAD1POS ].usItem == GASMASK || pSoldier->inv[ HEAD2POS ].usItem == GASMASK ) ) &&
|
||||
( sGridno != pSoldier->sGridNo ) &&
|
||||
( sGridno != pSoldier->pathing.sBlackList ) )*/
|
||||
/*
|
||||
if ( ( NewOKDestination(pSoldier,sGridno,ALLPEOPLE, pSoldier->pathing.bLevel ) ) &&
|
||||
( !(gpWorldLevelData[ sGridno ].ubExtFlags[0] & (MAPELEMENT_EXT_SMOKE | MAPELEMENT_EXT_TEARGAS | MAPELEMENT_EXT_MUSTARDGAS)) || ( pSoldier->inv[ HEAD1POS ].usItem == GASMASK || pSoldier->inv[ HEAD2POS ].usItem == GASMASK ) ) &&
|
||||
( sGridno != pSoldier->sGridNo ) &&
|
||||
( sGridno != pSoldier->pathing.sBlackList ) )
|
||||
*/
|
||||
// if this gridno is an OK destination
|
||||
// AND the gridno is NOT in a tear-gassed tile when we have no gas mask
|
||||
// AND someone is NOT already standing there
|
||||
// AND we're NOT already standing at that gridno
|
||||
// AND the gridno hasn't been black-listed for us
|
||||
|
||||
// Nov 28 98: skip people in destination tile if in turnbased
|
||||
// sevenfm: also check for bomb nearby
|
||||
if ( NewOKDestination(pSoldier, sGridNo, fSkipTilesWithMercs, pSoldier->pathing.bLevel ) &&
|
||||
!InGas( pSoldier, sGridNo ) &&
|
||||
!FindBombNearby(pSoldier, sGridNo, DAY_VISION_RANGE/8 ) &&
|
||||
sGridNo != pSoldier->sGridNo &&
|
||||
sGridNo != pSoldier->pathing.sBlackList )
|
||||
{
|
||||
// if water's a problem, and gridno is in a water tile (bridges are OK)
|
||||
if (!ubWaterOK && Water(sGridNo, pSoldier->pathing.bLevel))
|
||||
|
||||
Reference in New Issue
Block a user