diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-07-03 11:21:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 11:21:10 -0400 |
commit | b4f66496ed99adb4922d7fc799530a898a6e1944 (patch) | |
tree | b5cbb9c34a22dcae4a12595549b6d3e0f241b5c3 /src/scrcmd.c | |
parent | 56b69157ef77e651aadf38ef2a7df23033474aac (diff) | |
parent | 4206359862da51e3cc3d6b36ab0a3280c1123b9e (diff) |
Merge pull request #1471 from GriffinRichards/fix-lock
Fix some object lock names
Diffstat (limited to 'src/scrcmd.c')
-rw-r--r-- | src/scrcmd.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/scrcmd.c b/src/scrcmd.c index 0ee20d1c6..f53483978 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1203,6 +1203,8 @@ bool8 ScrCmd_turnvobject(struct ScriptContext *ctx) return FALSE; } +// lockall freezes all object events except the player immediately. +// The player is frozen after waiting for their current movement to finish. bool8 ScrCmd_lockall(struct ScriptContext *ctx) { if (IsUpdateLinkStateCBActive()) @@ -1211,12 +1213,14 @@ bool8 ScrCmd_lockall(struct ScriptContext *ctx) } else { - ScriptFreezeObjectEvents(); + FreezeObjects_WaitForPlayer(); SetupNativeScript(ctx, IsFreezePlayerFinished); return TRUE; } } +// lock freezes all object events except the player and the selected object immediately. +// The player and selected object are frozen after waiting for their current movement to finish. bool8 ScrCmd_lock(struct ScriptContext *ctx) { if (IsUpdateLinkStateCBActive()) @@ -1227,12 +1231,12 @@ bool8 ScrCmd_lock(struct ScriptContext *ctx) { if (gObjectEvents[gSelectedObjectEvent].active) { - LockSelectedObjectEvent(); + FreezeObjects_WaitForPlayerAndSelected(); SetupNativeScript(ctx, IsFreezeSelectedObjectAndPlayerFinished); } else { - ScriptFreezeObjectEvents(); + FreezeObjects_WaitForPlayer(); SetupNativeScript(ctx, IsFreezePlayerFinished); } return TRUE; |