]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/physics/player.qc
Make precedence explicit in expressions where || and && are mixed (patch by martin-t)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / physics / player.qc
index 208070887fa6f087ef54d86472225c7672f82212..15e1afe58a1d2c2d7b6bb60e24281389c97ed028 100644 (file)
@@ -478,7 +478,7 @@ void CheckPlayerJump(entity this)
                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)) { }