float dt, dmg_remaining_next, f;
dt = time - this.teleport_time;
- dmg_remaining_next = pow(bound(0, 1 - dt / this.dmg_duration, 1), this.dmg_power);
+ dmg_remaining_next = (bound(0, 1 - dt / this.dmg_duration, 1) ** this.dmg_power);
f = this.dmg_last - dmg_remaining_next;
this.dmg_last = dmg_remaining_next;
{
actor.ammo_fuel = 0;
actor.(weaponentity).hook_state |= HOOK_REMOVING;
- W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
+ if(actor.(weaponentity).m_weapon != WEP_Null) // offhand
+ W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
}
}
}
{
sound (this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
- if(csqcplayer && csqcplayer.hook == this)
- csqcplayer.hook = NULL;
+ for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+ {
+ entity wep = viewmodels[slot];
+ if(wep.hook == this)
+ wep.hook = NULL;
+ }
}
NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew)