From 27ae40656181b9f772f4b92fca335059b65425e7 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Fri, 15 Sep 2023 15:45:26 +1000 Subject: [PATCH] Cleanups following ff0befb7d2c673b926cbc9bf0bbf8a1e07f2aff6 and 9d63bcaed353f093ad6297774e08c979a0135776 Some of those changes were superfluous (not required by CONTRIBUTING.md) or didn't fix existing issues. --- qcsrc/client/hud/panel/strafehud.qc | 2 +- qcsrc/client/hud/panel/weapons.qc | 4 +--- qcsrc/client/main.qc | 2 +- qcsrc/common/effects/qc/casings.qc | 2 +- qcsrc/server/bot/default/waypoints.qc | 6 +++--- qcsrc/server/items/items.qc | 4 ++-- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/qcsrc/client/hud/panel/strafehud.qc b/qcsrc/client/hud/panel/strafehud.qc index 0dd48716f..b892d6291 100644 --- a/qcsrc/client/hud/panel/strafehud.qc +++ b/qcsrc/client/hud/panel/strafehud.qc @@ -214,7 +214,7 @@ void HUD_StrafeHUD() { trace_dphitq3surfaceflags = 0; tracebox(strafeplayer.origin, strafeplayer.mins, strafeplayer.maxs, strafeplayer.origin - '0 0 1', MOVE_NOMONSTERS, strafeplayer); - onslick = (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK); + onslick = trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK; } real_onslick = onslick; diff --git a/qcsrc/client/hud/panel/weapons.qc b/qcsrc/client/hud/panel/weapons.qc index dde130da8..2863f62d9 100644 --- a/qcsrc/client/hud/panel/weapons.qc +++ b/qcsrc/client/hud/panel/weapons.qc @@ -500,10 +500,8 @@ void HUD_Weapons() else { if ((it.spawnflags & (WEP_FLAG_HIDDEN | WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_SPECIALATTACK)) - && !(weapons_stat & WepSet_FromWeapon(it))) - { + && !(weapons_stat & WepSet_FromWeapon(it))) continue; - } } // figure out the drawing position of weapon diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index 5f2332c69..58d497aab 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -744,7 +744,7 @@ NET_HANDLE(ENT_CLIENT_NAGGER, bool isnew) for(int i = 0; i < maxclients;) for(int f = ReadByte(), b = 0; b < 8 && i < maxclients; ++b, ++i) if(playerslots[i]) - playerslots[i].ready = (f & BIT(b)); + playerslots[i].ready = f & BIT(b); return = true; diff --git a/qcsrc/common/effects/qc/casings.qc b/qcsrc/common/effects/qc/casings.qc index a61a8bd09..a0923184b 100644 --- a/qcsrc/common/effects/qc/casings.qc +++ b/qcsrc/common/effects/qc/casings.qc @@ -164,7 +164,7 @@ NET_HANDLE(casings, bool isNew) return = true; - casing.silent = (casing.state & 0x80); + casing.silent = casing.state & 0x80; if ((casing.state & 0x40) && !autocvar_chase_active) casing.origin += autocvar_cl_gunoffset.x * v_forward - autocvar_cl_gunoffset.y * v_right diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index d6bc1e670..8618dad98 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -1563,9 +1563,9 @@ void waypoint_load_hardwiredlinks() { waypoint_addlink(wp_from, wp_to); waypoint_mark_hardwiredlink(wp_from, wp_to); - } else if ((wp_from.wpflags & WPFLAGMASK_NORELINK) - && ((wp_from.wpflags & (WAYPOINTFLAG_JUMP | WAYPOINTFLAG_SUPPORT)) - || (wp_from.wpisbox && (wp_from.wpflags & WAYPOINTFLAG_TELEPORT)))) + } + else if ((wp_from.wpflags & WPFLAGMASK_NORELINK) && ((wp_from.wpflags & (WAYPOINTFLAG_JUMP | WAYPOINTFLAG_SUPPORT)) + || (wp_from.wpisbox && (wp_from.wpflags & WAYPOINTFLAG_TELEPORT)))) { waypoint_addlink(wp_from, wp_to); } diff --git a/qcsrc/server/items/items.qc b/qcsrc/server/items/items.qc index ed8ba9a52..23e11ec00 100644 --- a/qcsrc/server/items/items.qc +++ b/qcsrc/server/items/items.qc @@ -577,8 +577,8 @@ bool Item_GiveTo(entity item, entity player) Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_ITEM_JETPACK_GOT); } - int its; - if((its = (item.items - ((item.items & player.items)) & IT_PICKUPMASK))) + int its = (item.items - (item.items & player.items)) & IT_PICKUPMASK; + if (its) { pickedup = true; player.items |= its; -- 2.39.2