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

Function MultiDoGhostObject

Descent3/multi.cpp:8158–8183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8156}
8157
8158void MultiDoGhostObject(uint8_t *data) {
8159 int count = 0;
8160 SKIP_HEADER(data, &count);
8161
8162 uint16_t server_objnum, objnum;
8163 bool ghost;
8164
8165 server_objnum = MultiGetUshort(data, &count);
8166 ghost = (MultiGetByte(data, &count)) ? true : false;
8167
8168 objnum = Server_object_list[server_objnum];
8169
8170 if (objnum == 65535) {
8171 Int3(); // Get Jason, bad object number
8172 return;
8173 }
8174
8175 MULTI_ASSERT_NOMESSAGE(objnum != -1);
8176 MULTI_ASSERT_NOMESSAGE(Objects[objnum].type != OBJ_NONE);
8177
8178 if (ghost) {
8179 ObjGhostObject(objnum);
8180 } else {
8181 ObjUnGhostObject(objnum);
8182 }
8183}
8184
8185// Sends a ping request to a player
8186void MultiSendPing(int slot) {

Callers 1

MultiProcessDataFunction · 0.85

Calls 5

SKIP_HEADERFunction · 0.85
MultiGetUshortFunction · 0.85
MultiGetByteFunction · 0.85
ObjGhostObjectFunction · 0.85
ObjUnGhostObjectFunction · 0.85

Tested by

no test coverage detected