]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
Update extension description to prefer "ent" as the parameter name over "e"
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 03375f69a6b39fcdbf0f6a215f5b64f1b84e22ca..4930bf8b50007455c404f1543e2a738cd6ebe13e 100644 (file)
--- a/host.c
+++ b/host.c
@@ -501,6 +501,8 @@ void SV_DropClient(qboolean crash)
                host_client->clientconnectcalled = false;
                PRVM_serverglobalfloat(time) = sv.time;
                PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(host_client->edict);
+               // optional entity parameter for self (EXT_ENTITYPARAM)
+               PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(host_client->edict);
                prog->ExecuteProgram(prog, PRVM_serverfunction(ClientDisconnect), "QC function ClientDisconnect is missing");
                PRVM_serverglobaledict(self) = saveSelf;
        }
@@ -1162,6 +1164,8 @@ void Host_UnlockSession(void)
        }
 }
 
+extern hook_t *csqc_concmd;
+
 /*
 ====================
 Host_Init
@@ -1229,6 +1233,8 @@ static void Host_Init (void)
        // initialize memory subsystem cvars/commands
        Memory_Init_Commands();
 
+       Hook_Init();
+       csqc_concmd = Hook_Register(csqc_concmd,CL_VM_ConsoleCommand,1);
        // initialize console and logging and its cvars/commands
        Con_Init();