Removed code now dead from CS:S Orange Box move (bug 4399, r=ds).
Removed code now dead from CS:S Orange Box move (
bug 4399, r=ds).
1.1 --- a/extensions/cstrike/extension.cpp Wed Jun 23 23:49:06 2010 -0400
1.2 +++ b/extensions/cstrike/extension.cpp Wed Jun 23 23:35:28 2010 -0700
1.3 @@ -76,11 +76,6 @@
1.4 sharesys->AddNatives(myself, g_CSNatives);
1.5 sharesys->RegisterLibrary(myself, "cstrike");
1.6
1.7 - if ((g_msgHintText = usermsgs->GetMessageIndex("HintText")) != -1)
1.8 - {
1.9 - sharesys->OverrideNatives(myself, g_CS_PrintHintText);
1.10 - }
1.11 -
1.12 playerhelpers->RegisterCommandTargetProcessor(this);
1.13
1.14 return true;
2.1 --- a/extensions/cstrike/extension.h Wed Jun 23 23:49:06 2010 -0400
2.2 +++ b/extensions/cstrike/extension.h Wed Jun 23 23:35:28 2010 -0700
2.3 @@ -130,6 +130,5 @@
2.4 extern IBinTools *g_pBinTools;
2.5 extern IGameConfig *g_pGameConf;
2.6 extern int g_msgHintText;
2.7 -extern sp_nativeinfo_t g_CS_PrintHintText[];
2.8
2.9 #endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_
3.1 --- a/extensions/cstrike/natives.cpp Wed Jun 23 23:49:06 2010 -0400
3.2 +++ b/extensions/cstrike/natives.cpp Wed Jun 23 23:35:28 2010 -0700
3.3 @@ -71,45 +71,6 @@
3.4 return pUnk->GetBaseEntity();
3.5 }
3.6
3.7 -static cell_t CS_PrintHintText(IPluginContext *pContext, const cell_t *params)
3.8 -{
3.9 - int client = params[1];
3.10 - IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(params[1]);
3.11 -
3.12 - if (!pPlayer)
3.13 - {
3.14 - return pContext->ThrowNativeError("Client index %d is invalid", client);
3.15 - }
3.16 -
3.17 - if (!pPlayer->IsInGame())
3.18 - {
3.19 - return pContext->ThrowNativeError("Client %d is not in game", client);
3.20 - }
3.21 -
3.22 - g_pSM->SetGlobalTarget(client);
3.23 -
3.24 - char buffer[192];
3.25 - g_pSM->FormatString(buffer, sizeof(buffer), pContext, params, 2);
3.26 -
3.27 - /* Check for an error before printing to the client */
3.28 - if (pContext->GetLastNativeError() != SP_ERROR_NONE)
3.29 - {
3.30 - return 0;
3.31 - }
3.32 -
3.33 - bf_write *pBitBuf = usermsgs->StartMessage(g_msgHintText, ¶ms[1], 1, USERMSG_RELIABLE);
3.34 - if (pBitBuf == NULL)
3.35 - {
3.36 - return pContext->ThrowNativeError("Could not send a usermessage");
3.37 - }
3.38 - pBitBuf->WriteByte(1);
3.39 - pBitBuf->WriteString(buffer);
3.40 - usermsgs->EndMessage();
3.41 -
3.42 - return 1;
3.43 -}
3.44 -
3.45 -
3.46 static cell_t CS_RespawnPlayer(IPluginContext *pContext, const cell_t *params)
3.47 {
3.48 static ICallWrapper *pWrapper = NULL;
3.49 @@ -166,8 +127,3 @@
3.50 {NULL, NULL}
3.51 };
3.52
3.53 -sp_nativeinfo_t g_CS_PrintHintText[] =
3.54 -{
3.55 - {"PrintHintText", CS_PrintHintText},
3.56 - {NULL, NULL},
3.57 -};