2
0
mirror of https://github.com/rehlds/reapi.git synced 2024-12-28 15:45:31 +03:00

Using player entity index in RH_SV_DropClient instead of engine client index

This commit is contained in:
asmodai 2016-07-11 01:38:31 +03:00
parent 1ba339a98b
commit e6e3734eb0

View File

@ -19,10 +19,10 @@ void SV_DropClient(IRehldsHook_SV_DropClient *chain, IGameClient *cl, bool crash
{
auto original = [chain](int _cl, bool _crash, const char *_fmt)
{
chain->callNext(g_RehldsSvs->GetClient(_cl), _crash, _fmt);
chain->callNext(g_RehldsSvs->GetClient(_cl - 1), _crash, _fmt);
};
callVoidForward(RH_SV_DropClient, original, cl->GetId(), crash, fmt);
callVoidForward(RH_SV_DropClient, original, cl->GetId() + 1, crash, fmt);
}
void SV_ActivateServer(IRehldsHook_SV_ActivateServer *chain, int runPhysics)