Skip to content

Commit

Permalink
Added ComponentExists check for EffectDispatchTimer
Browse files Browse the repository at this point in the history
  • Loading branch information
Regynate committed Jan 21, 2025
1 parent 012ab83 commit 758c78f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ChaosMod/Util/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ inline void TeleportPlayer(const Vector3 &coords, bool noOffset = false)

inline void TeleportPlayerFindZ(float x, float y)
{
bool shouldPause = GetComponent<EffectDispatchTimer>()->IsUsingDistanceBasedDispatch()
bool shouldPause = ComponentExists<EffectDispatchTimer>()
&& GetComponent<EffectDispatchTimer>()->IsUsingDistanceBasedDispatch()
&& !GetComponent<EffectDispatchTimer>()->IsTimerPaused();

if (shouldPause)
Expand Down

0 comments on commit 758c78f

Please sign in to comment.