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

Method cl_Process_Event

ogsr_engine/xrGame/Level.cpp:309–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307BOOL g_bDebugEvents = FALSE;
308
309void CLevel::cl_Process_Event(u16 dest, u16 type, NET_Packet& P)
310{
311 // Msg ("--- event[%d] for [%d]",type,dest);
312 CObject* O = Objects.net_Find(dest);
313 if (0 == O)
314 {
315#ifdef DEBUG
316 Msg("* WARNING: c_EVENT[%d] to [%d]: unknown dest", type, dest);
317#endif // DEBUG
318 ProcessGameSpawnsDestroy(dest, type, P);
319 return;
320 }
321 CGameObject* GO = smart_cast<CGameObject*>(O);
322 if (!GO)
323 {
324 Msg("! ERROR: c_EVENT[%d] : non-game-object", dest);
325 return;
326 }
327
328 if (type == GE_DESTROY)
329 Game().OnDestroy(GO);
330
331 GO->OnEvent(P, type);
332}
333
334void CLevel::ProcessGameEvents()
335{

Callers

nothing calls this directly

Calls 3

MsgFunction · 0.85
OnDestroyMethod · 0.45
OnEventMethod · 0.45

Tested by

no test coverage detected