mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10: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:
+27
-1
@@ -15568,4 +15568,30 @@ FLOAT GetAttackAPTraitMultiplier( SOLDIERTYPE *pSoldier, OBJECTTYPE *pObj, UINT8
|
||||
}
|
||||
|
||||
return fMultiplier;
|
||||
}
|
||||
}
|
||||
|
||||
// check if item is grenade and it can use delayed explosion
|
||||
BOOLEAN CanDelayGrenadeExplosion( UINT16 usItem )
|
||||
{
|
||||
// check that item is a grenade
|
||||
if( Item[ usItem ].usItemClass != IC_GRENADE )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// check that grenade type is not gas/smoke/fire or flare
|
||||
if( Explosive[Item[ usItem ].ubClassIndex].ubType != EXPLOSV_NORMAL &&
|
||||
Explosive[ Item[ usItem ].ubClassIndex ].ubType != EXPLOSV_STUN &&
|
||||
Explosive[ Item[ usItem ].ubClassIndex ].ubType != EXPLOSV_FLASHBANG )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// check if grenade should always explode on impact
|
||||
if( Explosive[Item[ usItem ].ubClassIndex].fExplodeOnImpact )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user