mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Merged from revision: 7411
Bugfix: Dud grenades (by cocsackie) - Dud is not set up properly git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7412 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4214,7 +4214,7 @@ void DecayBombTimers( void )
|
||||
for ( INT8 bLoop = 0; bLoop < invsize; ++bLoop) // ... for all items in our inventory ...
|
||||
{
|
||||
// ... if Item is a bomb ...
|
||||
if (pSoldier->inv[bLoop].exists() == true && ( Item[pSoldier->inv[bLoop].usItem].usItemClass & (IC_BOMB) ) )
|
||||
if (pSoldier->inv[bLoop].exists() == true && ( Item[pSoldier->inv[bLoop].usItem].usItemClass & (IC_BOMB|IC_GRENADE) ) )
|
||||
{
|
||||
OBJECTTYPE * pObj = &(pSoldier->inv[bLoop]); // ... get pointer for this item ...
|
||||
|
||||
|
||||
@@ -2613,7 +2613,7 @@ void HandleArmedObjectImpact( REAL_OBJECT *pObject )
|
||||
AddItemToPool( pObject->sGridNo, pObj, INVISIBLE, bLevel, usFlags, 0 );
|
||||
}
|
||||
|
||||
if ( fCheckForDuds )
|
||||
if ( fCheckForDuds && (*pObj)[0]->data.misc.bDetonatorType != BOMB_TIMED )
|
||||
{
|
||||
// OJW - 20021002 - MP Explosives
|
||||
if (is_networked && is_client && pObject->mpIsFromRemoteClient && pObject->mpHaveClientResult)
|
||||
@@ -2657,6 +2657,7 @@ void HandleArmedObjectImpact( REAL_OBJECT *pObject )
|
||||
|
||||
(*pObj)[0]->data.misc.bDetonatorType = BOMB_TIMED;
|
||||
(*pObj)[0]->data.misc.bDelay = (INT8)( 1 + PreRandom( 2 ) );
|
||||
(*pObj)[0]->data.misc.usBombItem = pObj->usItem;
|
||||
}
|
||||
|
||||
// ATE: If we have collided with roof last...
|
||||
@@ -2713,7 +2714,10 @@ void HandleArmedObjectImpact( REAL_OBJECT *pObject )
|
||||
}
|
||||
*/
|
||||
|
||||
IgniteExplosion( pObject->ubOwner, (INT16)pObject->Position.x, (INT16)pObject->Position.y, sZ, pObject->sGridNo, pObject->Obj.usItem, GET_OBJECT_LEVEL( pObject->Position.z - CONVERT_PIXELS_TO_HEIGHTUNITS( gpWorldLevelData[ pObject->sGridNo ].sHeight ) ), DIRECTION_IRRELEVANT, &pObject->Obj );
|
||||
if( (*pObj)[0]->data.misc.bDetonatorType != BOMB_TIMED )
|
||||
{
|
||||
IgniteExplosion( pObject->ubOwner, (INT16)pObject->Position.x, (INT16)pObject->Position.y, sZ, pObject->sGridNo, pObject->Obj.usItem, GET_OBJECT_LEVEL( pObject->Position.z - CONVERT_PIXELS_TO_HEIGHTUNITS( gpWorldLevelData[ pObject->sGridNo ].sHeight ) ), DIRECTION_IRRELEVANT, &pObject->Obj );
|
||||
}
|
||||
}
|
||||
else if ( Item[ pObject->Obj.usItem ].usItemClass == IC_BOMB ) //if ( pObject->Obj.usItem == MORTAR_SHELL )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user