#include "cheats.qh"
+#include <server/defs.qh>
+#include <server/miscfunctions.qh>
+#include <common/effects/all.qh>
+
#include "g_damage.qh"
#include "race.qh"
#include "../common/triggers/teleporters.qh"
this.personal.ammo_plasma = this.ammo_plasma;
this.personal.ammo_shells = this.ammo_shells;
this.personal.ammo_fuel = this.ammo_fuel;
- this.personal.health = this.health;
+ this.personal.health = max(1, this.health);
this.personal.armorvalue = this.armorvalue;
this.personal.weapons = this.weapons;
this.personal.items = this.items;
case CHIMPULSE_R00T.impulse:
IS_CHEAT(this, imp, 0, 0);
RandomSelection_Init();
- FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it) && DIFF_TEAM(it, this), LAMBDA(RandomSelection_AddEnt(it, 1, 1)));
+ FOREACH_CLIENT(IS_PLAYER(it) && !IS_DEAD(it) && DIFF_TEAM(it, this), { RandomSelection_AddEnt(it, 1, 1); });
if(RandomSelection_chosen_ent)
e = RandomSelection_chosen_ent;
else
RadiusDamage(e2, this, 1000, 0, 128, NULL, NULL, 500, DEATH_CHEAT.m_id, e);
delete(e2);
- LOG_INFO("404 Sportsmanship not found.\n");
+ LOG_INFO("404 Sportsmanship not found.");
DID_CHEAT();
break;
}
{
if(PHYS_INPUT_BUTTON_DRAG(this))
{
- if(this.impulse == 10 || this.impulse == 15 || this.impulse == 18)
+ if(CS(this).impulse == 10 || CS(this).impulse == 15 || CS(this).impulse == 18)
{
Drag_MoveForward(this);
- this.impulse = 0;
+ CS(this).impulse = 0;
}
- else if(this.impulse == 12 || this.impulse == 16 || this.impulse == 19)
+ else if(CS(this).impulse == 12 || CS(this).impulse == 16 || CS(this).impulse == 19)
{
Drag_MoveBackward(this);
- this.impulse = 0;
+ CS(this).impulse = 0;
}
- else if(this.impulse >= 1 && this.impulse <= 9)
+ else if(CS(this).impulse >= 1 && CS(this).impulse <= 9)
{
- Drag_SetSpeed(this, this.impulse - 1);
+ Drag_SetSpeed(this, CS(this).impulse - 1);
}
- else if(this.impulse == 14)
+ else if(CS(this).impulse == 14)
{
Drag_SetSpeed(this, 9);
}
dragger.dragdistance = vlen(touchpoint - dragger.origin - dragger.view_ofs);
dragger.draglocalangle = draggee.angles.y - dragger.v_angle.y;
touchpoint = touchpoint - gettaginfo(draggee, 0);
- tagscale = pow(vlen(v_forward), -2);
+ tagscale = (vlen(v_forward) ** -2);
dragger.draglocalvector_x = touchpoint * v_forward * tagscale;
dragger.draglocalvector_y = touchpoint * v_right * tagscale;
dragger.draglocalvector_z = touchpoint * v_up * tagscale;
void Drag_SetSpeed(entity dragger, float s)
{
- dragger.dragspeed = pow(2, s);
+ dragger.dragspeed = (2 ** s);
}
void Drag_MoveBackward(entity dragger)