diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-05-04 10:23:02 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-05-09 17:59:13 -0400 |
commit | 123192db10cdf5244f27d08256ece738f60a9e2c (patch) | |
tree | 9636a010c6f0ce4f0f7ea31822136affdfac3137 /src/systems/playing.cpp | |
parent | 69c04dfb6c49e7b2d34a6699c071f037880fbde5 (diff) | |
download | therapy-123192db10cdf5244f27d08256ece738f60a9e2c.tar.gz therapy-123192db10cdf5244f27d08256ece738f60a9e2c.tar.bz2 therapy-123192db10cdf5244f27d08256ece738f60a9e2c.zip |
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.
Diffstat (limited to 'src/systems/playing.cpp')
-rw-r--r-- | src/systems/playing.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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( | |||
79 | auto& transformable = game_.getEntityManager(). | 79 | auto& transformable = game_.getEntityManager(). |
80 | getComponent<TransformableComponent>(player); | 80 | getComponent<TransformableComponent>(player); |
81 | 81 | ||
82 | auto& animatable = game_.getEntityManager(). | 82 | auto& pondering = game_.getSystemManager().getSystem<PonderingSystem>(); |
83 | getComponent<AnimatableComponent>(player); | ||
84 | |||
85 | auto& ponderable = game_.getEntityManager(). | ||
86 | getComponent<PonderableComponent>(player); | ||
87 | 83 | ||
88 | auto& realizing = game_.getSystemManager().getSystem<RealizingSystem>(); | 84 | auto& realizing = game_.getSystemManager().getSystem<RealizingSystem>(); |
89 | 85 | ||
@@ -105,6 +101,8 @@ void PlayingSystem::changeMap( | |||
105 | playable.mapId = newMapEntity; | 101 | playable.mapId = newMapEntity; |
106 | } | 102 | } |
107 | 103 | ||
104 | pondering.unferry(player); | ||
105 | |||
108 | transformable.x = x; | 106 | transformable.x = x; |
109 | transformable.y = y; | 107 | transformable.y = y; |
110 | 108 | ||