mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-29 16:27:59 +03:00
Added safety measures for Bartoli ItemFlags[3]
Now if the 3rd explosion is deactivated using a negative value for ItemFlags[3], Bartoli will still be destroyed activate heavy trigger when its animation reaches to the end.
This commit is contained in:
parent
beccf36bf0
commit
3ad6a1b252
1 changed files with 6 additions and 1 deletions
|
@ -57,6 +57,7 @@ namespace TEN::Entities::Creatures::TR2
|
|||
short& timeExplosion1 = item.ItemFlags[1];
|
||||
short& timeExplosion2 = item.ItemFlags[2];
|
||||
short& timeExplosion3 = item.ItemFlags[3];
|
||||
int animationFrameEnd = GetAnimData(item.ObjectNumber, 0).frameEnd;
|
||||
|
||||
if (item.Animation.FrameNumber == 0)
|
||||
{
|
||||
|
@ -97,8 +98,12 @@ namespace TEN::Entities::Creatures::TR2
|
|||
TriggerDynamicLight(lightPos, lightColor, transformationLightFalloff);
|
||||
SpawnBartoliTransformEffect(item, ID_SPHERE_OF_DOOM3);
|
||||
SoundEffect(SFX_TR2_MARCO_BARTOLLI_TRANSFORM, &item.Pose);
|
||||
KillItem(itemNumber);
|
||||
item.Animation.FrameNumber = animationFrameEnd;
|
||||
}
|
||||
|
||||
if (item.Animation.FrameNumber >= animationFrameEnd)
|
||||
{
|
||||
KillItem(itemNumber);
|
||||
TestTriggers(&item, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue