]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
make g_powerup_* count as "No strength"-like mutators
authorRudolf Polzer <divverent@alientrap.org>
Thu, 15 Dec 2011 14:21:34 +0000 (15:21 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 15 Dec 2011 14:21:34 +0000 (15:21 +0100)
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
qcsrc/server/g_world.qc
qcsrc/server/teamplay.qc

index 2711c57e7f1eb53789d075a560557c870e5fdddc..e91611321642e83d5873e6bf42699581abc0b008 100644 (file)
@@ -96,6 +96,12 @@ string XonoticMutatorsDialog_toString(entity me)
                s = strcat(s, ", ", _("Blood loss"));
        if(cvar("g_jetpack"))
                s = strcat(s, ", ", _("Jet pack"));
+       if(!cvar("g_powerup_superhealth"))
+               s = strcat(s, ", ", _("No superhealth"));
+       if(!cvar("g_powerup_strength"))
+               s = strcat(s, ", ", _("No strength"));
+       if(!cvar("g_powerup_shield"))
+               s = strcat(s, ", ", _("No shield"));
        if(s == "")
                return ZCTX(_("MUT^None"));
        else
index 3d1de580a3530cab88baf3d6f52d64ea83986d02..7df226be7c364bf21eea345986501165f4d3a63a 100644 (file)
@@ -483,6 +483,7 @@ void cvar_changes_init()
                BADCVAR("sys_ticrate");
                BADCVAR("teamplay_mode");
                BADCVAR("timelimit_override");
+               BADPREFIX("g_powerup_");
                BADPREFIX("g_warmup_");
                BADPREFIX("sv_ready_restart_");
 
@@ -765,6 +766,18 @@ void spawnfunc_worldspawn (void)
                if(autocvar_g_minstagib)
                        s = strcat(s, ":minstagib");
 
+               // TODO to mutator system
+               if(!autocvar_g_powerup_superhealth)
+                       s = strcat(s, ":no_superhealth");
+
+               // TODO to mutator system
+               if(!autocvar_g_powerup_strength)
+                       s = strcat(s, ":no_strength");
+
+               // TODO to mutator system
+               if(!autocvar_g_powerup_shield)
+                       s = strcat(s, ":no_shield");
+
                GameLogEcho(s);
                GameLogEcho(":gameinfo:end");
        }
index 3d65d760d3af9604921342e4b811dc6619329d0c..204bd6cd1d823a80eee6ec7c57d12ed7a79ceda3 100644 (file)
@@ -478,6 +478,12 @@ string getwelcomemessage(void)
                modifications = strcat(modifications, ", Blood loss");
        if(g_jetpack)
                modifications = strcat(modifications, ", Jet pack");
+       if(!autocvar_g_powerup_superhealth)
+               modifications = strcat(modifications, ", No superhealth");
+       if(!autocvar_g_powerup_strength)
+               modifications = strcat(modifications, ", No strength");
+       if(!autocvar_g_powerup_shield)
+               modifications = strcat(modifications, ", No shield");
        modifications = substring(modifications, 2, strlen(modifications) - 2);
 
        string versionmessage;