Small changes and fixes for grenades and explosives (by Sevenfm)

1) Fixed small bug when MAPELEMENT_PLAYER_MINE_PRESENT was set after planting explosives with remote detonator.
2) Arming bomb with only remote defuse attached is not allowed. 
3) Showing item locator before "add blueflag" messagebox is disabled for our mines as it was annoying and you anyway know that it is here.
4) Total weight for throwing range is calculated for all items (previously it was calculated only for grenades).
5) Grenade-throwing formula and demolitions bonus applied only for hand-thrown grenades (check for TOSSCURS). Previously it was applied for launched grenades too.
6) Changed grenade throwing range formula from

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6606 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-11-15 19:51:12 +00:00
parent bb5b5e21d6
commit 57dd52a839
3 changed files with 44 additions and 18 deletions
+10 -2
View File
@@ -5476,8 +5476,16 @@ void HandleAttachedExplosions(UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32
if(Item[iter->usItem].directional && ubDirection == DIRECTION_IRRELEVANT)
direction=Random(8);
else
direction=ubDirection;
IgniteExplosion( ubOwner, sX, sY, sZ, sGridNo, Item[iter->usItem].uiIndex, bLevel, direction , NULL );
direction=ubDirection;
if( Item[iter->usItem].uiIndex == TRIP_KLAXON )
{
PlayJA2Sample( KLAXON_ALARM, RATE_11025, SoundVolume( MIDVOLUME, sGridNo ), 5, SoundDir( sGridNo ) );
CallAvailableEnemiesTo( sGridNo );
} else if( Item[iter->usItem].uiIndex == TRIP_FLARE )
{
NewLightEffect( sGridNo, (UINT8)Explosive[iter->usItem].ubDuration, (UINT8)Explosive[iter->usItem].ubStartRadius );
} else
IgniteExplosion( ubOwner, sX, sY, sZ, sGridNo, Item[iter->usItem].uiIndex, bLevel, direction , NULL );
}
}
if ( binderFound && gGameExternalOptions.bAllowSpecialExplosiveAttachments && iter->exists() && Item[iter->usItem].usItemClass & IC_MISC )