]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cheats.qc
Merge branch 'master' into mirceakitsune/damage_effects
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cheats.qc
index 1bb39dfe0195dc71f9eeb43966db00cbe1fe6f66..0d95c453a1e6685b1d7032dd06dd520670ae628b 100644 (file)
@@ -28,7 +28,7 @@ float gamestart_sv_cheats;
 
 void CheatInit()
 {
-       gamestart_sv_cheats = cvar("sv_cheats");
+       gamestart_sv_cheats = autocvar_sv_cheats;
 }
 
 void CheatShutdown()
@@ -180,10 +180,10 @@ float CheatImpulse(float i)
                                        self.health = start_health;
                                        self.armorvalue = start_armorvalue;
                                        self.weapons |= weaponsInMap;
-                                       self.pauserotarmor_finished = time + cvar("g_balance_pause_armor_rot_spawn");
-                                       self.pauserothealth_finished = time + cvar("g_balance_pause_health_rot_spawn");
-                                       self.pauserotfuel_finished = time + cvar("g_balance_pause_fuel_rot_spawn");
-                                       self.pauseregen_finished = time + cvar("g_balance_pause_health_regen_spawn");
+                                       self.pauserotarmor_finished = time + autocvar_g_balance_pause_armor_rot_spawn;
+                                       self.pauserothealth_finished = time + autocvar_g_balance_pause_health_rot_spawn;
+                                       self.pauserotfuel_finished = time + autocvar_g_balance_pause_fuel_rot_spawn;
+                                       self.pauseregen_finished = time + autocvar_g_balance_pause_health_regen_spawn;
                                        self.strength_finished = 0;
                                        self.invincible_finished = 0;
                                }
@@ -249,7 +249,7 @@ float CheatImpulse(float i)
                                e2 = spawn();
                                setorigin(e2, org);
                                pointparticles(particleeffectnum("rocket_explode"), org, '0 0 0', 1);
-                               sound(e2, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+                               sound(e2, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                                RadiusDamage(e2, e, 1000, 0, 128, e, 500, DEATH_CHEAT, world);
                                remove(e2);
                        }
@@ -303,7 +303,7 @@ float CheatCommand(float argc)
                                // arguments:
                                //   effectname
                                effectnum = particleeffectnum(argv(1));
-                               W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 0);
+                               W_SetupShot(self, FALSE, FALSE, "", CH_WEAPON_A, 0);
                                traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, self);
                                trailparticles(self, effectnum, w_shotorg, trace_endpos);
                                DID_CHEAT();
@@ -318,7 +318,7 @@ float CheatCommand(float argc)
                                // arguments:
                                //   modelname mode
                                f = stof(argv(2));
-                               W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 0);
+                               W_SetupShot(self, FALSE, FALSE, "", CH_WEAPON_A, 0);
                                traceline(w_shotorg, w_shotorg + w_shotdir * 2048, MOVE_NORMAL, self);
                                if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) || trace_fraction == 1)
                                {
@@ -604,14 +604,6 @@ float CheatCommand(float argc)
                                remove(e);
                        DID_CHEAT();
                        break;
-               case "warp":
-                       IS_CHEAT(0, argc, 0);
-                       if(argc == 2) if(cvar("g_campaign"))
-                       {
-                               CampaignLevelWarp(stof(argv(1)));
-                               DID_CHEAT();
-                       }
-                       break;
                case "god":
                        IS_CHEAT(0, argc, 0);
                        BITXOR_ASSIGN(self.flags, FL_GODMODE);