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/pondering.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/systems/pondering.h') diff --git a/src/systems/pondering.h b/src/systems/pondering.h index b195814..adc0cda 100644 --- a/src/systems/pondering.h +++ b/src/systems/pondering.h @@ -16,8 +16,22 @@ public: void initializeBody(id_type entity, PonderableComponent::Type type); + /** + * Initializes a ponderable map object from its prototype data. + * + * @requires entity is ponderable + * @requires entity is a map object + */ void initPrototype(id_type prototype); + /** + * Unferries an entity if it is a passenger of another entity. Use before + * moving a ponderable entity outside the PonderingSystem. + * + * @requires entity is ponderable + */ + void unferry(id_type entity); + private: struct CollisionResult -- cgit 1.4.1