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

Function MultiGetMatchChecksum

Descent3/multi.cpp:6606–6626  ·  view source on GitHub ↗

Returns the unique id of a given object type/id

Source from the content-addressed store, hash-verified

6604
6605// Returns the unique id of a given object type/id
6606uint32_t MultiGetMatchChecksum(int type, int id) {
6607 switch (type) {
6608 case OBJ_POWERUP:
6609 case OBJ_ROBOT:
6610 case OBJ_CLUTTER:
6611 case OBJ_BUILDING:
6612 return Multi_generic_match_table[id];
6613 break;
6614 case OBJ_WEAPON:
6615 return Multi_weapon_match_table[id];
6616 break;
6617 case OBJ_MARKER:
6618 return id;
6619 break;
6620 default:
6621 Int3(); // Get Jason
6622 }
6623
6624 Error("Invalid type/id combo in MultiGetMatchChecksum");
6625 return -1;
6626}
6627
6628// Return index of generic that has matching table entry
6629int MultiMatchGeneric(uint32_t unique_id) {

Callers 8

MultiSendRobotFireWeaponFunction · 0.85
MultiSendObjectFunction · 0.85
StuffObjectIntoPacketFunction · 0.85
DemoWriteWeaponFireFunction · 0.85
MultiAddTypeIDFunction · 0.85

Calls 1

ErrorFunction · 0.85

Tested by

no test coverage detected