diff --git a/quakespasm/Quake/host.c b/quakespasm/Quake/host.c index 8271a3fe..e02a54e5 100644 --- a/quakespasm/Quake/host.c +++ b/quakespasm/Quake/host.c @@ -44,11 +44,12 @@ double host_frametime; double host_time; double realtime; // without any filtering or bounding double oldrealtime; // last frame run -int host_framecount; -int host_hunklevel; +int host_framecount; -int minimum_memory; +int host_hunklevel; + +int minimum_memory; client_t *host_client; // current client @@ -70,8 +71,8 @@ cvar_t timelimit = {"timelimit","0",false,true}; cvar_t teamplay = {"teamplay","0",false,true}; cvar_t samelevel = {"samelevel","0"}; cvar_t noexit = {"noexit","0",false,true}; -cvar_t skill = {"skill","1"}; // 0 - 3 -cvar_t deathmatch = {"deathmatch","0"}; // 0, 1, or 2 +cvar_t skill = {"skill","1"}; // 0 - 3 +cvar_t deathmatch = {"deathmatch","0"}; // 0, 1, or 2 cvar_t coop = {"coop","0"}; // 0 or 1 cvar_t pausable = {"pausable","1"}; @@ -90,12 +91,11 @@ overflowtimes_t dev_overflows; //this stores the last time overflow messages wer Max_Edicts_f -- johnfitz ================ */ -void Max_Edicts_f (void) +static void Max_Edicts_f (void) { static float oldval = DEF_EDICTS; //must match the default value for max_edicts //TODO: clamp it here? - if (max_edicts.value == oldval) return; @@ -105,6 +105,19 @@ void Max_Edicts_f (void) oldval = max_edicts.value; } +// 1999-09-06 deathmatch/coop not at the same time fix by Maddes +static void Callback_Deathmatch (void) +{ + if (deathmatch.value) + Cvar_Set ("coop", "0"); +} + +static void Callback_Coop (void) +{ + if (coop.value) + Cvar_Set ("deathmatch", "0"); +} + /* ================ Host_EndGame @@ -261,8 +274,8 @@ void Host_InitLocal (void) Cvar_RegisterVariable (&noexit, NULL); Cvar_RegisterVariable (&skill, NULL); Cvar_RegisterVariable (&developer, NULL); - Cvar_RegisterVariable (&deathmatch, NULL); - Cvar_RegisterVariable (&coop, NULL); + Cvar_RegisterVariable (&coop, Callback_Coop); + Cvar_RegisterVariable (&deathmatch, Callback_Deathmatch); Cvar_RegisterVariable (&pausable, NULL); diff --git a/quakespasm/Quake/net_main.c b/quakespasm/Quake/net_main.c index e636134c..247391c2 100644 --- a/quakespasm/Quake/net_main.c +++ b/quakespasm/Quake/net_main.c @@ -210,10 +210,14 @@ static void MaxPlayers_f (void) if (n == 1) { Cvar_Set ("deathmatch", "0"); + Cvar_Set ("coop", "0"); } else { - Cvar_Set ("deathmatch", "1"); + if (coop.value) + Cvar_Set ("deathmatch", "0"); + else + Cvar_Set ("deathmatch", "1"); } } diff --git a/quakespasm/README.html b/quakespasm/README.html index 3d98b154..45699cfa 100644 --- a/quakespasm/README.html +++ b/quakespasm/README.html @@ -11,7 +11,7 @@
-
QuakeSpasm 0.85.5 (20 December 2011)
+QuakeSpasm 0.85.5 (25 December 2011)
@@ -94,7 +94,7 @@ Alternatively, have a look at