]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
reworked progs loading so that entvars_t and globalvars_t are no longer
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index d8909c14a884c0cc5adad10d9ac7e6ada2074294..e7a37d9bea54788470e245d92d35c7e2708b67ef 100644 (file)
--- a/host.c
+++ b/host.c
@@ -468,11 +468,11 @@ void SV_DropClient(qboolean crash)
        {
                // call the prog function for removing a client
                // this will set the body to a dead frame, among other things
-               int saveSelf = prog->globals.server->self;
+               int saveSelf = PRVM_serverglobaledict(self);
                host_client->clientconnectcalled = false;
-               prog->globals.server->self = PRVM_EDICT_TO_PROG(host_client->edict);
-               PRVM_ExecuteProgram(prog->globals.server->ClientDisconnect, "QC function ClientDisconnect is missing");
-               prog->globals.server->self = saveSelf;
+               PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(host_client->edict);
+               PRVM_ExecuteProgram(PRVM_serverfunction(ClientDisconnect), "QC function ClientDisconnect is missing");
+               PRVM_serverglobaledict(self) = saveSelf;
        }
 
        if (host_client->netconnection)