]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
changing all isDedicated references to cls.state == ca_dedicated
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Oct 2001 06:51:57 +0000 (06:51 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 29 Oct 2001 06:51:57 +0000 (06:51 +0000)
also changed where Chase_Init is called in Host_Init (no behavior change, just cleanup)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@974 d7cf8633-e32d-0410-b094-e92efae38249

gl_textures.c
host.c
palette.c

index 341be6c02769d498c258f3139309fe09499f3d68..5ac0614f19908c6b9cc6ca3e2fb30d358af0474f 100644 (file)
@@ -600,7 +600,7 @@ rtexture_t *R_LoadTexture (char *identifier, int width, int height, byte *data,
        gltexture_t             *glt;
        unsigned short  crc;
 
-       if (isDedicated)
+       if (cls.state == ca_dedicated)
                return NULL;
 
        if (!identifier[0])
diff --git a/host.c b/host.c
index 39730caa98c71ab0fa565a9c3a3e7540f1796b8e..4d272b974d46c97d50a381dd7f3dbcef12a10099 100644 (file)
--- a/host.c
+++ b/host.c
@@ -269,7 +269,7 @@ void Host_WriteConfiguration (void)
 
 // dedicated servers initialize the host but don't parse and set the
 // config.cfg cvars
-       if (host_initialized & !isDedicated)
+       if (host_initialized && cls.state != ca_dedicated)
        {
                f = Qopen (va("%s/config.cfg",com_gamedir), "w");
                if (!f)
@@ -597,7 +597,7 @@ void Host_ServerFrame (void)
        static double frametimetotal = 0, lastservertime = 0;
        frametimetotal += host_frametime;
        // LordHavoc: cap server at sys_ticrate in listen games
-       if (!isDedicated && svs.maxclients > 1 && ((realtime - lastservertime) < sys_ticrate.value))
+       if (cls.state != ca_dedicated && svs.maxclients > 1 && ((realtime - lastservertime) < sys_ticrate.value))
                return;
 // run the world state
        sv.frametime = pr_global_struct->frametime = frametimetotal;
@@ -816,12 +816,12 @@ void Host_Init (void)
        Cbuf_Init ();
        Cmd_Init ();    
        V_Init ();
-       Chase_Init ();
        COM_Init (host_parms.basedir);
        Host_InitLocal ();
        W_LoadWadFile ("gfx.wad");
        Key_Init ();
        Con_Init ();    
+       Chase_Init ();
        M_Init ();      
        PR_Init ();
        Mod_Init ();
index 4456930ea8b2eebc38ecc0a6563de9ffd046870d..1de9ec732e677bcb9f78328845fa014073f0bcca 100644 (file)
--- a/palette.c
+++ b/palette.c
@@ -148,7 +148,7 @@ void VID_UpdateGamma(qboolean force)
        static float cachegamma = -1, cachebrightness = -1, cachecontrast = -1, cachelighthalf = -1;
 
        // LordHavoc: don't mess with gamma tables if running dedicated
-       if (isDedicated)
+       if (cls.state == ca_dedicated)
                return;
 
        if (!force && vid_gamma.value == cachegamma && vid_brightness.value == cachebrightness && vid_contrast.value == cachecontrast && lighthalf == cachelighthalf)