Browse Source

Move definition to thingtype.cpp file

Move definition from thingtype.h to thingtype.cpp file
EgzoT 3 years ago
parent
commit
5650db7ba2
No account linked to committer's email address
2 changed files with 9 additions and 1 deletions
  1. 8
    0
      src/client/thingtype.cpp
  2. 1
    1
      src/client/thingtype.h

+ 8
- 0
src/client/thingtype.cpp View File

@@ -564,3 +564,11 @@ int ThingType::getExactSize(int layer, int xPattern, int yPattern, int zPattern,
564 564
     Size size = m_texturesFramesOriginRects[animationPhase][frameIndex].size() - m_texturesFramesOffsets[animationPhase][frameIndex].toSize();
565 565
     return std::max<int>(size.width(), size.height());
566 566
 }
567
+
568
+void ThingType::setPathable(bool var)
569
+{
570
+    if(var == true)
571
+        m_attribs.remove(ThingAttrNotPathable);
572
+    else
573
+        m_attribs.set(ThingAttrNotPathable, true);
574
+}

+ 1
- 1
src/client/thingtype.h View File

@@ -178,7 +178,7 @@ public:
178 178
     bool isNotMoveable() { return m_attribs.has(ThingAttrNotMoveable); }
179 179
     bool blockProjectile() { return m_attribs.has(ThingAttrBlockProjectile); }
180 180
     bool isNotPathable() { return m_attribs.has(ThingAttrNotPathable); }
181
-	void setPathable(bool var) { var == true ? m_attribs.remove(ThingAttrNotPathable) : m_attribs.set(ThingAttrNotPathable, true); }
181
+	void setPathable(bool var);
182 182
     bool isPickupable() { return m_attribs.has(ThingAttrPickupable); }
183 183
     bool isHangable() { return m_attribs.has(ThingAttrHangable); }
184 184
     bool isHookSouth() { return m_attribs.has(ThingAttrHookSouth); }

Loading…
Cancel
Save