mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-12 05:26:57 +03:00
Fix extinguishing depth, add smoke density
This commit is contained in:
parent
ff2ec04c70
commit
0072ec93cf
1 changed files with 11 additions and 8 deletions
|
@ -1646,7 +1646,7 @@ void ProcessEffects(ItemInfo* item)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EffectType::Smoke:
|
case EffectType::Smoke:
|
||||||
if (TestProbability(1 / 64.0f))
|
if (TestProbability(1 / 32.0f))
|
||||||
TriggerRocketSmoke(pos.x, pos.y, pos.z, 0);
|
TriggerRocketSmoke(pos.x, pos.y, pos.z, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1689,14 +1689,17 @@ void ProcessEffects(ItemInfo* item)
|
||||||
DoDamage(item, item->IsLara() ? BURN_HEALTH_LARA : BURN_HEALTH_NPC);
|
DoDamage(item, item->IsLara() ? BURN_HEALTH_LARA : BURN_HEALTH_NPC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int waterHeight = GetWaterHeight(item->Pose.Position.x, item->Pose.Position.y, item->Pose.Position.z, item->RoomNumber);
|
if (item->Effect.Type != EffectType::Sparks && item->Effect.Type != EffectType::Smoke)
|
||||||
|
|
||||||
if (item->Effect.Type != EffectType::Sparks && item->Effect.Type != EffectType::Smoke &&
|
|
||||||
(waterHeight != NO_HEIGHT && item->Pose.Position.y > waterHeight))
|
|
||||||
{
|
{
|
||||||
item->Effect.Type = EffectType::Smoke;
|
int waterHeight = GetWaterHeight(item);
|
||||||
item->Effect.Count = 10;
|
int itemLevel = item->Pose.Position.y - GameBoundingBox(item).GetHeight() / 3;
|
||||||
|
|
||||||
|
if (waterHeight != NO_HEIGHT && itemLevel > waterHeight)
|
||||||
|
{
|
||||||
|
item->Effect.Type = EffectType::Smoke;
|
||||||
|
item->Effect.Count = 1 * FPS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item->IsLara() && GetLaraInfo(item)->Control.WaterStatus == WaterStatus::FlyCheat)
|
if (item->IsLara() && GetLaraInfo(item)->Control.WaterStatus == WaterStatus::FlyCheat)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue