]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Player templates: fixed unlimited ammo.
authorLyberta <lyberta@lyberta.net>
Fri, 28 Jul 2017 02:01:51 +0000 (05:01 +0300)
committerLyberta <lyberta@lyberta.net>
Fri, 28 Jul 2017 02:01:51 +0000 (05:01 +0300)
qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc

index 7e86eca1114d02df42ba5281790841b991cf57aa..eda6b8683bd5d9bd4a37c1ba2637ea7d67f129da 100644 (file)
@@ -23,10 +23,6 @@ string PlayerTemplate_GetDefaultCvarName(string variable)
                {
                        return "g_balance_armor_start";
                }
-               case "unlimited_ammo":
-               {
-                       return "g_use_ammunition";
-               }
                case "start_ammo_shells":
                {
                        return "g_start_ammo_shells";
@@ -65,7 +61,6 @@ float PlayerTemplate_GetDefaultFloatValue(string variable)
        {
                case "start_health":
                case "start_armor":
-               case "unlimited_ammo":
                case "start_ammo_shells":
                case "start_ammo_bullets":
                case "start_ammo_rockets":
@@ -75,6 +70,10 @@ float PlayerTemplate_GetDefaultFloatValue(string variable)
                {
                        return cvar(PlayerTemplate_GetDefaultCvarName(variable));
                }
+               case "unlimited_ammo":
+               {
+                       return !autocvar_g_use_ammunition;
+               }
                case "default_start_weapons":
                {
                        return 1;