mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Only check for fExplodeOnImpact in OBJECT_DETONATE_ON_IMPACT if item has IC_EXPLOSV class. This fixes situation when random items are thrown incorrectly.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8749 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -66,8 +66,7 @@ class SOLDIERTYPE;
|
||||
#define GET_OBJECT_LEVEL( z ) ( (INT8)( ( z + 10 ) / HEIGHT_UNITS ) )
|
||||
//#define OBJECT_DETONATE_ON_IMPACT( object ) ( ( object->Obj.usItem == MORTAR_SHELL ) ) // && ( object->ubActionCode == THROW_ARM_ITEM || pObject->fTestObject ) )
|
||||
// HEADROCK HAM 5: Enabled "Explode on Impact" flag for explosive items
|
||||
#define OBJECT_DETONATE_ON_IMPACT( object ) ( ( Item[object->Obj.usItem].usItemClass == IC_BOMB ) || ( Explosive[Item[object->Obj.usItem].ubClassIndex ].fExplodeOnImpact ) ) // && ( object->ubActionCode == THROW_ARM_ITEM || pObject->fTestObject ) )
|
||||
|
||||
#define OBJECT_DETONATE_ON_IMPACT( object ) ((Item[object->Obj.usItem].usItemClass == IC_BOMB) || ((Item[object->Obj.usItem].usItemClass & IC_EXPLOSV) && Explosive[Item[object->Obj.usItem].ubClassIndex].fExplodeOnImpact))
|
||||
|
||||
#define MAX_INTEGRATIONS 8
|
||||
|
||||
@@ -2168,7 +2167,7 @@ FLOAT CalculateForceFromRange(UINT16 usItem, INT16 sRange, FLOAT dDegrees )
|
||||
|
||||
// Buggler: impact explosives requiring larger force to reach desired range due to no bounce
|
||||
// Please change the if conditions too when definition of OBJECT_DETONATE_ON_IMPACT( object ) changes
|
||||
if ( ( Item[ usItem ].usItemClass == IC_BOMB ) || ( Explosive[ Item[ usItem ].ubClassIndex ].fExplodeOnImpact ) ) // && ( object->ubActionCode == THROW_ARM_ITEM || pObject->fTestObject ) )
|
||||
if ((Item[usItem].usItemClass == IC_BOMB) || ((Item[usItem].usItemClass & IC_EXPLOSV) && Explosive[Item[usItem].ubClassIndex].fExplodeOnImpact))
|
||||
// Use a mortar shell objecttype to simulate impact explosives
|
||||
CreateItem( MORTAR_SHELL, 100, &gTempObject );
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user