From 123192db10cdf5244f27d08256ece738f60a9e2c Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 4 May 2018 10:23:02 -0400 Subject: Unferried players while changing maps This fixes the third problem described in 8f1c4f1 -- that if a ferried body's transform is modified outside of the PonderingSystem, it will not be unferried as appropriate. This does still require that any future code that modifies a body's transform also unferries the body first. --- src/systems/playing.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/systems/playing.cpp') diff --git a/src/systems/playing.cpp b/src/systems/playing.cpp index b04f0cb..acec4e7 100644 --- a/src/systems/playing.cpp +++ b/src/systems/playing.cpp @@ -79,11 +79,7 @@ void PlayingSystem::changeMap( auto& transformable = game_.getEntityManager(). getComponent(player); - auto& animatable = game_.getEntityManager(). - getComponent(player); - - auto& ponderable = game_.getEntityManager(). - getComponent(player); + auto& pondering = game_.getSystemManager().getSystem(); auto& realizing = game_.getSystemManager().getSystem(); @@ -105,6 +101,8 @@ void PlayingSystem::changeMap( playable.mapId = newMapEntity; } + pondering.unferry(player); + transformable.x = x; transformable.y = y; -- cgit 1.4.1