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

Function MultiMakePlayerReal

Descent3/multi.cpp:2923–2945  ·  view source on GitHub ↗

Makes the passed in player real (non-ghost)

Source from the content-addressed store, hash-verified

2921
2922// Makes the passed in player real (non-ghost)
2923void MultiMakePlayerReal(int slot) {
2924 object *obj = &Objects[Players[slot].objnum];
2925 MULTI_ASSERT(obj->id == slot, NULL); // Get Jason
2926
2927 obj->type = OBJ_PLAYER;
2928
2929 if (Demo_flags == DF_RECORDING) {
2930 DemoWritePlayerTypeChange(slot);
2931 }
2932
2933 obj->render_type = RT_POLYOBJ;
2934 obj->mtype.phys_info.flags &= ~PF_NO_COLLIDE;
2935
2936 if (slot == Player_num) {
2937 SetObjectControlType(obj, CT_FLYING);
2938 obj->movement_type = MT_PHYSICS;
2939 Viewer_object = Player_object = obj;
2940 } else {
2941 obj->movement_type = MT_PHYSICS;
2942 obj->mtype.phys_info.flags = PF_FIXED_VELOCITY;
2943 SetObjectControlType(obj, CT_NONE);
2944 }
2945}
2946
2947// Server is telling us that its done sending players
2948void MultiDoDonePlayers(uint8_t *data) {

Callers 4

MultiDoPlayerFunction · 0.85
MultiDoPlayerEnteredGameFunction · 0.85
DemoReadPlayerTypeChangeFunction · 0.85
ResetPlayerObjectFunction · 0.85

Calls 2

SetObjectControlTypeFunction · 0.85

Tested by

no test coverage detected