Drop dead bot slots

This commit is contained in:
ineedbots 2021-06-28 19:36:31 -06:00
parent bb54910614
commit a9fe1047bd
3 changed files with 21 additions and 0 deletions

View File

@ -16,6 +16,13 @@ namespace Components
{
int cl_num = cl - Game::svs->clients;
if (cl->state < Game::CS_ACTIVE)
{
Game::SV_DropClient(cl, "EXE_DISCONNECTED");
cl->state = Game::CS_FREE;
return;
}
Game::usercmd_t cmd = {};
cmd.serverTime = Game::svs->time;

View File

@ -68,5 +68,18 @@ namespace Game
call func_loc;
}
}
void SV_DropClient(Game::client_t* client, const char* reason)
{
int func_loc = 0x454750;
__asm
{
push reason;
mov eax, client;
call func_loc;
add esp, 4;
}
}
}

View File

@ -35,4 +35,5 @@ namespace Game
void SV_ClientThink(Game::usercmd_s*, Game::client_t*);
void SV_DropClient(Game::client_t*, const char*);
}