overhaul of the vsp listening code

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401587
This commit is contained in:
David Anderson
2007-10-15 22:15:22 +00:00
parent 0600be8c3a
commit 60d8e4f248
12 changed files with 144 additions and 52 deletions
+4 -14
View File
@@ -36,17 +36,6 @@
#include "PlayerManager.h"
#include "HalfLife2.h"
IServerPluginCallbacks *g_VSP = NULL;
class HalfLifeNatives : public SMGlobalClass
{
public: //SMGlobalClass
void OnSourceModVSPReceived(IServerPluginCallbacks *iface)
{
g_VSP = iface;
}
};
static cell_t SetRandomSeed(IPluginContext *pContext, const cell_t *params)
{
engrandom->SetSeed(params[1]);
@@ -270,7 +259,10 @@ static cell_t smn_CreateDialog(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr);
}
serverpluginhelpers->CreateMessage(pPlayer->GetEdict(), static_cast<DIALOG_TYPE>(params[3]), pKV, g_VSP);
serverpluginhelpers->CreateMessage(pPlayer->GetEdict(),
static_cast<DIALOG_TYPE>(params[3]),
pKV,
vsp_interface);
return 1;
}
@@ -415,8 +407,6 @@ static cell_t ShowVGUIPanel(IPluginContext *pContext, const cell_t *params)
return 1;
}
static HalfLifeNatives s_HalfLifeNatives;
REGISTER_NATIVES(halflifeNatives)
{
{"CreateFakeClient", CreateFakeClient},