MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / CALifeSimulator__release

Function CALifeSimulator__release

ogsr_engine/xrGame/alife_simulator_script.cpp:247–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void CALifeSimulator__release(CALifeSimulator* self, CSE_Abstract* object, bool)
248{
249 VERIFY(self);
250 // self->release (object,true);
251
252 R_ASSERT(object);
253 CSE_ALifeObject* alife_object = smart_cast<CSE_ALifeObject*>(object);
254 THROW(alife_object);
255 if (!alife_object->m_bOnline)
256 {
257 self->release(object, true);
258 return;
259 }
260
261 CGameObject* pGameObject = smart_cast<CGameObject*>(Level().Objects.net_Find(alife_object->ID));
262 if (pGameObject)
263 {
264 pGameObject->DestroyObject();
265 }
266 else
267 {
268 // awful hack, for stohe only
269 NET_Packet packet;
270 packet.w_begin(M_EVENT);
271 packet.w_u32(Level().timeServer());
272 packet.w_u16(GE_DESTROY);
273 packet.w_u16(object->ID);
274 Level().Send(packet, net_flags(TRUE, TRUE));
275 }
276}
277
278void CALifeSimulator__assign_story_id(CALifeSimulator* self, ALife::_OBJECT_ID _id, ALife::_STORY_ID _story_id)
279{

Callers

nothing calls this directly

Calls 7

net_flagsFunction · 0.85
w_beginMethod · 0.80
releaseMethod · 0.45
DestroyObjectMethod · 0.45
w_u32Method · 0.45
w_u16Method · 0.45
SendMethod · 0.45

Tested by

no test coverage detected