Starts a death sequence of a player
| 4718 | |
| 4719 | // Starts a death sequence of a player |
| 4720 | void MultiDoPlayerDead(uint8_t *data) { |
| 4721 | int count = 0; |
| 4722 | |
| 4723 | SKIP_HEADER(data, &count); |
| 4724 | int slot = MultiGetByte(data, &count); |
| 4725 | int fate = MultiGetByte(data, &count); |
| 4726 | |
| 4727 | Players[slot].damage_magnitude = 0; |
| 4728 | Players[slot].edrain_magnitude = 0; |
| 4729 | |
| 4730 | InitiatePlayerDeath(&Objects[Players[slot].objnum], false, fate); |
| 4731 | if (Objects[Players[slot].objnum].effect_info->sound_handle != SOUND_NONE_INDEX) { |
| 4732 | Sound_system.StopSoundLooping(Objects[Players[slot].objnum].effect_info->sound_handle); |
| 4733 | Objects[Players[slot].objnum].effect_info->sound_handle = SOUND_NONE_INDEX; |
| 4734 | } |
| 4735 | } |
| 4736 | |
| 4737 | // The server sends to everyone that the player is dead |
| 4738 | void MultiSendPlayerDead(int slot, uint8_t fate) { |
no test coverage detected