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

Function InitiatePlayerDeath

Descent3/Player.cpp:2063–2075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2061void PlayerShipSpewPart(object *obj, int subobjnum, float magnitude);
2062
2063void InitiatePlayerDeath(object *playerobj, bool melee, int fate) {
2064 if (!(Players[playerobj->id].flags & (PLAYER_FLAGS_DEAD + PLAYER_FLAGS_DYING))) {
2065 // player is dying. We don't want to make player dead yet.
2066 Players[playerobj->id].flags |= PLAYER_FLAGS_DYING;
2067
2068 // Take care of stuff that should happen when you die
2069 ClearPlayerFiring(playerobj, PW_PRIMARY);
2070 ClearPlayerFiring(playerobj, PW_SECONDARY);
2071
2072 // Start the death sequence
2073 StartPlayerDeath(playerobj->id, -playerobj->shields, melee, fate);
2074 }
2075}
2076
2077// Chooses the style of death a player is going to use
2078int PlayerChooseDeathFate(int slot, float damage, bool melee) {

Callers 4

MultiDoPlayerFunction · 0.85
MultiDoPlayerDeadFunction · 0.85
KillPlayerFunction · 0.85
DemoReadPlayerDeathFunction · 0.85

Calls 2

ClearPlayerFiringFunction · 0.85
StartPlayerDeathFunction · 0.85

Tested by

no test coverage detected