Skip to content

Commit

Permalink
wall, moving: Refactored reset hook call.
Browse files Browse the repository at this point in the history
  • Loading branch information
sathya-pramodh committed Nov 18, 2023
1 parent 5c8bded commit 3aa6c04
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/ctl/moving.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/ctl/wall.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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.
Expand Down

0 comments on commit 3aa6c04

Please sign in to comment.