#include "../common/deathtypes/all.qh"
#include "../common/util.qh"
+#include <common/physics/player.qh>
+
#include "../common/monsters/all.qh"
#include "../common/weapons/all.qh"
#include "../lib/warpzone/anglestransform.qh"
#include "../lib/warpzone/util_server.qh"
-void CopyBody(float keepvelocity);
+void CopyBody(entity this, float keepvelocity);
#ifdef NOCHEATS
float CheatFrame() { return 0; }
void CheatInit() { cheatcount_total = world.cheatcount; }
void CheatShutdown() { }
-void CheatShutdownClient() { }
void Drag_MoveDrag(entity from, entity to) { }
#else
{
}
-void CheatShutdownClient()
-{
-}
-
float CheatsAllowed(float i, float argc, float fr) // the cheat gets passed as argument for possible future ACL checking
{SELFPARAM();
// dead people cannot cheat
- if(self.deadflag != DEAD_NO)
+ if(IS_DEAD(self))
return 0;
if(gamestart_sv_cheats < 2 && !IS_PLAYER(self))
return 0;
IS_CHEAT(imp, 0, 0);
makevectors (self.v_angle);
self.velocity = self.velocity + v_forward * 300;
- CopyBody(1);
+ CopyBody(self, 1);
self.lip += 1;
self.velocity = self.velocity - v_forward * 300;
DID_CHEAT();
break;
case CHIMPULSE_CLONE_STANDING.impulse:
IS_CHEAT(imp, 0, 0);
- CopyBody(0);
+ CopyBody(self, 0);
self.lip += 1;
DID_CHEAT();
break;
DID_CHEAT();
break;
}
- if(self.deadflag != DEAD_NO)
+ if(IS_DEAD(self))
sprint(self, "UR DEAD AHAHAH))\n");
else
sprint(self, "No waypoint set, cheater (use g_waypointsprite_personal to set one)\n");
case CHIMPULSE_R00T.impulse:
IS_CHEAT(imp, 0, 0);
RandomSelection_Init();
- FOREACH_CLIENT(IS_PLAYER(it) && it.deadflag == DEAD_NO && DIFF_TEAM(it, self), LAMBDA(RandomSelection_Add(it, 0, string_null, 1, 1)));
+ FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it) && DIFF_TEAM(it, self), LAMBDA(RandomSelection_Add(it, 0, string_null, 1, 1)));
if(RandomSelection_chosen_ent)
e = RandomSelection_chosen_ent;
else
default:
if(Drag_IsDragging(self))
{
- if(self.BUTTON_DRAG)
+ if(PHYS_INPUT_BUTTON_DRAG(self))
{
if(self.impulse == 10 || self.impulse == 15 || self.impulse == 18)
{
else
{
if(Drag_CanDrag(self))
- if(self.BUTTON_DRAG)
+ if(PHYS_INPUT_BUTTON_DRAG(self))
{
crosshair_trace_plusvisibletriggers(self);
entity e = trace_ent;
float Drag_CanDrag(entity dragger)
{
- return (dragger.deadflag == DEAD_NO) || (IS_PLAYER(dragger));
+ return (!IS_DEAD(dragger)) || (IS_PLAYER(dragger));
}
float Drag_IsDragging(entity dragger)