Skip to content

Commit

Permalink
ChaosMod/EffectDispatcher: Respect "No Chaos" effect for non-timer ef…
Browse files Browse the repository at this point in the history
…fect dispatch
  • Loading branch information
pongo1231 committed Feb 12, 2024
1 parent ab185e6 commit 4a00292
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ChaosMod/Components/EffectDispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,14 @@ void EffectDispatcher::OnRun()

void EffectDispatcher::UpdateTravelledDistance()
{
Ped player = PLAYER_PED_ID();
Vector3 position = GET_ENTITY_COORDS(player, false);
auto player = PLAYER_PED_ID();
auto position = GET_ENTITY_COORDS(player, false);

if (ComponentExists<MetaModifiers>() && GetComponent<MetaModifiers>()->DisableChaos)
{
m_DistanceChaosState.SavedPosition = position;
return;
}

if (IS_ENTITY_DEAD(player, false))
{
Expand Down

0 comments on commit 4a00292

Please sign in to comment.