From 5650db7ba23194f389e6f2f59079edfbbbe7376b Mon Sep 17 00:00:00 2001 From: EgzoT Date: Wed, 15 Nov 2017 02:20:33 +0100 Subject: [PATCH] Move definition to thingtype.cpp file Move definition from thingtype.h to thingtype.cpp file --- src/client/thingtype.cpp | 8 ++++++++ src/client/thingtype.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/client/thingtype.cpp b/src/client/thingtype.cpp index 7a9fb5b1..28d6b3b6 100644 --- a/src/client/thingtype.cpp +++ b/src/client/thingtype.cpp @@ -564,3 +564,11 @@ int ThingType::getExactSize(int layer, int xPattern, int yPattern, int zPattern, Size size = m_texturesFramesOriginRects[animationPhase][frameIndex].size() - m_texturesFramesOffsets[animationPhase][frameIndex].toSize(); return std::max(size.width(), size.height()); } + +void ThingType::setPathable(bool var) +{ + if(var == true) + m_attribs.remove(ThingAttrNotPathable); + else + m_attribs.set(ThingAttrNotPathable, true); +} \ No newline at end of file diff --git a/src/client/thingtype.h b/src/client/thingtype.h index b8709574..ee362e95 100644 --- a/src/client/thingtype.h +++ b/src/client/thingtype.h @@ -178,7 +178,7 @@ public: bool isNotMoveable() { return m_attribs.has(ThingAttrNotMoveable); } bool blockProjectile() { return m_attribs.has(ThingAttrBlockProjectile); } bool isNotPathable() { return m_attribs.has(ThingAttrNotPathable); } - void setPathable(bool var) { var == true ? m_attribs.remove(ThingAttrNotPathable) : m_attribs.set(ThingAttrNotPathable, true); } + void setPathable(bool var); bool isPickupable() { return m_attribs.has(ThingAttrPickupable); } bool isHangable() { return m_attribs.has(ThingAttrHangable); } bool isHookSouth() { return m_attribs.has(ThingAttrHookSouth); }