Fix non-rotated drawables still being included when calling Humanoid::render with items off

This commit is contained in:
Kae 2023-06-28 20:29:05 +10:00
parent 9f2a025889
commit 322ee3a187

View File

@ -749,10 +749,12 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
addDrawable(Drawable::makeImage(AssetPath::split(image), 1.0f / TilePixels, true, {})); addDrawable(Drawable::makeImage(AssetPath::split(image), 1.0f / TilePixels, true, {}));
} }
if (withItems) {
if (m_primaryHand.nonRotatedDrawables.size()) if (m_primaryHand.nonRotatedDrawables.size())
drawables.insertAllAt(0, m_primaryHand.nonRotatedDrawables); drawables.insertAllAt(0, m_primaryHand.nonRotatedDrawables);
if (m_altHand.nonRotatedDrawables.size()) if (m_altHand.nonRotatedDrawables.size())
drawables.insertAllAt(0, m_altHand.nonRotatedDrawables); drawables.insertAllAt(0, m_altHand.nonRotatedDrawables);
}
if (withRotation) if (withRotation)
Drawable::rotateAll(drawables, m_rotation); Drawable::rotateAll(drawables, m_rotation);