mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
ADD_SMOKE_AFTER_EXPLOSION option:
- use default item SMOKE_GRENADE (151) if it's available - search for first smoke grenade if default item is not grenade - check that correct smoke grenade was found Also added new functions: - ItemIsHandGrenade to check if item is hand grenade - GetFirstHandGrenadeOfType to find first item which is hand grenade of selected type - GetHandGrenadeOfType same as GetFirstHandGrenadeOfType, but first check if provided default item is hand grenade of needed type git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9156 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -379,11 +379,14 @@ void InternalIgniteExplosion( UINT8 ubOwner, INT16 sX, INT16 sY, INT16 sZ, INT32
|
||||
Item[usItem].usBuddyItem == 0 &&
|
||||
Explosive[Item[usItem].ubClassIndex].ubDamage > 20)
|
||||
{
|
||||
UINT16 usSmokeItem = SMOKE_GRENADE;
|
||||
if (HasItemFlag(usItem, JUMP_GRENADE))
|
||||
NewSmokeEffect(sGridNo, usSmokeItem, bLevel, ubOwner, 0, 1, 0);
|
||||
else
|
||||
NewSmokeEffect(sGridNo, usSmokeItem, bLevel, ubOwner, 0, 2, 1);
|
||||
UINT16 usSmokeItem = GetHandGrenadeOfType(SMOKE_GRENADE, EXPLOSV_SMOKE);
|
||||
if (usSmokeItem)
|
||||
{
|
||||
if (HasItemFlag(usItem, JUMP_GRENADE))
|
||||
NewSmokeEffect(sGridNo, usSmokeItem, bLevel, ubOwner, 0, 1, 0);
|
||||
else
|
||||
NewSmokeEffect(sGridNo, usSmokeItem, bLevel, ubOwner, 0, 2, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user