diff --git a/src/core/MythosArea.ttslua b/src/core/MythosArea.ttslua index 79a02fa4..5877a4fa 100644 --- a/src/core/MythosArea.ttslua +++ b/src/core/MythosArea.ttslua @@ -11,12 +11,15 @@ local ENCOUNTER_DISCARD_AREA = { } local currentScenario +-- we use this to turn off collision handling until onLoad() is complete +local COLLISION_ENABLED = false function onLoad(saveState) if saveState ~= nil then local loadedState = JSON.decode(saveState) or { } currentScenario = loadedState.currentScenario end + COLLISION_ENABLED = true end function onSave() @@ -27,6 +30,9 @@ end -- TTS event handler. Handles scenario name event triggering and encounter card token resets. function onCollisionEnter(collisionInfo) + if not COLLISION_ENABLED then + return + end local object = collisionInfo.collision_object if object.getName() == "Scenario" then if currentScenario ~= object.getDescription() then diff --git a/xml/Global.xml b/xml/Global.xml index 83f1fcdb..128083f7 100644 --- a/xml/Global.xml +++ b/xml/Global.xml @@ -101,6 +101,7 @@