case "menu_click":
{
string cmd = ...(0,string);
- if( cmd == "pong_throw" && minigame.minigame_flags & PONG_STATUS_WAIT )
+ if( cmd == "pong_throw" && ( minigame.minigame_flags & PONG_STATUS_WAIT ) )
{
minigame_cmd("throw");
}
if ( turnflags & PP_TURN_WIN )
{
// translator-friendly messages composed of 2 existing messages
- if ( (turnflags&PP_TURN_TEAM) != minigame_self.team )
+ if ( (turnflags & PP_TURN_TEAM) != minigame_self.team )
return strcat(_("You lost the game!"), "\n", _("Select \"^1Next Match^7\" on the menu for a rematch!"));
return strcat(_("You win!"), "\n", _("Select \"^1Next Match^7\" on the menu to start a new match!"));
}
traceline(trace_ent.origin, trace_ent.origin + '0 0 2' * PL_MIN_CONST.z, MOVE_WORLDONLY, this);
if(trace_fraction >= 1)
return;
- if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
+ if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK) || (trace_dphitcontents & DPCONTENTS_PLAYERCLIP))
return;
if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
return;
if (!(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)))
me.close(me);
- if(me.serverinfo_MOTD == "" && gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
+ if(me.serverinfo_MOTD == "" && (gamestatus & (GAME_CONNECTED | GAME_ISSERVER)))
{
// if serverinfo_MOTD is empty while connected it means we are connected to an old server
// in this case show the csqc welcome message and instantly close the dialog
{
if(me.startButton)
me.startButton.disabled = ((me.selectedItem < 0) || (me.selectedItem >= me.nItems)
- || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED) && cvar("g_campaign")));
+ || ((gamestatus & (GAME_ISSERVER | GAME_CONNECTED)) && cvar("g_campaign")));
SUPER(XonoticMapList).draw(me);
}
if (this.items & IT_JETPACK)
action_for_trigger_hurt = 1;
else if (!this.jumppadcount && !waypoint_is_hardwiredlink(this.goalcurrent_prev, this.goalcurrent)
- && !(this.goalcurrent_prev && this.goalcurrent_prev.wpflags & WAYPOINTFLAG_JUMP)
+ && !(this.goalcurrent_prev && (this.goalcurrent_prev.wpflags & WAYPOINTFLAG_JUMP))
&& GetResource(this, RES_HEALTH) + GetResource(this, RES_ARMOR) > ROCKETJUMP_DAMAGE())
{
action_for_trigger_hurt = 2;
bool bunnyhop_forbidden = false;
vector destorg = get_closer_dest(this.goalcurrent, this.origin);
- if (this.jumppadcount && this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT)
+ if (this.jumppadcount && (this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT))
{
// if bot used the jumppad, push towards jumppad origin until jumppad waypoint gets removed
destorg = this.goalcurrent.origin;
navigation_poproute(this);
++removed_goals;
- if(this.goalcurrent && this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT)
+ if(this.goalcurrent && (this.goalcurrent.wpflags & WAYPOINTFLAG_TELEPORT))
return removed_goals;
}
}
ispressingkey = boolean(bot_presskeys(this));
// Handle conditions
- if (!(bot_cmd.bot_cmd_type==BOT_CMD_FI||bot_cmd.bot_cmd_type==BOT_CMD_ELSE))
- if((this.bot_cmd_condition_status & CMD_CONDITION_true) && this.bot_cmd_condition_status & CMD_CONDITION_false_BLOCK)
+ if (!(bot_cmd.bot_cmd_type == BOT_CMD_FI || bot_cmd.bot_cmd_type == BOT_CMD_ELSE))
+ if((this.bot_cmd_condition_status & CMD_CONDITION_true) && (this.bot_cmd_condition_status & CMD_CONDITION_false_BLOCK))
{
bot_command_executed(this, true);
return -1;
}
- else if((this.bot_cmd_condition_status & CMD_CONDITION_false) && this.bot_cmd_condition_status & CMD_CONDITION_true_BLOCK)
+ else if((this.bot_cmd_condition_status & CMD_CONDITION_false) && (this.bot_cmd_condition_status & CMD_CONDITION_true_BLOCK))
{
bot_command_executed(this, true);
return -1;
{
waypoint_addlink(wp_from, wp_to);
waypoint_mark_hardwiredlink(wp_from, wp_to);
- } else if (wp_from.wpflags & WPFLAGMASK_NORELINK
+ } else if ((wp_from.wpflags & WPFLAGMASK_NORELINK)
&& ((wp_from.wpflags & (WAYPOINTFLAG_JUMP | WAYPOINTFLAG_SUPPORT))
- || (wp_from.wpisbox && wp_from.wpflags & WAYPOINTFLAG_TELEPORT)))
+ || (wp_from.wpisbox && (wp_from.wpflags & WAYPOINTFLAG_TELEPORT))))
{
waypoint_addlink(wp_from, wp_to);
}
}
int its;
- if((its = (item.items - (item.items & player.items)) & IT_PICKUPMASK))
+ if((its = (item.items - ((item.items & player.items)) & IT_PICKUPMASK)))
{
pickedup = true;
player.items |= its;
/// \param[in] item Item to check.
/// \return True if item should keep its position or false if it should be
/// dropped to the ground.
-#define ITEM_SHOULD_KEEP_POSITION(item) (item.noalign || item.spawnflags & 1)
+#define ITEM_SHOULD_KEEP_POSITION(item) (item.noalign || (item.spawnflags & 1))
/// \brief Returns whether the item is expiring (i.e. its strength, shield and
/// superweapon timers expire while it is on the ground).