From 5ba510d4e40e0b1f6018363424ead7b5fb3e6825 Mon Sep 17 00:00:00 2001 From: Aerwix Date: Mon, 11 Mar 2024 17:25:39 -0600 Subject: [PATCH] fix: creatures walking snow console error (#2399) Resolves #2398 --- data/scripts/movements/snow.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/scripts/movements/snow.lua b/data/scripts/movements/snow.lua index d4801dcb25b..00f86bae14b 100644 --- a/data/scripts/movements/snow.lua +++ b/data/scripts/movements/snow.lua @@ -2,7 +2,11 @@ local snow = MoveEvent() function snow.onStepOut(creature, item, position, fromPosition) local player = creature:getPlayer() - if player and player:isInGhostMode() then + if not player then + return true + end + + if player:isInGhostMode() then return true end