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

Function MultiMakePlayerGhost

Descent3/multi.cpp:2903–2920  ·  view source on GitHub ↗

Makes the passed in player a ghost

Source from the content-addressed store, hash-verified

2901
2902// Makes the passed in player a ghost
2903void MultiMakePlayerGhost(int slot) {
2904 object *obj = &Objects[Players[slot].objnum];
2905
2906 MULTI_ASSERT(obj->id == slot, NULL); // Get Jason
2907
2908 obj->type = OBJ_GHOST;
2909 obj->movement_type = MT_NONE;
2910 obj->render_type = RT_NONE;
2911 obj->mtype.phys_info.flags |= PF_NO_COLLIDE;
2912 SetObjectControlType(obj, CT_NONE);
2913
2914 if (Demo_flags == DF_RECORDING) {
2915 DemoWritePlayerTypeChange(slot);
2916 }
2917
2918 // Stop sounds for this player
2919 PlayerStopSounds(slot);
2920}
2921
2922// Makes the passed in player real (non-ghost)
2923void MultiMakePlayerReal(int slot) {

Callers 7

MultiDoPlayerFunction · 0.85
MultiDoLeaveGameFunction · 0.85
MultiDoDisconnectFunction · 0.85
MultiMassageAllObjectsFunction · 0.85
MultiDisconnectPlayerFunction · 0.85
DemoReadPlayerTypeChangeFunction · 0.85
PlayerShipExplodeFunction · 0.85

Calls 3

SetObjectControlTypeFunction · 0.85
PlayerStopSoundsFunction · 0.85

Tested by

no test coverage detected