]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
Rework game specific hacks to have a special group for Nexuiz-derived games.
[xonotic/darkplaces.git] / cl_main.c
index d50d4dd67d9fb3f62d6bb887018d82002e6de059..509608b2988aac0db594e648768cac2972b4d75c 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -171,7 +171,7 @@ void CL_ClearState(void)
                cl.entities[i].state_current = defaultstate;
        }
 
-       if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
+       if (IS_NEXUIZ_DERIVED(gamemode))
        {
                VectorSet(cl.playerstandmins, -16, -16, -24);
                VectorSet(cl.playerstandmaxs, 16, 16, 45);
@@ -428,7 +428,9 @@ void CL_EstablishConnection(const char *host, int firstarg)
                return;
 
        // clear menu's connect error message
+#ifdef CONFIG_MENU
        M_Update_Return_Reason("");
+#endif
        cls.demonum = -1;
 
        // stop demo loop in case this fails
@@ -462,12 +464,16 @@ void CL_EstablishConnection(const char *host, int firstarg)
                        *cls.connect_userinfo = 0;
                }
 
+#ifdef CONFIG_MENU
                M_Update_Return_Reason("Trying to connect...");
+#endif
        }
        else
        {
                Con_Print("Unable to find a suitable network socket to connect to server.\n");
+#ifdef CONFIG_MENU
                M_Update_Return_Reason("No network");
+#endif
        }
 }
 
@@ -1212,7 +1218,7 @@ static void CL_UpdateNetworkEntityTrail(entity_t *e)
        {
                if (e->render.effects & EF_BRIGHTFIELD)
                {
-                       if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
+                       if (IS_NEXUIZ_DERIVED(gamemode))
                                trailtype = EFFECT_TR_NEXUIZPLASMA;
                        else
                                CL_EntityParticles(e);
@@ -1439,7 +1445,7 @@ static void CL_LinkNetworkEntity(entity_t *e)
        {
                if (e->render.effects & EF_BRIGHTFIELD)
                {
-                       if (gamemode == GAME_NEXUIZ || gamemode == GAME_XONOTIC)
+                       if (IS_NEXUIZ_DERIVED(gamemode))
                                trailtype = EFFECT_TR_NEXUIZPLASMA;
                }
                if (e->render.effects & EF_DIMLIGHT)