MCPcopy Create free account
hub / github.com/Norbyte/ositools / StatusPreventApply

Function StatusPreventApply

OsiInterface/Functions/StatusFunctions.cpp:263–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261 }
262
263 void StatusPreventApply(OsiArgumentDesc const & args)
264 {
265 auto gameObject = FindGameObjectByNameGuid(args[0].String);
266 auto statusHandle = ObjectHandle{ args[1].Int64 };
267 auto preventApply = args[2].Int32;
268
269 if (gameObject == nullptr) {
270 OsiError("Game object " << args[0].String << " does not exist!");
271 return;
272 }
273
274 ObjectHandle gameObjectHandle;
275 gameObject->GetObjectHandle(&gameObjectHandle);
276
277 auto status = gPendingStatuses.Find(gameObjectHandle, statusHandle);
278 if (status == nullptr) {
279 OsiError("No pending status found with handle " << (int64_t)statusHandle);
280 return;
281 }
282
283 status->PreventApply = (preventApply != 0);
284 }
285
286 template <class T>
287 T * ConstructStatus(esv::StatusMachine * statusMachine, char const * statusId, StatusType type)

Callers

nothing calls this directly

Calls 2

FindGameObjectByNameGuidFunction · 0.85
FindMethod · 0.45

Tested by

no test coverage detected