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:
Wanne
2014-08-25 11:01:39 +00:00
parent 82e1f46251
commit 5717e2b8b8
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -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 ...
+5 -1
View File
@@ -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,8 +2714,11 @@ void HandleArmedObjectImpact( REAL_OBJECT *pObject )
}
*/
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 )
{
sZ = (INT16)CONVERT_HEIGHTUNITS_TO_PIXELS( (INT16)pObject->Position.z );