player.nade_timer = 0;
}
-MUTATOR_HOOKFUNCTION(nades_CheckThrow)
-{
- if (self.offhand) {
- nades_CheckThrow();
- return true;
- }
- return false;
-}
-
MUTATOR_HOOKFUNCTION(nades_VehicleEnter)
{
if(vh_player.nade)
ENDCLASS(NadeOffhand)
NadeOffhand OFFHAND_NADE; STATIC_INIT(OFFHAND_NADE) { OFFHAND_NADE = NEW(NadeOffhand); }
+MUTATOR_HOOKFUNCTION(nades_CheckThrow)
+{
+ if (self.offhand != OFFHAND_NADE || (self.weapons & WEPSET(HOOK))) {
+ nades_CheckThrow();
+ return true;
+ }
+ return false;
+}
+
MUTATOR_HOOKFUNCTION(nades_PlayerPreThink)
{SELFPARAM();
if (!IS_PLAYER(self)) { return false; }
{
bool key_pressed = actor.BUTTON_HOOK && !actor.vehicle;
Weapon off = actor.offhand;
- if (off) {
+ if (off && !(actor.weapons & WEPSET(HOOK))) {
if (off.offhand_think) off.offhand_think(off, actor, key_pressed);
} else {
if (key_pressed && actor.switchweapon != WEP_HOOK.m_id && !actor.hook_switchweapon) {