- changed TextMsg to return a bool

- fixed a bug where you couldn't send messages from post hooks
- added protection in functions which expect StartMessage to succeed

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401138
This commit is contained in:
David Anderson
2007-07-19 00:34:44 +00:00
parent 0069612c95
commit 3fdc205544
5 changed files with 21 additions and 8 deletions
+8 -2
View File
@@ -284,7 +284,10 @@ static cell_t PrintToChat(IPluginContext *pContext, const cell_t *params)
return 0;
}
g_HL2.TextMsg(client, HUD_PRINTTALK, buffer);
if (!g_HL2.TextMsg(client, HUD_PRINTTALK, buffer))
{
return pContext->ThrowNativeError("Could not send a usermessage");
}
return 1;
}
@@ -315,7 +318,10 @@ static cell_t PrintCenterText(IPluginContext *pContext, const cell_t *params)
return 0;
}
g_HL2.TextMsg(client, HUD_PRINTCENTER, buffer);
if (!g_HL2.TextMsg(client, HUD_PRINTCENTER, buffer))
{
return pContext->ThrowNativeError("Could not send a usermessage");
}
return 1;
}