From f439cad46c2c3e71837acb2d470f5290a383a6df Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 23 Jun 2010 23:35:28 -0700 Subject: [PATCH] Removed code now dead from CS:S Orange Box move (bug 4399, r=ds). --- extensions/cstrike/extension.cpp | 5 ---- extensions/cstrike/extension.h | 1 - extensions/cstrike/natives.cpp | 44 -------------------------------- 3 files changed, 50 deletions(-) diff --git a/extensions/cstrike/extension.cpp b/extensions/cstrike/extension.cpp index 549df79e..fd82865d 100644 --- a/extensions/cstrike/extension.cpp +++ b/extensions/cstrike/extension.cpp @@ -76,11 +76,6 @@ bool CStrike::SDK_OnLoad(char *error, size_t maxlength, bool late) sharesys->AddNatives(myself, g_CSNatives); sharesys->RegisterLibrary(myself, "cstrike"); - if ((g_msgHintText = usermsgs->GetMessageIndex("HintText")) != -1) - { - sharesys->OverrideNatives(myself, g_CS_PrintHintText); - } - playerhelpers->RegisterCommandTargetProcessor(this); return true; diff --git a/extensions/cstrike/extension.h b/extensions/cstrike/extension.h index 2434ceb8..5b459866 100644 --- a/extensions/cstrike/extension.h +++ b/extensions/cstrike/extension.h @@ -130,6 +130,5 @@ public: extern IBinTools *g_pBinTools; extern IGameConfig *g_pGameConf; extern int g_msgHintText; -extern sp_nativeinfo_t g_CS_PrintHintText[]; #endif // _INCLUDE_SOURCEMOD_EXTENSION_PROPER_H_ diff --git a/extensions/cstrike/natives.cpp b/extensions/cstrike/natives.cpp index 776f1ae7..ed2e5ceb 100644 --- a/extensions/cstrike/natives.cpp +++ b/extensions/cstrike/natives.cpp @@ -71,45 +71,6 @@ inline CBaseEntity *GetCBaseEntity(int num, bool isplayer) return pUnk->GetBaseEntity(); } -static cell_t CS_PrintHintText(IPluginContext *pContext, const cell_t *params) -{ - int client = params[1]; - IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(params[1]); - - if (!pPlayer) - { - return pContext->ThrowNativeError("Client index %d is invalid", client); - } - - if (!pPlayer->IsInGame()) - { - return pContext->ThrowNativeError("Client %d is not in game", client); - } - - g_pSM->SetGlobalTarget(client); - - char buffer[192]; - g_pSM->FormatString(buffer, sizeof(buffer), pContext, params, 2); - - /* Check for an error before printing to the client */ - if (pContext->GetLastNativeError() != SP_ERROR_NONE) - { - return 0; - } - - bf_write *pBitBuf = usermsgs->StartMessage(g_msgHintText, ¶ms[1], 1, USERMSG_RELIABLE); - if (pBitBuf == NULL) - { - return pContext->ThrowNativeError("Could not send a usermessage"); - } - pBitBuf->WriteByte(1); - pBitBuf->WriteString(buffer); - usermsgs->EndMessage(); - - return 1; -} - - static cell_t CS_RespawnPlayer(IPluginContext *pContext, const cell_t *params) { static ICallWrapper *pWrapper = NULL; @@ -166,8 +127,3 @@ sp_nativeinfo_t g_CSNatives[] = {NULL, NULL} }; -sp_nativeinfo_t g_CS_PrintHintText[] = -{ - {"PrintHintText", CS_PrintHintText}, - {NULL, NULL}, -};