#include "weapons/weaponsystem.qh"
#include "weapons/selection.qh"
#include "weapons/tracing.qh"
-#include "cl_player.qh"
+#include "player.qh"
#include "command/common.qh"
#include "round_handler.qh"
#include "../common/state.qh"
#include "../common/vehicles/all.qh"
#include "../common/constants.qh"
#include "../common/util.qh"
-#include "../common/weapons/all.qh"
+#include <common/weapons/_all.qh>
#include "../lib/warpzone/common.qh"
#include "../lib/warpzone/server.qh"
{
if(pl.hook == NULL)
return;
- remove(pl.hook);
+ delete(pl.hook);
pl.hook = NULL;
- if(pl.movetype == MOVETYPE_FLY)
- pl.movetype = MOVETYPE_WALK;
+ if(pl.move_movetype == MOVETYPE_FLY)
+ set_movetype(pl, MOVETYPE_WALK);
//pl.disableclientprediction = false;
}
if(this.realowner.hook == this)
RemoveGrapplingHook(this.owner);
else // in any case:
- remove(this);
+ delete(this);
}
void GrapplingHookThink(entity this);
this.nextthink = time;
settouch(this, func_null);
this.velocity = '0 0 0';
- this.movetype = MOVETYPE_NONE;
+ set_movetype(this, MOVETYPE_NONE);
this.hook_length = -1;
}
this.hook_length = newlength;
}
- if(pull_entity.movetype == MOVETYPE_FLY)
- pull_entity.movetype = MOVETYPE_WALK;
+ if(pull_entity.move_movetype == MOVETYPE_FLY)
+ set_movetype(pull_entity, MOVETYPE_WALK);
if(this.realowner.hook_state & HOOK_RELEASING)
{
dv = ((v - v0) * dir) * dir;
if(tarzan >= 2)
{
- if(this.aiment.movetype == MOVETYPE_WALK || this.aiment.classname == "nade")
+ if(this.aiment.move_movetype == MOVETYPE_WALK || this.aiment.classname == "nade")
{
entity aim_ent = ((IS_VEHICLE(this.aiment) && this.aiment.owner) ? this.aiment.owner : this.aiment);
v = v - dv * 0.5;
if(spd < 50)
spd = 0;
this.realowner.velocity = dir*spd;
- this.realowner.movetype = MOVETYPE_FLY;
+ set_movetype(this.realowner, MOVETYPE_FLY);
UNSET_ONGROUND(this.realowner);
}
void GrapplingHookTouch(entity this, entity toucher)
{
- if(toucher.movetype == MOVETYPE_FOLLOW)
+ if(toucher.move_movetype == MOVETYPE_FOLLOW)
return;
PROJECTILE_TOUCH(this, toucher);
GrapplingHook_Stop(this);
if(toucher)
- if(toucher.movetype != MOVETYPE_NONE)
+ if(toucher.move_movetype != MOVETYPE_NONE)
{
SetMovetypeFollow(this, toucher);
WarpZone_RefSys_BeginAddingIncrementally(this, this.aiment);
missile.reset = GrapplingHookReset;
missile.classname = "grapplinghook";
missile.flags = FL_PROJECTILE;
+ IL_PUSH(g_projectiles, missile);
- missile.movetype = ((autocvar_g_balance_grapplehook_gravity) ? MOVETYPE_TOSS : MOVETYPE_FLY);
+ set_movetype(missile, ((autocvar_g_balance_grapplehook_gravity) ? MOVETYPE_TOSS : MOVETYPE_FLY));
PROJECTILE_MAKETRIGGER(missile);
//setmodel (missile, MDL_HOOK); // precision set below