]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
explicit parens around && / ||
authorMartin Taibr <taibr.martin@gmail.com>
Sun, 6 Oct 2019 16:15:01 +0000 (18:15 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Sun, 6 Oct 2019 16:15:01 +0000 (18:15 +0200)
qcsrc/common/physics/player.qc
qcsrc/server/bot/default/havocbot/havocbot.qc
qcsrc/server/cheats.qc
qcsrc/server/client.qc

index 5ba6e82685b3204ce2caa5da04c5862253f0c974..6fcc538234566701af304c90d16b1b8ada84af45 100644 (file)
@@ -480,7 +480,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)) { }
index 4e32ce99a0c415927749afa9f89b672f6e2a6c49..f5279f3fb5d63843603a4d03714e25bf3f978b85 100644 (file)
@@ -273,7 +273,7 @@ void havocbot_bunnyhop(entity this, vector dir)
        if (!this.goalcurrent || IS_PLAYER(this.goalcurrent))
                return;
 
-       if((this.aistatus & AI_STATUS_RUNNING) && vdist(this.velocity, <, autocvar_sv_maxspeed * 0.75)
+       if(((this.aistatus & AI_STATUS_RUNNING) && vdist(this.velocity, <, autocvar_sv_maxspeed * 0.75))
                || (this.aistatus & AI_STATUS_DANGER_AHEAD))
        {
                this.aistatus &= ~AI_STATUS_RUNNING;
index 1acab9c00535d647e18a26f1ba35ff55d0ba7cf2..f7146f72b1f40629cfa0fa1353641a7ed4d545fa 100644 (file)
@@ -563,7 +563,7 @@ float CheatCommand(entity this, int argc)
                                        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;
index 98616a76341f76ac901e838fdd7b81cb39478911..a6191f5a957942e249e750ee7d62a3fc190944a0 100644 (file)
@@ -2244,7 +2244,7 @@ void ObserverThink(entity this)
                if (PHYS_INPUT_BUTTON_JUMP(this) && joinAllowed(this)) {
                        this.flags &= ~FL_JUMPRELEASED;
                        this.flags |= FL_SPAWNING;
-               } else if(PHYS_INPUT_BUTTON_ATCK(this) && !CS(this).version_mismatch || this.would_spectate) {
+               } else if((PHYS_INPUT_BUTTON_ATCK(this) && !CS(this).version_mismatch) || this.would_spectate) {
                        this.flags &= ~FL_JUMPRELEASED;
                        if(SpectateNext(this)) {
                                TRANSMUTE(Spectator, this);