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

Function DemoWriteChangedObj

Descent3/demofile.cpp:455–468  ·  view source on GitHub ↗

Store object num, position, orientation WB info, Anim states

Source from the content-addressed store, hash-verified

453// Store object num, position, orientation
454// WB info, Anim states
455void DemoWriteChangedObj(object *op) {
456 ASSERT(op);
457 if (Demo_flags == DF_RECORDING) {
458 gs_WriteByte(Demo_cfp, DT_OBJ);
459 cf_WriteShort(Demo_cfp, OBJNUM(op));
460 // positional information
461 gs_WriteInt(Demo_cfp, op->roomnum);
462 gs_WriteVector(Demo_cfp, op->pos);
463 gs_WriteMatrix(Demo_cfp, op->orient);
464 if (op->type == OBJ_PLAYER || op->type == OBJ_OBSERVER) {
465 gs_WriteInt(Demo_cfp, Players[op->id].flags);
466 }
467 }
468}
469
470void DemoWriteWeaponFire(uint16_t objectnum, vector *pos, vector *dir, uint16_t weaponnum,
471 uint16_t weapobjnum, int16_t gunnum) {

Callers 3

MultiDoRenewPlayerFunction · 0.85
ObjSetPosAndMarkMovedFunction · 0.85
DemoWriteChangedObjectsFunction · 0.85

Calls 1

cf_WriteShortFunction · 0.85

Tested by

no test coverage detected