#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 = cvar("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.
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;
// arguments:
// effectname
effectnum = particleeffectnum(argv(1));
- W_SetupShot(self, FALSE, FALSE, "",0);
+ W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 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, "", 0);
+ W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 0);
traceline(w_shotorg, w_shotorg + w_shotdir * 2048, MOVE_NORMAL, self);
if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) || trace_fraction == 1)
{