From eebc1f14d04a980f065f15435df02ba4ac4ea4dc Mon Sep 17 00:00:00 2001 From: Scott Wadden Date: Wed, 11 Oct 2023 09:56:30 -0300 Subject: [PATCH] Reinitialize player in vm during full reset --- src/controllers/script_controllers/worker.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/script_controllers/worker.nim b/src/controllers/script_controllers/worker.nim index 46633ca6..72c092d6 100644 --- a/src/controllers/script_controllers/worker.nim +++ b/src/controllers/script_controllers/worker.nim @@ -220,6 +220,8 @@ proc worker_thread(params: (ZenContext, GameState)) {.gcsafe.} = if full_reset: worker.init_interpreter("") worker.bridge_to_vm + player.script_ctx.interpreter = worker.interpreter + worker.load_script_and_dependents(player) world_dir = change.item.world_dir if world_dir != "": worker.load_world(world_dir)