// weapon switching impulses
+bool autocvar_g_weaponswitch_debug;
+
#define X(slot) \
IMPULSE(weapon_group_##slot) \
{ \
{ \
.entity weaponentity = weaponentities[wepslot]; \
W_NextWeaponOnImpulse(this, slot, weaponentity); \
+ if(wepslot == 0 && !autocvar_g_weaponswitch_debug) \
+ break; \
} \
}
X(1)
{ \
.entity weaponentity = weaponentities[wepslot]; \
W_CycleWeapon(this, this.cvar_cl_weaponpriorities[slot], dir, weaponentity); \
+ if(wepslot == 0 && !autocvar_g_weaponswitch_debug) \
+ break; \
} \
}
X(0, prev)
{ \
.entity weaponentity = weaponentities[slot]; \
W_SwitchWeapon(this, Weapons_from(WEP_FIRST + i), weaponentity); \
+ if(slot == 0 && !autocvar_g_weaponswitch_debug) \
+ break; \
} \
}
X(0)
{
.entity weaponentity = weaponentities[slot];
W_NextWeapon(this, 0, weaponentity);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}
{
.entity weaponentity = weaponentities[slot];
W_PreviousWeapon(this, 0, weaponentity);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}
{
.entity weaponentity = weaponentities[slot];
W_NextWeapon(this, 1, weaponentity);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}
{
.entity weaponentity = weaponentities[slot];
W_PreviousWeapon(this, 1, weaponentity);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}
{
.entity weaponentity = weaponentities[slot];
W_NextWeapon(this, 2, weaponentity);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}
{
.entity weaponentity = weaponentities[slot];
W_PreviousWeapon(this, 2, weaponentity);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}
{
.entity weaponentity = weaponentities[slot];
W_LastWeapon(this, weaponentity);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}
{
.entity weaponentity = weaponentities[slot];
W_SwitchWeapon(this, w_getbestweapon(this, weaponentity), weaponentity);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}
{
.entity weaponentity = weaponentities[slot];
W_ThrowWeapon(this, weaponentity, W_CalculateProjectileVelocity(this, this.velocity, v_forward * 750, false), '0 0 0', true);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}
.entity weaponentity = weaponentities[slot];
Weapon w = this.(weaponentity).m_weapon;
w.wr_reload(w, actor, weaponentity);
+
+ if(slot == 0 && !autocvar_g_weaponswitch_debug)
+ break;
}
}