From 3aa6c04369f30c63512977c8d6eedf1e37f6a3e0 Mon Sep 17 00:00:00 2001 From: sathya-pramodh Date: Sat, 18 Nov 2023 21:59:00 +0530 Subject: [PATCH] wall, moving: Refactored reset hook call. --- internal/ctl/moving.go | 2 +- internal/ctl/wall.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ctl/moving.go b/internal/ctl/moving.go index 4c8c78c..b216504 100644 --- a/internal/ctl/moving.go +++ b/internal/ctl/moving.go @@ -375,6 +375,7 @@ func (m *MovingWall) removeFromQueue(id int) { // resetIngame resets the active instance. func (m *MovingWall) resetIngame() { m.host.ResetInstance(m.active) + m.host.RunHook(HookReset) if m.freezer != nil { m.freezer.Unfreeze(m.active) } @@ -388,7 +389,6 @@ func (m *MovingWall) resetIngame() { } m.host.DeleteSleepbgLock(false) m.obs.SetScene("Wall") - m.host.RunHook(HookReset) } // setLocked sets the lock state of the given instance. diff --git a/internal/ctl/wall.go b/internal/ctl/wall.go index a04843d..87cde35 100644 --- a/internal/ctl/wall.go +++ b/internal/ctl/wall.go @@ -300,6 +300,7 @@ func (w *Wall) promptWallSize() error { // resetIngame resets the active instance. func (w *Wall) resetIngame() { w.host.ResetInstance(w.active) + w.host.RunHook(HookReset) if w.freezer != nil { w.freezer.Unfreeze(w.active) } @@ -322,7 +323,6 @@ func (w *Wall) resetIngame() { } w.host.DeleteSleepbgLock(false) w.obs.SetScene("Wall") - w.host.RunHook(HookReset) } // playFirstLocked plays the first idle, locked instance.