* Plays the death sound. */
| 293 | * Plays the death sound. |
| 294 | */ |
| 295 | void UnitDieBState::playDeathSound() |
| 296 | { |
| 297 | if ((_unit->getType() == "SOLDIER" && _unit->getGender() == GENDER_MALE) || _unit->getType() == "MALE_CIVILIAN") |
| 298 | { |
| 299 | _parent->getResourcePack()->getSound("BATTLE.CAT", RNG::generate(41,43))->play(); |
| 300 | } |
| 301 | else if ((_unit->getType() == "SOLDIER" && _unit->getGender() == GENDER_FEMALE) || _unit->getType() == "FEMALE_CIVILIAN") |
| 302 | { |
| 303 | _parent->getResourcePack()->getSound("BATTLE.CAT", RNG::generate(44,46))->play(); |
| 304 | } |
| 305 | else |
| 306 | { |
| 307 | _parent->getResourcePack()->getSound("BATTLE.CAT", _unit->getDeathSound())->play(); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | } |
nothing calls this directly
no test coverage detected