mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix: AMMOTYPE::highExplosive was sometimes interpreted as an item number, sometimes as boolean, and sometimes a an index over explosives. It is now treated as an item number
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6124 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-1
@@ -248,7 +248,7 @@ typedef struct
|
||||
UINT8 numberOfBullets;
|
||||
INT32 multipleBulletDamageMultiplier;
|
||||
INT32 multipleBulletDamageDivisor;
|
||||
BOOLEAN highExplosive;
|
||||
UINT16 highExplosive;
|
||||
UINT8 explosionSize; //0=none, 1=small, 2=medium, 3=large
|
||||
BOOLEAN antiTank;
|
||||
BOOLEAN dart;
|
||||
|
||||
@@ -238,7 +238,7 @@ ammotypeEndElementHandle(void *userData, const XML_Char *name)
|
||||
else if(strcmp(name, "highExplosive") == 0)
|
||||
{
|
||||
pData->curElement = ELEMENT;
|
||||
pData->curAmmoType.highExplosive = (BOOLEAN) atol(pData->szCharData);
|
||||
pData->curAmmoType.highExplosive = (UINT16) atol(pData->szCharData);
|
||||
}
|
||||
else if(strcmp(name, "explosionSize") == 0)
|
||||
{
|
||||
|
||||
@@ -332,7 +332,7 @@ void InternalIgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32
|
||||
// No explosive but an attacker with HE ammo.
|
||||
if ( !( Item[ usItem ].usItemClass & IC_EXPLOSV ) && ubOwner != NOBODY)
|
||||
{
|
||||
ExpParams.ubTypeID = (INT8)Explosive[AmmoTypes[ammotype].highExplosive].ubAnimationID;
|
||||
ExpParams.ubTypeID = (INT8)Explosive[Item[AmmoTypes[ammotype].highExplosive].ubClassIndex].ubAnimationID;
|
||||
// return;
|
||||
}
|
||||
else // just normal explosives should get here
|
||||
|
||||
Reference in New Issue
Block a user