actor.(weaponentity).hook_state &= ~HOOK_REMOVING;
}
}
-METHOD(Hook, wr_setup, void(entity thiswep, entity actor))
+METHOD(Hook, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
{
- for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
- {
- .entity weaponentity = weaponentities[slot];
- actor.(weaponentity).hook_state &= ~HOOK_WAITING_FOR_RELEASE;
- }
+ actor.(weaponentity).hook_state &= ~HOOK_WAITING_FOR_RELEASE;
}
METHOD(Hook, wr_checkammo1, bool(Hook thiswep, entity actor, .entity weaponentity))
{
InterpolateOrigin_Do(this);
- int s = viewmodels[this.cnt].m_gunalign; //W_GunAlign(NULL, STAT(GUNALIGN));
+ int s = W_GunAlign(viewmodels[this.cnt], STAT(GUNALIGN)) - 1;
switch(this.HookType)
{
break;
}
- if((this.owner.sv_entnum == player_localentnum - 1) && autocvar_chase_active <= 0)
+ if((this.owner.sv_entnum == player_localentnum - 1))
{
switch(this.HookType)
{
default:
case NET_ENT_CLIENT_HOOK:
- a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
+ if(autocvar_chase_active > 0)
+ a = csqcplayer.origin;
+ else
+ a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
b = this.origin;
break;
case NET_ENT_CLIENT_ARC_BEAM: