MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / MultiDoPlayerDead

Function MultiDoPlayerDead

Descent3/multi.cpp:4720–4735  ·  view source on GitHub ↗

Starts a death sequence of a player

Source from the content-addressed store, hash-verified

4718
4719// Starts a death sequence of a player
4720void 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
4738void MultiSendPlayerDead(int slot, uint8_t fate) {

Callers 2

MultiSendPlayerDeadFunction · 0.85
MultiProcessDataFunction · 0.85

Calls 4

SKIP_HEADERFunction · 0.85
MultiGetByteFunction · 0.85
InitiatePlayerDeathFunction · 0.85
StopSoundLoopingMethod · 0.80

Tested by

no test coverage detected