* Determines which weapons to display in the case of two-handed weapons. */
| 1186 | * Determines which weapons to display in the case of two-handed weapons. |
| 1187 | */ |
| 1188 | void UnitSprite::sortRifles() |
| 1189 | { |
| 1190 | if (_itemA && _itemA->getRules()->isTwoHanded()) |
| 1191 | { |
| 1192 | if (_itemB && _itemB->getRules()->isTwoHanded()) |
| 1193 | { |
| 1194 | if (_unit->getActiveHand() == "STR_LEFT_HAND") |
| 1195 | { |
| 1196 | _itemA = _itemB; |
| 1197 | } |
| 1198 | _itemB = 0; |
| 1199 | } |
| 1200 | else if (_unit->getStatus() != STATUS_AIMING) |
| 1201 | { |
| 1202 | _itemB = 0; |
| 1203 | } |
| 1204 | } |
| 1205 | else if (_itemB && _itemB->getRules()->isTwoHanded()) |
| 1206 | { |
| 1207 | if (_unit->getStatus() != STATUS_AIMING) |
| 1208 | { |
| 1209 | _itemA = 0; |
| 1210 | } |
| 1211 | } |
| 1212 | } |
| 1213 | |
| 1214 | } |
nothing calls this directly
no test coverage detected