void View_Lock()
{
- int lock_type = (!autocvar_hud_cursormode && (autocvar__hud_configure && spectatee_status <= 0 || intermission > 1 || QuickMenu_IsOpened()));
+ int lock_type = (!autocvar_hud_cursormode && ((autocvar__hud_configure && spectatee_status <= 0) || intermission > 1 || QuickMenu_IsOpened()));
if (lock_type == 0)
lock_type = autocvar_cl_lockview;
bool playerjump = PlayerJump(this); // required
bool air_jump = !playerjump || M_ARGV(2, bool);
- bool activate = JETPACK_JUMP(this) && air_jump && PHYS_INPUT_BUTTON_JUMP(this) || PHYS_INPUT_BUTTON_JETPACK(this);
+ bool activate = (JETPACK_JUMP(this) && air_jump && PHYS_INPUT_BUTTON_JUMP(this)) || PHYS_INPUT_BUTTON_JETPACK(this);
bool has_fuel = !PHYS_JETPACK_FUEL(this) || PHYS_AMMO_FUEL(this) || (ITEMS_STAT(this) & IT_UNLIMITED_AMMO);
if (!(ITEMS_STAT(this) & ITEM_Jetpack.m_itemid)) { }
// used for special commands and idle checking, not from the engine
// TODO: cache
#define PHYS_INPUT_BUTTON_MASK(s) ( \
- (1 << 0) * PHYS_INPUT_BUTTON_ATCK(s) \
- | (1 << 1) * PHYS_INPUT_BUTTON_JUMP(s) \
- | (1 << 2) * PHYS_INPUT_BUTTON_ATCK2(s) \
- | (1 << 3) * PHYS_INPUT_BUTTON_ZOOM(s) \
- | (1 << 4) * PHYS_INPUT_BUTTON_CROUCH(s) \
- | (1 << 5) * PHYS_INPUT_BUTTON_HOOK(s) \
- | (1 << 6) * PHYS_INPUT_BUTTON_USE(s) \
- | (1 << 7) * PHYS_INPUT_BUTTON_BACKWARD(s) \
- | (1 << 8) * PHYS_INPUT_BUTTON_FORWARD(s) \
- | (1 << 9) * PHYS_INPUT_BUTTON_LEFT(s) \
- | (1 << 10) * PHYS_INPUT_BUTTON_RIGHT(s) \
+ ((1 << 0) * PHYS_INPUT_BUTTON_ATCK(s)) \
+ | ((1 << 1) * PHYS_INPUT_BUTTON_JUMP(s)) \
+ | ((1 << 2) * PHYS_INPUT_BUTTON_ATCK2(s)) \
+ | ((1 << 3) * PHYS_INPUT_BUTTON_ZOOM(s)) \
+ | ((1 << 4) * PHYS_INPUT_BUTTON_CROUCH(s)) \
+ | ((1 << 5) * PHYS_INPUT_BUTTON_HOOK(s)) \
+ | ((1 << 6) * PHYS_INPUT_BUTTON_USE(s)) \
+ | ((1 << 7) * PHYS_INPUT_BUTTON_BACKWARD(s)) \
+ | ((1 << 8) * PHYS_INPUT_BUTTON_FORWARD(s)) \
+ | ((1 << 9) * PHYS_INPUT_BUTTON_LEFT(s)) \
+ | ((1 << 10) * PHYS_INPUT_BUTTON_RIGHT(s)) \
)
#define IS_JUMP_HELD(s) (!((s).flags & FL_JUMPRELEASED))
Send_Effect(EFFECT_ARC_SMOKE, smoke_origin, '0 0 0', 1 );
}
- if ( actor.arc_smoke_sound && ( actor.arc_overheat <= time ||
- !( PHYS_INPUT_BUTTON_ATCK(actor) || PHYS_INPUT_BUTTON_ATCK2(actor) ) ) || actor.(weaponentity).m_switchweapon != thiswep )
+ bool attacking = PHYS_INPUT_BUTTON_ATCK(actor) || PHYS_INPUT_BUTTON_ATCK2(actor);
+ bool stop_smoke_sound = actor.arc_overheat <= time || !attacking;
+ if ((actor.arc_smoke_sound && stop_smoke_sound) || actor.(weaponentity).m_switchweapon != thiswep)
{
actor.arc_smoke_sound = 0;
sound(actor, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
effectnum = 0;
for(entity ent = NULL; (ent = find(ent, classname, "dragbox_box")); )
{
- if(e.cnt <= 0 && ent.cnt == 0 || e.cnt == ent.cnt)
+ if((e.cnt <= 0 && ent.cnt == 0) || e.cnt == ent.cnt)
{
start = start + ent.origin;
++effectnum;
this.flags &= ~FL_JUMPRELEASED;
this.flags |= FL_SPAWNING;
} else if((is_spec && (PHYS_INPUT_BUTTON_ATCK(this) || CS(this).impulse == 10 || CS(this).impulse == 15 || CS(this).impulse == 18 || (CS(this).impulse >= 200 && CS(this).impulse <= 209)))
- || (!is_spec && (PHYS_INPUT_BUTTON_ATCK(this) && !CS(this).version_mismatch || this.would_spectate))) {
+ || (!is_spec && ((PHYS_INPUT_BUTTON_ATCK(this) && !CS(this).version_mismatch) || this.would_spectate))) {
this.flags &= ~FL_JUMPRELEASED;
if(SpectateNext(this)) {
TRANSMUTE(Spectator, this);