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

Function DemoWriteChangedObjects

Descent3/demofile.cpp:499–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

497}
498
499void DemoWriteChangedObjects() {
500 int i;
501 // int num_changed = 0;
502 if (Demo_flags == DF_RECORDING) {
503 for (i = 0; i <= Highest_object_index; i++) {
504
505 if ((Objects[i].type == OBJ_PLAYER) || (Objects[i].type == OBJ_OBSERVER) || (Objects[i].type == OBJ_ROBOT) ||
506 (Objects[i].type == OBJ_POWERUP) || (Objects[i].type == OBJ_CLUTTER) || (Objects[i].type == OBJ_BUILDING) ||
507 (Objects[i].type == OBJ_CAMERA)) {
508 if ((Objects[i].flags & OF_MOVED_THIS_FRAME)) //||(Objects[i].mtype.phys_info.velocity!=Zero_vector))
509 {
510 // mprintf(0,"Object moved this frame! type = %d\n",Objects[i].type);
511 DemoWriteChangedObj(&Objects[i]);
512 // num_changed++;
513 }
514 }
515 }
516 // if(num_changed)
517 // mprintf(0,"%d Objects moved this frame!\n",num_changed);
518 }
519}
520
521void DemoWriteObjCreate(uint8_t type, uint16_t id, int roomnum, vector *pos, const matrix *orient, int parent_handle,
522 object *obj) {

Callers 1

GameFrameFunction · 0.85

Calls 1

DemoWriteChangedObjFunction · 0.85

Tested by

no test coverage detected