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

Function MultiIsValidMovedObject

Descent3/multi_server.cpp:1236–1257  ·  view source on GitHub ↗

Returns true if we should send an update about this object

Source from the content-addressed store, hash-verified

1234
1235// Returns true if we should send an update about this object
1236bool MultiIsValidMovedObject(object *obj) {
1237 bool good = false;
1238
1239 if (obj->type == OBJ_ROBOT || obj->type == OBJ_CLUTTER || obj->type == OBJ_BUILDING)
1240 good = true;
1241
1242 if (good == true) {
1243 if (obj->flags & (OF_DEAD))
1244 good = false;
1245 if (!(obj->flags & OF_CLIENT_KNOWS))
1246 good = false;
1247
1248 // Still going? Good!
1249 if (good == true) {
1250 if (obj->movement_type == MT_WALKING || obj->movement_type == MT_PHYSICS)
1251 return true;
1252 }
1253 }
1254
1255 // Didn't pass all the tests else it wouldn't make it this fare
1256 return false;
1257}
1258
1259void MultiSendJoinDemoObjects(int slot) {
1260 uint8_t data[MAX_GAME_DATA_SIZE];

Callers 3

MultiSendJoinObjectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected