mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Fix: ID on artillery shells was not set correctly. This caused all damage of an artillery strike to be attributed to the first merc.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7570 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -17935,7 +17935,7 @@ BOOLEAN SOLDIERTYPE::OrderArtilleryStrike( UINT32 usSectorNr, INT32 sTargetGridN
|
|||||||
// send a signal shell at first. This marks the area that the shells will come in
|
// send a signal shell at first. This marks the area that the shells will come in
|
||||||
static UINT16 usSignalShellIndex = 1700;
|
static UINT16 usSignalShellIndex = 1700;
|
||||||
if ( HasItemFlag( usSignalShellIndex, SIGNAL_SHELL ) || GetFirstItemWithFlag( &usSignalShellIndex, SIGNAL_SHELL ) )
|
if ( HasItemFlag( usSignalShellIndex, SIGNAL_SHELL ) || GetFirstItemWithFlag( &usSignalShellIndex, SIGNAL_SHELL ) )
|
||||||
ArtilleryStrike( usSignalShellIndex, sStartingGridNo, sTargetGridNo );
|
ArtilleryStrike( usSignalShellIndex, this->ubID, sStartingGridNo, sTargetGridNo );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_NO_SIGNAL_SHELL] );
|
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, New113Message[MSG113_NO_SIGNAL_SHELL] );
|
||||||
|
|||||||
@@ -13324,7 +13324,7 @@ FLOAT CalcNewChanceToHitAimTraitBonus(SOLDIERTYPE *pSoldier, FLOAT fAimCap, FLOA
|
|||||||
extern BOOLEAN IsRoofPresentAtGridNo( INT32 sGridNo );
|
extern BOOLEAN IsRoofPresentAtGridNo( INT32 sGridNo );
|
||||||
|
|
||||||
// Flugente: fire item from A to B (intended for mortarshells and launchable grenades)
|
// Flugente: fire item from A to B (intended for mortarshells and launchable grenades)
|
||||||
BOOLEAN ArtilleryStrike( UINT16 usItem, UINT32 usStartingGridNo, UINT32 usTargetMapPos )
|
BOOLEAN ArtilleryStrike( UINT16 usItem, UINT8 ubOwnerID, UINT32 usStartingGridNo, UINT32 usTargetMapPos )
|
||||||
{
|
{
|
||||||
FLOAT dForce, dDegrees;
|
FLOAT dForce, dDegrees;
|
||||||
INT16 sDestX, sDestY, sSrcX, sSrcY;
|
INT16 sDestX, sDestY, sSrcX, sSrcY;
|
||||||
@@ -13385,8 +13385,8 @@ BOOLEAN ArtilleryStrike( UINT16 usItem, UINT32 usStartingGridNo, UINT32 usTarget
|
|||||||
{
|
{
|
||||||
PlayJA2Sample( Weapon[ usItem ].sSound, RATE_11025, SoundVolume( HIGHVOLUME, usStartingGridNo ), 1, SoundDir( usStartingGridNo ) );
|
PlayJA2Sample( Weapon[ usItem ].sSound, RATE_11025, SoundVolume( HIGHVOLUME, usStartingGridNo ), 1, SoundDir( usStartingGridNo ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
INT32 iID = CreatePhysicalObject( &shellobj, -1, dX, dY, dZ, dForceX, dForceY, dForceZ, 0, THROW_ARM_ITEM, 0, FALSE );
|
INT32 iID = CreatePhysicalObject( &shellobj, -1, dX, dY, dZ, dForceX, dForceY, dForceZ, ubOwnerID, THROW_ARM_ITEM, 0, FALSE );
|
||||||
|
|
||||||
// OJW - 20091002 - Explosives
|
// OJW - 20091002 - Explosives
|
||||||
/*if (is_networked && is_client)
|
/*if (is_networked && is_client)
|
||||||
|
|||||||
+1
-1
@@ -541,6 +541,6 @@ FLOAT GetOverheatJamThreshold( OBJECTTYPE *pObj );
|
|||||||
FLOAT GetOverheatDamageThresholdModifier( OBJECTTYPE *pObj );
|
FLOAT GetOverheatDamageThresholdModifier( OBJECTTYPE *pObj );
|
||||||
FLOAT GetOverheatDamageThreshold( OBJECTTYPE *pObj );
|
FLOAT GetOverheatDamageThreshold( OBJECTTYPE *pObj );
|
||||||
|
|
||||||
BOOLEAN ArtilleryStrike( UINT16 usItem, UINT32 usStartingGridNo, UINT32 usTargetMapPos );
|
BOOLEAN ArtilleryStrike( UINT16 usItem, UINT8 ubOwnerID, UINT32 usStartingGridNo, UINT32 usTargetMapPos );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4053,7 +4053,7 @@ void HandleExplosionQueue( void )
|
|||||||
if ( GetRandomSignalSmokeGridNo(&sTargetGridNo) || GetRadioOperatorSignal((*pObj)[0]->data.misc.ubBombOwner, &sTargetGridNo) || (sTargetGridNo = RandomGridNo()) )
|
if ( GetRandomSignalSmokeGridNo(&sTargetGridNo) || GetRadioOperatorSignal((*pObj)[0]->data.misc.ubBombOwner, &sTargetGridNo) || (sTargetGridNo = RandomGridNo()) )
|
||||||
{
|
{
|
||||||
for ( UINT8 i = 0; i < cnt; ++i)
|
for ( UINT8 i = 0; i < cnt; ++i)
|
||||||
ArtilleryStrike(pObj->usItem, sGridNo, sTargetGridNo);
|
ArtilleryStrike( pObj->usItem, (*pObj)[0]->data.misc.ubBombOwner, sGridNo, sTargetGridNo );
|
||||||
}
|
}
|
||||||
|
|
||||||
// not needed anymore
|
// not needed anymore
|
||||||
|
|||||||
Reference in New Issue
Block a user