makes the player invulnerable
| 1601 | |
| 1602 | // makes the player invulnerable |
| 1603 | void MakePlayerVulnerable(int slot) { |
| 1604 | ASSERT(slot >= 0 && slot < MAX_PLAYERS); |
| 1605 | // Play sound maybe. |
| 1606 | Players[slot].flags &= ~PLAYER_FLAGS_INVULNERABLE; |
| 1607 | Players[slot].invulnerable_time = 0.0f; |
| 1608 | |
| 1609 | if (Players[slot].flags & PLAYER_FLAGS_PLAYSOUNDMSGFORINVULN) { |
| 1610 | static int inv_sound_off_id = -1; |
| 1611 | if (inv_sound_off_id == -1) |
| 1612 | inv_sound_off_id = FindSoundName("Invulnerability off"); |
| 1613 | |
| 1614 | if (inv_sound_off_id != -1) |
| 1615 | Sound_system.Play3dSound(inv_sound_off_id, &Objects[Players[slot].objnum], MAX_GAME_VOLUME / 2); |
| 1616 | |
| 1617 | if (slot == Player_num) { |
| 1618 | AddHUDMessage(TXT_INVULNOFF); |
| 1619 | } |
| 1620 | } |
| 1621 | } |
| 1622 | |
| 1623 | // Performs the player death sequence. |
| 1624 |
no test coverage detected