#else
.float maycheat;
-float sv_cheats;
+float gamestart_sv_cheats;
#define CHIMPULSE_SPEEDRUN_INIT 30
#define CHIMPULSE_GIVE_ALL 99
void CheatInit()
{
- sv_cheats = cvar("sv_cheats");
+ gamestart_sv_cheats = autocvar_sv_cheats;
}
void CheatShutdown()
return 1;
// sv_cheats
- if(sv_cheats && autocvar_sv_cheats)
+ if(gamestart_sv_cheats && autocvar_sv_cheats)
return 1;
// if we get here, player is not allowed to cheat. Log it.
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;
}
break;
case CHIMPULSE_TELEPORT:
IS_CHEAT(i, 0, 0);
- if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, ((sv_cheats >= 2) ? 100000 : 100), 1024, 256))
+ if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, ((gamestart_sv_cheats >= 2) ? 100000 : 100), 1024, 256))
{
self.angles_x = -self.angles_x;
self.fixangle = TRUE;
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);
}
// 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();
// 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)
{
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);