MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / EndMessage

Method EndMessage

core/UserMessages.cpp:305–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305bool UserMessages::EndMessage()
306{
307 if (!m_InExec)
308 {
309 return false;
310 }
311
312#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
313 if (m_CurFlags & USERMSG_BLOCKHOOKS)
314 {
315 ENGINE_CALL(SendUserMessage)(static_cast<IRecipientFilter &>(m_CellRecFilter), m_CurId, *m_FakeEngineBuffer);
316 delete m_FakeEngineBuffer;
317 m_FakeEngineBuffer = NULL;
318 } else {
319 OnMessageEnd_Pre();
320
321 switch (m_FakeMetaRes)
322 {
323 case MRES_IGNORED:
324 case MRES_HANDLED:
325 case MRES_OVERRIDE:
326 engine->SendUserMessage(static_cast<IRecipientFilter &>(m_CellRecFilter), m_CurId, *m_FakeEngineBuffer);
327 delete m_FakeEngineBuffer;
328 m_FakeEngineBuffer = NULL;
329 break;
330 //case MRES_SUPERCEDE:
331 }
332
333 OnMessageEnd_Post();
334 }
335#else
336 if (m_CurFlags & USERMSG_BLOCKHOOKS)
337 {
338 ENGINE_CALL(MessageEnd)();
339 } else {
340 engine->MessageEnd();
341 }
342#endif // SE_CSGO || SE_BLADE || SE_MCV
343
344 m_InExec = false;
345 m_CurFlags = 0;
346 m_CellRecFilter.Reset();
347
348 return true;
349}
350
351UserMessageType UserMessages::GetUserMessageType() const
352{

Callers 6

smn_EndMessageFunction · 0.80
TextMsgMethod · 0.80
HintTextMsgMethod · 0.80
ShowVGUIMenuMethod · 0.80
UTIL_SendHudTextFunction · 0.80
Radio_RefreshMethod · 0.80

Calls 1

ResetMethod · 0.45

Tested by

no test coverage detected