Second attempt at fixing SetUserInfo (try committing the right file this time)
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402249
This commit is contained in:
parent
06c8f3a093
commit
8a7ced18de
@ -39,6 +39,7 @@
|
||||
#include "CellRecipientFilter.h"
|
||||
#include <inetchannel.h>
|
||||
#include <iclient.h>
|
||||
#include "iserver.h"
|
||||
|
||||
SourceHook::List<ValveCall *> g_RegCalls;
|
||||
SourceHook::List<ICallWrapper *> g_CallWraps;
|
||||
@ -921,7 +922,8 @@ static cell_t ActivateEntity(IPluginContext *pContext, const cell_t *params)
|
||||
static cell_t SetClientInfo(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
IGamePlayer *player = playerhelpers->GetGamePlayer(params[1]);
|
||||
if (player == NULL)
|
||||
IClient *pClient = iserver->GetClient(params[1]);
|
||||
if (player == NULL || pClient == NULL)
|
||||
{
|
||||
return pContext->ThrowNativeError("Invalid client index %d", params[1]);
|
||||
}
|
||||
@ -957,9 +959,6 @@ static cell_t SetClientInfo(IPluginContext *pContext, const cell_t *params)
|
||||
}
|
||||
}
|
||||
|
||||
INetChannel *pNetChan = static_cast<INetChannel *>(engine->GetPlayerNetInfo(params[1]));
|
||||
IClient *pClient = static_cast<IClient *>(pNetChan->GetMsgHandler());
|
||||
|
||||
unsigned char *CGameClient = (unsigned char *)pClient - 4;
|
||||
|
||||
START_CALL();
|
||||
|
Loading…
Reference in New Issue
Block a user