mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
If firing a one-shot rocket launcher creates a discarded RPG, drop it to the ground, as the object is useless anyway.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7734 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2078,7 +2078,15 @@ BOOLEAN UseGunNCTH( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
||||
if ( Item[usUBItem].singleshotrocketlauncher )
|
||||
{
|
||||
CreateItem( Item[usItemNum].discardedlauncheritem , (*pObjHand)[0]->data.objectStatus, pObjHand );
|
||||
|
||||
// Flugente: why would we keep a piece of scrap in our ahnds in the first place? just drop it to the ground
|
||||
AddItemToPool( pSoldier->sGridNo, pObjHand, 1, pSoldier->pathing.bLevel, 0, -1 );
|
||||
|
||||
// Delete object
|
||||
DeleteObj( pObjHand );
|
||||
|
||||
DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 );
|
||||
|
||||
if ( Item[usUBItem].usBuddyItem != 0 && Item[Item[usUBItem].usBuddyItem].usItemClass & IC_EXPLOSV )
|
||||
{
|
||||
IgniteExplosion( pSoldier->ubID, CenterX( pSoldier->sGridNo ), CenterY( pSoldier->sGridNo ), 0, pSoldier->sGridNo, Item[usUBItem].usBuddyItem, pSoldier->pathing.bLevel );
|
||||
@@ -2250,6 +2258,13 @@ BOOLEAN UseGunNCTH( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
||||
if ( Item[usUBItem].singleshotrocketlauncher )
|
||||
{
|
||||
CreateItem( Item[usUBItem].discardedlauncheritem, (*pObjHand)[0]->data.objectStatus, pObjHand );
|
||||
|
||||
// Flugente: why would we keep a piece of scrap in our ahnds in the first place? just drop it to the ground
|
||||
AddItemToPool( pSoldier->sGridNo, pObjHand, 1, pSoldier->pathing.bLevel, 0, -1 );
|
||||
|
||||
// Delete object
|
||||
DeleteObj( pObjHand );
|
||||
|
||||
DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 );
|
||||
}
|
||||
|
||||
@@ -2834,7 +2849,15 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
||||
if ( Item[usUBItem].singleshotrocketlauncher )
|
||||
{
|
||||
CreateItem( Item[usUBItem].discardedlauncheritem , (*pObjUsed)[0]->data.objectStatus, pObjUsed );
|
||||
|
||||
// Flugente: why would we keep a piece of scrap in our ahnds in the first place? just drop it to the ground
|
||||
AddItemToPool( pSoldier->sGridNo, pObjUsed, 1, pSoldier->pathing.bLevel, 0, -1 );
|
||||
|
||||
// Delete object
|
||||
DeleteObj( pObjUsed );
|
||||
|
||||
DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 );
|
||||
|
||||
if ( Item[usUBItem].usBuddyItem != 0 && Item[Item[usUBItem].usBuddyItem].usItemClass & IC_EXPLOSV )
|
||||
{
|
||||
IgniteExplosion( pSoldier->ubID, CenterX( pSoldier->sGridNo ), CenterY( pSoldier->sGridNo ), 0, pSoldier->sGridNo, C1, pSoldier->pathing.bLevel );
|
||||
@@ -2894,6 +2917,13 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT32 sTargetGridNo )
|
||||
if ( Item[usUBItem].singleshotrocketlauncher )
|
||||
{
|
||||
CreateItem( Item[usUBItem].discardedlauncheritem, (*pObjUsed)[0]->data.objectStatus, pObjUsed );
|
||||
|
||||
// Flugente: why would we keep a piece of scrap in our ahnds in the first place? just drop it to the ground
|
||||
AddItemToPool( pSoldier->sGridNo, pObjUsed, 1, pSoldier->pathing.bLevel, 0, -1 );
|
||||
|
||||
// Delete object
|
||||
DeleteObj( pObjUsed );
|
||||
|
||||
DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user