mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- fix for HE ammo
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@347 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-2
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.345" };
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.347" };
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
INT8 czVersionNumber[16] = { "Build 06.07.14" };
|
||||
INT8 czVersionNumber[16] = { "Build 06.07.16" };
|
||||
INT16 zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
|
||||
|
||||
@@ -220,23 +220,31 @@ void InternalIgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT16
|
||||
{
|
||||
EXPLOSION_PARAMS ExpParams ;
|
||||
|
||||
|
||||
// Callahan start
|
||||
// Double check that we are using an explosive!
|
||||
// callahan start
|
||||
// this would completely stop any HE gunfire, so it has to die
|
||||
if ( !( Item[ usItem ].usItemClass & IC_EXPLOSV ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// callahan end
|
||||
// Check if there is an explosive or an attacker
|
||||
|
||||
if ( !( Item[ usItem ].usItemClass & IC_EXPLOSV ) && ubOwner == NOBODY )
|
||||
{
|
||||
return; // no explosive / no attacker
|
||||
}
|
||||
|
||||
// Okay, we either got an explosive or a real attacker to check for.
|
||||
// Let's check for the attacker first.
|
||||
if ( ubOwner != NOBODY )
|
||||
{
|
||||
if ( !( Item[ usItem ].usItemClass & IC_EXPLOSV ) && AmmoTypes[MercPtrs[ubOwner]->inv[MercPtrs[ubOwner]->ubAttackingHand ].ubGunAmmoType].explosionSize < 2 )
|
||||
{
|
||||
return; // no explosive and attackers gun is not fireing HE
|
||||
}
|
||||
}
|
||||
|
||||
// Increment attack counter...
|
||||
|
||||
if (gubElementsOnExplosionQueue == 0)
|
||||
{
|
||||
// single explosion, disable sight until the end, and set flag
|
||||
// to check sight at end of attack
|
||||
|
||||
|
||||
gTacticalStatus.uiFlags |= (DISALLOW_SIGHT | CHECK_SIGHT_AT_END_OF_ATTACK);
|
||||
}
|
||||
|
||||
@@ -248,19 +256,18 @@ void InternalIgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT16
|
||||
// OK, go on!
|
||||
ExpParams.uiFlags = EXPLOSION_FLAG_USEABSPOS;
|
||||
ExpParams.ubOwner = ubOwner;
|
||||
//ExpParams.ubTypeID = Explosive[ Item[ usItem ].ubClassIndex ].ubAnimationID;
|
||||
// callahan start
|
||||
// animation is now properly extracted from explosives.xml
|
||||
if ( !( Item[ usItem ].usItemClass & IC_EXPLOSV ) )
|
||||
|
||||
// No explosive but an attacker with HE ammo.
|
||||
if ( !( Item[ usItem ].usItemClass & IC_EXPLOSV ) && ubOwner != NOBODY)
|
||||
{
|
||||
ExpParams.ubTypeID = Explosive[AmmoTypes[MercPtrs[ubOwner]->inv[MercPtrs[ubOwner]->ubAttackingHand ].ubGunAmmoType].highExplosive].ubAnimationID;
|
||||
// return;
|
||||
ExpParams.ubTypeID = Explosive[AmmoTypes[MercPtrs[ubOwner]->inv[MercPtrs[ubOwner]->ubAttackingHand ].ubGunAmmoType].highExplosive].ubAnimationID;
|
||||
// return;
|
||||
}
|
||||
else
|
||||
else // just normal explosives should get here
|
||||
{
|
||||
ExpParams.ubTypeID = Explosive[ Item[ usItem ].ubClassIndex ].ubAnimationID;
|
||||
ExpParams.ubTypeID = Explosive[ Item[ usItem ].ubClassIndex ].ubAnimationID;
|
||||
}
|
||||
// callahan end
|
||||
// Callahan end
|
||||
|
||||
ExpParams.sX = sX;
|
||||
ExpParams.sY = sY;
|
||||
@@ -271,9 +278,12 @@ void InternalIgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT16
|
||||
ExpParams.bLevel = bLevel;
|
||||
|
||||
GenerateExplosion( &ExpParams );
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void IgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT16 sGridNo, UINT16 usItem, INT8 bLevel )
|
||||
{
|
||||
InternalIgniteExplosion( ubOwner, sX, sY, sZ, sGridNo, usItem, TRUE, bLevel );
|
||||
|
||||
Reference in New Issue
Block a user