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

Function MultiClearPlayerMarkers

Descent3/multi_server.cpp:1009–1018  ·  view source on GitHub ↗

Clears all the player markers belonging to a particular slot

Source from the content-addressed store, hash-verified

1007
1008// Clears all the player markers belonging to a particular slot
1009void MultiClearPlayerMarkers(int slot) {
1010 int m1 = slot * 2;
1011 int m2 = (slot * 2) + 1;
1012
1013 for (int i = 0; i <= Highest_object_index; i++) {
1014 if (Objects[i].type == OBJ_MARKER && (Objects[i].id == m1 || Objects[i].id == m2)) {
1015 SetObjectDeadFlag(&Objects[i], true, false);
1016 }
1017 }
1018}
1019
1020// Tells our clients that a player disconnected
1021void MultiSendPlayerDisconnect(int slot) {

Callers 2

MultiDoLeaveGameFunction · 0.85
MultiDisconnectPlayerFunction · 0.85

Calls 1

SetObjectDeadFlagFunction · 0.85

Tested by

no test coverage detected