Removed code now dead from CS:S Orange Box move (bug 4399, r=ds).
This commit is contained in:
parent
9fe2e8e31a
commit
f439cad46c
@ -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;
|
||||
|
@ -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_
|
||||
|
@ -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},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user