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

Function VerifyMSafeObject

Descent3/multisafe_server.cpp:42–51  ·  view source on GitHub ↗

Makes sure the sever objnum passed in is actually real on our machine Also turns it into and object handle

Source from the content-addressed store, hash-verified

40// Makes sure the sever objnum passed in is actually real on our machine
41// Also turns it into and object handle
42int VerifyMSafeObject(int objnum) {
43 int objectnum = Server_object_list[objnum];
44
45 if (objectnum == 65535 || !(Objects[objectnum].flags & OF_SERVER_OBJECT)) {
46 Int3(); // Get Jason, got a bad object with msafe
47 return OBJECT_HANDLE_NONE;
48 }
49
50 return Objects[objectnum].handle;
51}
52
53// This is a bit ugly, but I didn't want to totally change the way the msafe calls work.
54// this bool tells msafe if it's ok to process a call even though it's playing back a demo.

Callers 2

MultiDoMSafeFunctionFunction · 0.85
MultiDoMSafePowerupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected