Closed MillhioreBT closed 4 months ago
So this will trigger only if the onStepOut
event also moves the player to a different location?
So this will trigger only if the
onStepOut
event also moves the player to a different location?
That is correct, although it can also happen with creatures in general, not only with players.
Pull Request Prelude
Changes Proposed
Currently, there is a scenario where an
onStepOut
event moves the creature. So, when the creature is removed, the event is triggered, and immediately theonStepOut
event will try tomove the creature
. However, when the creature is removed from thetile
, theonStepOut
event will call theMap::moveCreature
method, which will try toremove the creature
from thetile
again and also attempt to update thenew tile
. This results in unexpected behavior and can lead to any undefined behavior, typically a crash.This fixes the problem by ignoring the movements... perhaps more checks are needed?
Steps to reproduce the problem:
Connect any player. Place the character on top of anything that triggers the onStepOut event. Test onStepOut event:
Issues addressed: Nothing!