mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-03 06:20:57 +00:00
Fix server-crash bug when kicking people.
This commit is contained in:
parent
47cae9c3f8
commit
539832c356
1 changed files with 5 additions and 0 deletions
|
@ -450,10 +450,15 @@ void SV_DropClient (qboolean crash)
|
||||||
{
|
{
|
||||||
// call the prog function for removing a client
|
// call the prog function for removing a client
|
||||||
// this will set the body to a dead frame, among other things
|
// this will set the body to a dead frame, among other things
|
||||||
|
qcvm_t *oldvm = qcvm;
|
||||||
|
PR_SwitchQCVM(NULL);
|
||||||
|
PR_SwitchQCVM(&sv.qcvm);
|
||||||
saveSelf = pr_global_struct->self;
|
saveSelf = pr_global_struct->self;
|
||||||
pr_global_struct->self = EDICT_TO_PROG(host_client->edict);
|
pr_global_struct->self = EDICT_TO_PROG(host_client->edict);
|
||||||
PR_ExecuteProgram (pr_global_struct->ClientDisconnect);
|
PR_ExecuteProgram (pr_global_struct->ClientDisconnect);
|
||||||
pr_global_struct->self = saveSelf;
|
pr_global_struct->self = saveSelf;
|
||||||
|
PR_SwitchQCVM(NULL);
|
||||||
|
PR_SwitchQCVM(oldvm);
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_Printf ("Client %s removed\n",host_client->name);
|
Sys_Printf ("Client %s removed\n",host_client->name);
|
||||||
|
|
Loading…
Reference in a new issue