PM_ClientMovement_Unstick(this);
// set crouched
- if (PHYS_INPUT_BUTTON_CROUCH(this))
+ bool do_crouch = PHYS_INPUT_BUTTON_CROUCH(this);
+ if(this.hook && !wasfreed(this.hook))
+ do_crouch = false;
+ if(hud != HUD_NORMAL)
+ do_crouch = false;
+ if(STAT(FROZEN, this))
+ do_crouch = false;
+ if((activeweapon == WEP_SHOCKWAVE || activeweapon == WEP_SHOTGUN) && viewmodel.animstate_startframe == viewmodel.anim_fire2_x && time < viewmodel.weapon_nextthink)
+ do_crouch = false;
+
+ if (do_crouch)
{
// wants to crouch, this always works
if (!IS_DUCKED(this)) SET_DUCKED(this);
void Remove_GrapplingHook(entity this)
{
sound (this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
+
+ if(csqcplayer && csqcplayer.hook == this)
+ csqcplayer.hook = NULL;
}
NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew)
int myowner = ReadByte();
self.owner = playerslots[myowner - 1];
self.sv_entnum = myowner;
+ if(csqcplayer && myowner == player_localentnum)
+ csqcplayer.hook = self;
switch(self.HookType)
{
default: