Skip to content

Commit 65af8e2

Browse files
committed
Clean up UnitSprite
1 parent 8fb1cb9 commit 65af8e2

3 files changed

Lines changed: 212 additions & 235 deletions

File tree

‎src/Battlescape/Map.cpp‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,22 +1561,6 @@ void Map::cacheUnit(BattleUnit *unit)
15611561
}
15621562

15631563
unitSprite->setBattleUnit(unit, i);
1564-
1565-
BattleItem *rhandItem = unit->getItem("STR_RIGHT_HAND");
1566-
BattleItem *lhandItem = unit->getItem("STR_LEFT_HAND");
1567-
if (rhandItem && !rhandItem->getRules()->isFixed())
1568-
{
1569-
unitSprite->setBattleItem(rhandItem);
1570-
}
1571-
if (lhandItem && !lhandItem->getRules()->isFixed())
1572-
{
1573-
unitSprite->setBattleItem(lhandItem);
1574-
}
1575-
1576-
if (!lhandItem && !rhandItem)
1577-
{
1578-
unitSprite->setBattleItem(0);
1579-
}
15801564
unitSprite->setSurfaces(_game->getMod()->getSurfaceSet(unit->getArmor()->getSpriteSheet()),
15811565
_game->getMod()->getSurfaceSet("HANDOB.PCK"),
15821566
_game->getMod()->getSurfaceSet("HANDOB2.PCK"));

0 commit comments

Comments
 (0)