Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarHumanoid.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-28 20:29:05 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-28 20:29:05 +1000
commit322ee3a187b8e71a2d322a3ed1a7e18abfed1c16 (patch)
tree47855d0084cd658baf50d245af85b656e621623d /source/game/StarHumanoid.cpp
parent9f2a025889aae1035c0db166b1f8dfe7fb45fdc3 (diff)
Fix non-rotated drawables still being included when calling Humanoid::render with items off
Diffstat (limited to 'source/game/StarHumanoid.cpp')
-rw-r--r--source/game/StarHumanoid.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/game/StarHumanoid.cpp b/source/game/StarHumanoid.cpp
index 9f6f8a3..d296842 100644
--- a/source/game/StarHumanoid.cpp
+++ b/source/game/StarHumanoid.cpp
@@ -749,10 +749,12 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
addDrawable(Drawable::makeImage(AssetPath::split(image), 1.0f / TilePixels, true, {}));
}
- if (m_primaryHand.nonRotatedDrawables.size())
- drawables.insertAllAt(0, m_primaryHand.nonRotatedDrawables);
- if (m_altHand.nonRotatedDrawables.size())
- drawables.insertAllAt(0, m_altHand.nonRotatedDrawables);
+ if (withItems) {
+ if (m_primaryHand.nonRotatedDrawables.size())
+ drawables.insertAllAt(0, m_primaryHand.nonRotatedDrawables);
+ if (m_altHand.nonRotatedDrawables.size())
+ drawables.insertAllAt(0, m_altHand.nonRotatedDrawables);
+ }
if (withRotation)
Drawable::rotateAll(drawables, m_rotation);