| 307 | BOOL g_bDebugEvents = FALSE; |
| 308 | |
| 309 | void 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 | |
| 334 | void CLevel::ProcessGameEvents() |
| 335 | { |