From 786db02b0c9aa618c581b7c3fe7392ad114797d8 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 30 Oct 2013 13:26:29 +0100 Subject: [PATCH 1/1] Get rid of if not, step 1. --- qcsrc/client/Main.qc | 24 ++-- qcsrc/client/View.qc | 6 +- qcsrc/client/announcer.qc | 2 +- qcsrc/client/csqcmodel_hooks.qc | 2 +- qcsrc/client/damage.qc | 2 +- qcsrc/client/gibs.qc | 2 +- qcsrc/client/hud.qc | 2 +- qcsrc/client/hud_config.qc | 2 +- qcsrc/client/laser.qc | 2 +- qcsrc/client/mapvoting.qc | 4 +- qcsrc/client/miscfunctions.qc | 4 +- qcsrc/client/scoreboard.qc | 14 +- qcsrc/client/shownames.qc | 4 +- qcsrc/client/vehicles/vehicles.qc | 6 +- qcsrc/common/command/generic.qc | 2 +- qcsrc/common/deathtypes.qh | 2 +- qcsrc/common/mapinfo.qc | 22 +-- qcsrc/common/notifications.qc | 32 ++--- qcsrc/common/notifications.qh | 6 +- qcsrc/common/util.qc | 10 +- qcsrc/menu/item/button.c | 4 +- qcsrc/menu/item/container.c | 4 +- qcsrc/menu/item/dialog.c | 2 +- qcsrc/menu/item/inputcontainer.c | 10 +- qcsrc/menu/item/nexposee.c | 8 +- qcsrc/menu/menu.qc | 2 +- qcsrc/menu/xonotic/checkbox.c | 4 +- qcsrc/menu/xonotic/checkbox_string.c | 4 +- qcsrc/menu/xonotic/colorbutton.c | 4 +- qcsrc/menu/xonotic/colorpicker_string.c | 4 +- qcsrc/menu/xonotic/crosshairbutton.c | 4 +- .../dialog_multiplayer_join_serverinfo.c | 4 +- ...ialog_multiplayer_playersetup_hudconfirm.c | 2 +- qcsrc/menu/xonotic/gametypebutton.c | 4 +- qcsrc/menu/xonotic/inputbox.c | 4 +- qcsrc/menu/xonotic/maplist.c | 8 +- qcsrc/menu/xonotic/radiobutton.c | 4 +- qcsrc/menu/xonotic/serverlist.c | 4 +- qcsrc/menu/xonotic/slider.c | 4 +- qcsrc/menu/xonotic/slider_decibels.c | 4 +- qcsrc/menu/xonotic/textslider.c | 4 +- qcsrc/menu/xonotic/util.qc | 2 +- qcsrc/server/accuracy.qc | 2 +- qcsrc/server/bot/bot.qc | 4 +- qcsrc/server/bot/havocbot/havocbot.qc | 10 +- qcsrc/server/bot/havocbot/role_onslaught.qc | 8 +- qcsrc/server/bot/navigation.qc | 18 +-- qcsrc/server/bot/scripting.qc | 2 +- qcsrc/server/bot/waypoints.qc | 6 +- qcsrc/server/cl_client.qc | 20 +-- qcsrc/server/cl_impulse.qc | 4 +- qcsrc/server/cl_physics.qc | 8 +- qcsrc/server/cl_player.qc | 12 +- qcsrc/server/cl_weapons.qc | 2 +- qcsrc/server/cl_weaponsystem.qc | 12 +- qcsrc/server/command/cmd.qc | 6 +- qcsrc/server/command/common.qc | 4 +- qcsrc/server/command/getreplies.qc | 6 +- qcsrc/server/command/sv_cmd.qc | 4 +- qcsrc/server/command/vote.qc | 30 ++--- qcsrc/server/ent_cs.qc | 4 +- qcsrc/server/func_breakable.qc | 2 +- qcsrc/server/g_damage.qc | 22 +-- qcsrc/server/g_hook.qc | 2 +- qcsrc/server/g_subs.qc | 4 +- qcsrc/server/g_triggers.qc | 24 ++-- qcsrc/server/g_world.qc | 2 +- qcsrc/server/ipban.qc | 2 +- qcsrc/server/item_key.qc | 8 +- qcsrc/server/miscfunctions.qc | 10 +- qcsrc/server/mutators/base.qc | 2 +- qcsrc/server/mutators/gamemode_assault.qc | 20 +-- qcsrc/server/mutators/gamemode_ctf.qc | 14 +- qcsrc/server/mutators/gamemode_domination.qc | 2 +- qcsrc/server/mutators/gamemode_freezetag.qc | 2 +- qcsrc/server/mutators/gamemode_keepaway.qc | 4 +- qcsrc/server/mutators/gamemode_keyhunt.qc | 6 +- qcsrc/server/mutators/gamemode_nexball.qc | 4 +- qcsrc/server/mutators/gamemode_onslaught.qc | 6 +- qcsrc/server/mutators/mutator_minstagib.qc | 12 +- qcsrc/server/mutators/mutator_nades.qc | 4 +- qcsrc/server/mutators/mutator_new_toys.qc | 2 +- qcsrc/server/mutators/mutator_nix.qc | 2 +- .../server/mutators/mutator_physical_items.qc | 2 +- qcsrc/server/mutators/mutator_superspec.qc | 6 +- qcsrc/server/mutators/mutator_touchexplode.qc | 6 +- qcsrc/server/mutators/sandbox.qc | 6 +- qcsrc/server/pathlib.qc | 22 +-- qcsrc/server/pathlib/main.qc | 14 +- qcsrc/server/pathlib/movenode.qc | 2 +- qcsrc/server/pathlib/path_waypoint.qc | 6 +- qcsrc/server/pathlib/utility.qc | 16 +-- qcsrc/server/portals.qc | 6 +- qcsrc/server/race.qc | 12 +- qcsrc/server/scores.qc | 8 +- qcsrc/server/scores_rules.qc | 4 +- qcsrc/server/secret.qc | 4 +- qcsrc/server/sv_main.qc | 8 +- qcsrc/server/t_halflife.qc | 2 +- qcsrc/server/t_items.qc | 16 +-- qcsrc/server/t_jumppads.qc | 2 +- qcsrc/server/t_plats.qc | 48 +++---- qcsrc/server/t_quake3.qc | 2 +- qcsrc/server/t_teleporters.qc | 8 +- qcsrc/server/teamplay.qc | 2 +- .../server/tturrets/system/system_aimprocs.qc | 2 +- qcsrc/server/tturrets/system/system_damage.qc | 2 +- qcsrc/server/tturrets/system/system_main.qc | 126 +++++++++--------- .../tturrets/units/unit_fusionreactor.qc | 2 +- .../server/tturrets/units/unit_machinegun.qc | 2 +- qcsrc/server/tturrets/units/unit_tessla.qc | 4 +- qcsrc/server/vehicles/bumblebee.qc | 4 +- qcsrc/server/vehicles/racer.qc | 6 +- qcsrc/server/vehicles/raptor.qc | 2 +- qcsrc/server/vehicles/spiderbot.qc | 8 +- qcsrc/server/vehicles/vehicles.qc | 10 +- qcsrc/server/w_common.qc | 16 +-- qcsrc/server/w_crylink.qc | 2 +- qcsrc/server/w_electro.qc | 2 +- qcsrc/server/w_hagar.qc | 4 +- qcsrc/server/w_hlac.qc | 2 +- qcsrc/server/w_hook.qc | 8 +- qcsrc/server/w_minelayer.qc | 2 +- qcsrc/server/w_nex.qc | 2 +- qcsrc/server/w_rocketlauncher.qc | 4 +- qcsrc/server/w_shotgun.qc | 2 +- qcsrc/server/w_tuba.qc | 2 +- qcsrc/server/w_uzi.qc | 6 +- qcsrc/server/waypointsprites.qc | 2 +- qcsrc/warpzonelib/client.qc | 2 +- qcsrc/warpzonelib/common.qc | 2 +- qcsrc/warpzonelib/server.qc | 20 +-- 132 files changed, 505 insertions(+), 505 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 8e36cc9b5..e43320256 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -5,7 +5,7 @@ entity clearentity_ent; void clearentity(entity e) { - if not(clearentity_ent) + if (!clearentity_ent) { clearentity_ent = spawn(); clearentity_ent.classname = "clearentity"; @@ -187,11 +187,11 @@ void Shutdown(void) if(autocvar_chase_active < 0) cvar_set("chase_active", "0"); - if not(isdemo()) + if (!isdemo()) { - if not(calledhooks & HOOK_START) + if (!(calledhooks & HOOK_START)) localcmd("\n_cl_hook_gamestart nop\n"); - if not(calledhooks & HOOK_END) + if (!(calledhooks & HOOK_END)) localcmd("\ncl_hook_gameend\n"); } } @@ -247,7 +247,7 @@ float SetTeam(entity o, float Team) } else { - if not(o.has_team) + if (!o.has_team) { o.team = Team; tm = GetTeam(Team, true); @@ -288,10 +288,10 @@ void Playerchecker_Think() } else { - if not(e.sort_prev) + if (!e.sort_prev) { // player connected - if not(e) + if (!e) playerslots[i] = e = spawn(); e.sv_entnum = i; e.ping = 0; @@ -433,13 +433,13 @@ void Ent_ReadPlayerScore() self.sv_entnum = n; - if not(playerslots[self.sv_entnum]) + if (!(playerslots[self.sv_entnum])) playerslots[self.sv_entnum] = spawn(); o = self.owner = playerslots[self.sv_entnum]; o.sv_entnum = self.sv_entnum; o.gotscores = 1; - //if not(o.sort_prev) + //if (!o.sort_prev) // RegisterPlayer(o); //playerchecker will do this for us later, if it has not already done so @@ -588,7 +588,7 @@ void Ent_Nagger() { f = ReadByte(); for(j = i-1, b = 1; b < 256; b *= 2, ++j) - if not(f & b) + if (!(f & b)) if(playerslots[j]) playerslots[j].ready = 0; } @@ -882,7 +882,7 @@ void CSQC_Ent_Remove() void Gamemode_Init() { - if not(isdemo()) + if (!isdemo()) { if(!(calledhooks & HOOK_START)) localcmd("\n_cl_hook_gamestart ", MapInfo_Type_ToString(gametype), "\n"); @@ -1159,7 +1159,7 @@ void Net_ReadPingPLReport() pi = ReadShort(); pl = ReadByte(); ml = ReadByte(); - if not(playerslots[e]) + if (!(playerslots[e])) return; playerslots[e].ping = pi; playerslots[e].ping_packetloss = pl / 255.0; diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 46920a417..486d763da 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -745,7 +745,7 @@ void CSQC_UpdateView(float w, float h) drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0); if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright) - if not(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT) + if (!(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT)) { // apply night vision effect vector tc_00, tc_01, tc_10, tc_11; @@ -1104,7 +1104,7 @@ void CSQC_UpdateView(float w, float h) // crosshair goes VERY LAST if(!scoreboard_active && !camera_active && intermission != 2 && spectatee_status != -1 && hud == HUD_NORMAL) { - if not(autocvar_crosshair_enabled) // main toggle for crosshair rendering + if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering return; string wcross_style; @@ -1431,7 +1431,7 @@ void CSQC_UpdateView(float w, float h) if(autocvar_crosshair_effect_time > 0) { f = (time - wcross_name_changestarttime) / autocvar_crosshair_effect_time; - if not(f < 1) + if (!(f < 1)) { wcross_ring_prev = ((ring_image) ? TRUE : FALSE); } diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index b53c04da0..64807b402 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -65,7 +65,7 @@ void Announcer_Gamestart() if(time < startTime) { entity e = find(world, classname, "announcer_countdown"); - if not(e) + if (!e) { e = spawn(); e.classname = "announcer_countdown"; diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 3837ed4c9..03c7eedd7 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -121,7 +121,7 @@ void CSQCPlayer_ModelAppearance_Apply(float islocalplayer) { // FORCEMODEL // which one is ALWAYS good? - if not(forceplayermodels_goodmodel) + if (!forceplayermodels_goodmodel) { entity e; e = spawn(); diff --git a/qcsrc/client/damage.qc b/qcsrc/client/damage.qc index cd7ac7bfa..a6dff7271 100644 --- a/qcsrc/client/damage.qc +++ b/qcsrc/client/damage.qc @@ -133,7 +133,7 @@ void Ent_DamageInfo(float isNew) force = decompressShortVector(ReadShort()); species = ReadByte(); - if not(isNew) + if (!isNew) return; if(rad < 0) diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index afd61edab..8c4081674 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -185,7 +185,7 @@ void Ent_GibSplash(float isNew) gentle_prefix = "particlegibs_"; } - if not(cl_gentle_gibs || autocvar_cl_gentle) + if (!(cl_gentle_gibs || autocvar_cl_gentle)) amount *= 1 - autocvar_cl_nogibs; if(autocvar_ekg) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 398078ace..fba8b7b4f 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -734,7 +734,7 @@ void HUD_Weapons(void) // skip this weapon if we don't own it (and onlyowned is enabled)-- or if weapons_complainbubble is showing for this weapon if(autocvar_hud_panel_weapons_onlyowned) - if not((weapons_stat & WepSet_FromWeapon(self.weapon)) || (self.weapon == complain_weapon)) + if (!((weapons_stat & WepSet_FromWeapon(self.weapon)) || (self.weapon == complain_weapon))) continue; // figure out the drawing position of weapon diff --git a/qcsrc/client/hud_config.qc b/qcsrc/client/hud_config.qc index ca8ec19c1..be53f450f 100644 --- a/qcsrc/client/hud_config.qc +++ b/qcsrc/client/hud_config.qc @@ -1087,7 +1087,7 @@ void HUD_Panel_Mouse() if(autocvar__menu_alpha == 1) return; - if not(autocvar_hud_cursormode) + if (!autocvar_hud_cursormode) { mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed; diff --git a/qcsrc/client/laser.qc b/qcsrc/client/laser.qc index 49aa033c1..f6b3fc4cb 100644 --- a/qcsrc/client/laser.qc +++ b/qcsrc/client/laser.qc @@ -52,7 +52,7 @@ void Draw_Laser() Draw_CylindricLine(self.origin, trace_endpos, self.scale, "particles/laserbeam", 0, time * 3, self.colormod, 0.5, DRAWFLAG_ADDITIVE, view_origin); } } - if not(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT)) + if (!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT))) { if(self.cnt >= 0) pointparticles(self.cnt, trace_endpos, trace_plane_normal, drawframetime * 1000); diff --git a/qcsrc/client/mapvoting.qc b/qcsrc/client/mapvoting.qc index 107b25d71..796db00d8 100644 --- a/qcsrc/client/mapvoting.qc +++ b/qcsrc/client/mapvoting.qc @@ -176,7 +176,7 @@ void MapVote_Draw() if(!mv_active) return; - if not(autocvar_hud_cursormode) + if (!autocvar_hud_cursormode) { mv_mousepos = mv_mousepos + getmousepos(); @@ -470,7 +470,7 @@ void MapVote_UpdateMask() // remove votes that no longer apply for(i = 0, power = 1; i < mv_num_maps; ++i, power *= 2) - if not(mv_maps_mask & power) + if (!(mv_maps_mask & power)) mv_votes[i] = -1; mv_top2_time = time; diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index 926e11399..7f1b893a7 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -111,7 +111,7 @@ entity GetTeam(float Team, float add) num = (Team == NUM_SPECTATOR) ? 16 : Team; if(teamslots[num]) return teamslots[num]; - if not(add) + if (!add) return world; tm = spawn(); tm.team = Team; @@ -385,7 +385,7 @@ float PolyDrawModelSurface(entity e, float i_s) vector tri; string tex; tex = getsurfacetexture(e, i_s); - if not(tex) + if (!tex) return 0; // this is beyond the last one n_t = getsurfacenumtriangles(e, i_s); for(i_t = 0; i_t < n_t; ++i_t) diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index 339c8b29b..7c79d5c43 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -375,7 +375,7 @@ void Cmd_HUD_SetFields(float argc) pattern = substring(str, 0, slash); str = substring(str, slash + 1, strlen(str) - (slash + 1)); - if not(isGametypeInFilter(gametype, teamplay, FALSE, pattern)) + if (!isGametypeInFilter(gametype, teamplay, FALSE, pattern)) continue; } @@ -409,7 +409,7 @@ void Cmd_HUD_SetFields(float argc) } else { - if not(nocomplain) + if (!nocomplain) print(sprintf("^1Error:^7 Unknown score field: '%s'\n", str)); continue; } @@ -526,7 +526,7 @@ string HUD_GetField(entity pl, float field) switch(field) { case SP_PING: - if not(pl.gotscores) + if (!pl.gotscores) return "\xEE\x82\x8D\xEE\x82\x8D\xEE\x82\x8D"; // >>> sign //str = getplayerkeyvalue(pl.sv_entnum, "ping"); f = pl.ping; @@ -537,7 +537,7 @@ string HUD_GetField(entity pl, float field) return ftos(f); case SP_PL: - if not(pl.gotscores) + if (!pl.gotscores) return _("N/A"); f = pl.ping_packetloss; tmp = pl.ping_movementloss; @@ -1024,7 +1024,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) for(i = WEP_FIRST; i <= WEP_LAST; ++i) { self = get_weaponinfo(i); - if not(self.weapon) + if (!self.weapon) continue; if ((i == WEP_NEX && g_minstagib) || i == WEP_PORTO || (i == WEP_MINSTANEX && !g_minstagib) || i == WEP_TUBA) // skip port-o-launch, nex || minstanex and tuba continue; @@ -1098,7 +1098,7 @@ vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) { rows = (stat_secrets_total ? 1 : 0); // if no rows, return - if not(rows) + if (!rows) return pos; // draw table header @@ -1207,7 +1207,7 @@ void HUD_DrawScoreboard() scoreboard_fade_alpha = 0; } - if not(scoreboard_fade_alpha) + if (!scoreboard_fade_alpha) return; HUD_UpdatePlayerTeams(); diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index f20f143b0..2ca411a1b 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -57,7 +57,7 @@ void Draw_ShowNames(entity ent) if(e == ent) continue; eo = project_3d_to_2d(e.origin); - if not(eo_z < 0 || eo_x < 0 || eo_y < 0 || eo_x > vid_conwidth || eo_y > vid_conheight) + if (!(eo_z < 0 || eo_x < 0 || eo_y < 0 || eo_x > vid_conwidth || eo_y > vid_conheight)) { eo_z = 0; if(vlen((eX * o_x + eY * o_y) - eo) < autocvar_hud_shownames_antioverlap_distance && vlen(ent.origin - view_origin) > vlen(e.origin - view_origin)) @@ -77,7 +77,7 @@ void Draw_ShowNames(entity ent) if(autocvar_hud_shownames_crosshairdistance > crosshairdistance) ent.pointtime = time; - if not(ent.pointtime + autocvar_hud_shownames_crosshairdistance_time > time) + if (!(ent.pointtime + autocvar_hud_shownames_crosshairdistance_time > time)) overlap = TRUE; else overlap = (autocvar_hud_shownames_crosshairdistance_antioverlap ? overlap : FALSE); // override what antioverlap says unless allowed by cvar. diff --git a/qcsrc/client/vehicles/vehicles.qc b/qcsrc/client/vehicles/vehicles.qc index c95185d74..6efc2f953 100644 --- a/qcsrc/client/vehicles/vehicles.qc +++ b/qcsrc/client/vehicles/vehicles.qc @@ -75,7 +75,7 @@ void AuxiliaryXhair_Draw2D() psize = self.axh_scale * draw_getimagesize(self.axh_image); loc = project_3d_to_2d(self.move_origin) - 0.5 * psize; - if not (loc_z < 0 || loc_x < 0 || loc_y < 0 || loc_x > vid_conwidth || loc_y > vid_conheight) + if (!(loc_z < 0 || loc_x < 0 || loc_y < 0 || loc_x > vid_conwidth || loc_y > vid_conheight)) { loc_z = 0; psize_z = 0; @@ -808,7 +808,7 @@ void CSQC_RAPTOR_HUD() setorigin(dropmark, trace_endpos); picsize = draw_getimagesize(raptor_drop) * 0.2; - if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight) + if (!(where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)) { where_x -= picsize_x * 0.5; where_y -= picsize_y * 0.5; @@ -825,7 +825,7 @@ void CSQC_RAPTOR_HUD() where = project_3d_to_2d(dropmark.origin); picsize = draw_getimagesize(raptor_drop) * 0.25; - if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight) + if (!(where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)) { where_x -= picsize_x * 0.5; where_y -= picsize_y * 0.5; diff --git a/qcsrc/common/command/generic.qc b/qcsrc/common/command/generic.qc index 4ca8b3780..d119bd25b 100644 --- a/qcsrc/common/command/generic.qc +++ b/qcsrc/common/command/generic.qc @@ -41,7 +41,7 @@ void Curl_URI_Get_Callback(float id, float status, string data) strunzone(do_cvar); } if(!do_exec) - if not(do_cvar) + if (!do_cvar) print(data); } diff --git a/qcsrc/common/deathtypes.qh b/qcsrc/common/deathtypes.qh index cc7154d4b..4f96f7500 100644 --- a/qcsrc/common/deathtypes.qh +++ b/qcsrc/common/deathtypes.qh @@ -96,7 +96,7 @@ string Deathtype_Name(float deathtype) if(DEATH_ISSPECIAL(deathtype)) { entity deathent = deathtypes[(deathtype - DT_FIRST)]; - if not(deathent) { backtrace("Deathtype_Name: Could not find deathtype entity!\n"); return ""; } + if (!deathent) { backtrace("Deathtype_Name: Could not find deathtype entity!\n"); return ""; } return deathent.nent_name; } else { return ftos(deathtype); } diff --git a/qcsrc/common/mapinfo.qc b/qcsrc/common/mapinfo.qc index aa906d684..78c3b750d 100644 --- a/qcsrc/common/mapinfo.qc +++ b/qcsrc/common/mapinfo.qc @@ -141,7 +141,7 @@ float _MapInfo_FilterList_cmp(float i, float j, entity pass) float MapInfo_FilterGametype(float pGametype, float pFeatures, float pFlagsRequired, float pFlagsForbidden, float pAbortOnGenerate) { float i, j; - if not(_MapInfo_filtered_allocated) + if (!_MapInfo_filtered_allocated) { _MapInfo_filtered_allocated = 1; _MapInfo_filtered = buf_create(); @@ -257,7 +257,7 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp for(;;) { - if not((s = fgets(fh))) + if (!((s = fgets(fh)))) break; if(inWorldspawn == 1) if(startsWith(s, "}")) @@ -756,7 +756,7 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s, { for(;;) { - if not((s = fgets(fh))) + if (!((s = fgets(fh)))) break; // catch different sorts of comments @@ -784,9 +784,9 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s, } else if(t == "") print("Map ", pFilename, " contains a potentially harmful setting, ignored\n"); - else if not(cvar_value_issafe(t)) + else if (!cvar_value_issafe(t)) print("Map ", pFilename, " contains a potentially harmful setting, ignored\n"); - else if not (cvar_value_issafe(s)) + else if (!cvar_value_issafe(s)) print("Map ", pFilename, " contains a potentially harmful setting, ignored\n"); else if(matchacl(MAPINFO_SETTEMP_ACL_SYSTEM, t) <= 0) print("Map ", pFilename, " contains a potentially harmful setting, ignored\n"); @@ -946,7 +946,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo _MapInfo_Map_Reset(); for(;;) { - if not((s = fgets(fh))) + if (!((s = fgets(fh)))) break; // catch different sorts of comments @@ -1078,7 +1078,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo } else if(t == "fog") { - if not(cvar_value_issafe(s)) + if (!cvar_value_issafe(s)) print("Map ", pFilename, " contains a potentially harmful fog setting, ignored\n"); else MapInfo_Map_fog = s; @@ -1088,7 +1088,7 @@ float MapInfo_Get_ByName_NoFallbacks(string pFilename, float pAllowGenerate, flo t = car(s); s = cdr(s); if(pGametypeToSet) // FIXME is this check right here? { - if not(cvar_value_issafe(t)) + if (!cvar_value_issafe(t)) print("Map ", pFilename, " contains a potentially harmful cdtrack, ignored\n"); else MapInfo_Map_clientstuff = strcat( @@ -1121,7 +1121,7 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype if(cvar("g_tdm_on_dm_maps")) { // if this is set, all DM maps support TDM too - if not(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH) + if (!(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_TEAM_DEATHMATCH)) if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_DEATHMATCH) _MapInfo_Map_ApplyGametypeEx ("", pGametypeToSet, MAPINFO_TYPE_TEAM_DEATHMATCH); } @@ -1369,11 +1369,11 @@ float MapInfo_ForbiddenFlags() f = MAPINFO_FLAG_FORBIDDEN; #ifndef MENUQC - if not(cvar("g_maplist_allow_hidden")) + if (!cvar("g_maplist_allow_hidden")) #endif f |= MAPINFO_FLAG_HIDDEN; - if not(cvar("g_maplist_allow_frustrating")) + if (!cvar("g_maplist_allow_frustrating")) f |= MAPINFO_FLAG_FRUSTRATING; return f; diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 09c049681..8c675fb12 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -105,15 +105,15 @@ string Notification_CheckArgs( case NOTIF_TEAM: { - if not(teamplay) + if (!teamplay) { checkargs = sprintf("%sTeamplay not active!", checkargs); } - //else if not(client.team) { checkargs = sprintf("%sNo team provided!", checkargs); } + //else if (!client.team) { checkargs = sprintf("%sNo team provided!", checkargs); } break; } case NOTIF_TEAM_EXCEPT: { - if not(teamplay) + if (!teamplay) { checkargs = sprintf("%sTeamplay not active!", checkargs); } else if(IS_NOT_A_CLIENT(client)) { checkargs = sprintf("%sException can't be a non-client!", checkargs); } @@ -230,7 +230,7 @@ void Destroy_All_Notifications(void) for(i = 1; i <= count; ++i) \ { \ notif = Get_Notif_Ent(type, i); \ - if not(notif) { backtrace("Destroy_All_Notifications(): Missing notification entity!\n"); return; } \ + if (!notif) { backtrace("Destroy_All_Notifications(): Missing notification entity!\n"); return; } \ Destroy_Notification_Entity(notif); \ } @@ -576,7 +576,7 @@ void Create_Notification_Entity( { // Set MSG_ANNCE information and handle precaching #ifdef CSQC - if not(GENTLE && (var_cvar == 1)) + if (!(GENTLE && (var_cvar == 1))) { if(snd != "") { @@ -1004,7 +1004,7 @@ void Dump_Notifications(float fh, float alsoprint) for(i = 1; i <= NOTIF_ANNCE_COUNT; ++i) { e = Get_Notif_Ent(MSG_ANNCE, i); - if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } + if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } NOTIF_WRITE_ENTITY( "Notification control cvar: 0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled)" @@ -1015,7 +1015,7 @@ void Dump_Notifications(float fh, float alsoprint) for(i = 1; i <= NOTIF_INFO_COUNT; ++i) { e = Get_Notif_Ent(MSG_INFO, i); - if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } + if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } NOTIF_WRITE_ENTITY( "Notification control cvar: 0 = off, 1 = print to console, " @@ -1027,7 +1027,7 @@ void Dump_Notifications(float fh, float alsoprint) for(i = 1; i <= NOTIF_CENTER_COUNT; ++i) { e = Get_Notif_Ent(MSG_CENTER, i); - if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } + if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } NOTIF_WRITE_ENTITY( "Notification control cvar: 0 = off, 1 = centerprint" @@ -1038,7 +1038,7 @@ void Dump_Notifications(float fh, float alsoprint) for(i = 1; i <= NOTIF_MULTI_COUNT; ++i) { e = Get_Notif_Ent(MSG_MULTI, i); - if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } + if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } NOTIF_WRITE_ENTITY( "Notification control cvar: 0 = off, 1 = trigger subcalls" @@ -1049,7 +1049,7 @@ void Dump_Notifications(float fh, float alsoprint) for(i = 1; i <= NOTIF_CHOICE_COUNT; ++i) { e = Get_Notif_Ent(MSG_CHOICE, i); - if not(e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } + if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; } NOTIF_WRITE_ENTITY_CHOICE( "Notification control cvar: 0 = off, 1 = trigger option A subcall, 2 = trigger option B subcall", @@ -1437,7 +1437,7 @@ void Local_Notification(float net_type, float net_name, ...count) // retreive entity of this notification entity notif = Get_Notif_Ent(net_type, net_name); - if not(notif) + if (!notif) { #ifdef NOTIFICATIONS_DEBUG Debug_Notification(sprintf( @@ -1451,7 +1451,7 @@ void Local_Notification(float net_type, float net_name, ...count) } // check if the notification is enabled - if not(notif.nent_enabled) + if (!notif.nent_enabled) { #ifdef NOTIFICATIONS_DEBUG Debug_Notification(sprintf( @@ -1695,7 +1695,7 @@ void Read_Notification(float is_new) else { notif = Get_Notif_Ent(net_type, net_name); - if not(notif) { backtrace("Read_Notification: Could not find notification entity!\n"); return; } + if (!notif) { backtrace("Read_Notification: Could not find notification entity!\n"); return; } #ifdef NOTIFICATIONS_DEBUG Debug_Notification(sprintf( @@ -1732,7 +1732,7 @@ void Read_Notification(float is_new) #ifdef SVQC void Net_Notification_Remove() { - if not(self) { backtrace(sprintf("Net_Notification_Remove() at %f: Missing self!?\n", time)); return; } + if (!self) { backtrace(sprintf("Net_Notification_Remove() at %f: Missing self!?\n", time)); return; } #ifdef NOTIFICATIONS_DEBUG Debug_Notification(sprintf( @@ -1797,7 +1797,7 @@ void Kill_Notification( if(net_name) { entity notif = Get_Notif_Ent(net_type, net_name); - if not(notif) { backtrace("Kill_Notification: Could not find notification entity!\n"); return; } + if (!notif) { backtrace("Kill_Notification: Could not find notification entity!\n"); return; } if(notif.nent_cpid) killed_cpid = notif.nent_cpid; @@ -1896,7 +1896,7 @@ void Send_Notification( // retreive entity of this notification entity notif = Get_Notif_Ent(net_type, net_name); - if not(notif) + if (!notif) { #ifdef NOTIFICATIONS_DEBUG Debug_Notification(sprintf( diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index e8e92f018..84864bb45 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -990,7 +990,7 @@ string notif_arg_frag_ping(float newline, float fping) string notif_arg_frag_stats(float fhealth, float farmor, float fping) { - if not(fhealth < 1) + if (!(fhealth < 1)) return sprintf(CCR(_("\n(Health ^1%d^BG / Armor ^2%d^BG)%s")), fhealth, farmor, notif_arg_frag_ping(FALSE, fping)); else return sprintf(CCR(_("\n(^F4Dead^BG)%s")), notif_arg_frag_ping(FALSE, fping)); @@ -1037,7 +1037,7 @@ string notif_arg_spree_cen(float spree) KILL_SPREE_LIST default: { - if not(autocvar_notification_show_sprees_center_specialonly) + if (!autocvar_notification_show_sprees_center_specialonly) { return sprintf( @@ -1095,7 +1095,7 @@ string notif_arg_spree_inf(float type, string input, string player, float spree) KILL_SPREE_LIST default: { - if not(autocvar_notification_show_sprees_info_specialonly) + if (!autocvar_notification_show_sprees_info_specialonly) { return sprintf( diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 85efe4144..11dbdaedb 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -241,7 +241,7 @@ vector colormapPaletteColor(float c, float isPants) string fstrunzone(string s) { string sc; - if not(s) + if (!s) return s; sc = strcat(s, ""); strunzone(s); @@ -866,7 +866,7 @@ float cvar_settemp(string tmp_cvar, string tmp_value) created_saved_value = 0; - if not(tmp_cvar || tmp_value) + if (!(tmp_cvar || tmp_value)) { dprint("Error: Invalid usage of cvar_settemp(string, string); !\n"); return 0; @@ -1476,7 +1476,7 @@ float isGametypeInFilter(float gt, float tp, float ts, string pattern) if(strstrofs(strcat(",", pattern, ","), subpattern2, 0) < 0) if(strstrofs(strcat(",", pattern, ","), subpattern3, 0) < 0) { - if not(subpattern4) + if (!subpattern4) return 0; if(strstrofs(strcat(",", pattern, ","), subpattern4, 0) < 0) return 0; @@ -1712,7 +1712,7 @@ void check_unacceptable_compiler_bugs() error("fteqcc bug introduced with revision 3178 detected. Please upgrade fteqcc to a later revision, downgrade fteqcc to revision 3177, or pester Spike until he fixes it. You can set _allow_unacceptable_compiler_bugs 1 to skip this check, but expect stuff to be horribly broken then."); string s = ""; - if not(s) + if (!s) error("The empty string counts as false. We do not want that!"); } @@ -2052,7 +2052,7 @@ float get_model_parameters(string m, float sk) } get_model_parameters_fixbone = 0; - if not(m) + if (!m) return 1; if(substring(m, -9, 5) == "_lod1" || substring(m, -9, 5) == "_lod2") diff --git a/qcsrc/menu/item/button.c b/qcsrc/menu/item/button.c index 6b32bae27..8bbdfa704 100644 --- a/qcsrc/menu/item/button.c +++ b/qcsrc/menu/item/button.c @@ -77,7 +77,7 @@ float Button_mouseRelease(entity me, vector pos) me.mouseDrag(me, pos); // verify coordinates if(me.pressed) { - if not(me.disabled) + if (!me.disabled) { if(cvar("menu_sounds")) localsound("sound/misc/menu2.wav"); @@ -162,7 +162,7 @@ void Button_draw(entity me) if(me.clickTime > 0 && me.clickTime <= frametime) { // keyboard click timer expired? Fire the event then. - if not(me.disabled) + if (!me.disabled) if(me.onClick) me.onClick(me, me.onClickEntity); } diff --git a/qcsrc/menu/item/container.c b/qcsrc/menu/item/container.c index 6241cee03..b09cb01a9 100644 --- a/qcsrc/menu/item/container.c +++ b/qcsrc/menu/item/container.c @@ -85,7 +85,7 @@ void Container_showNotify(entity me) void Container_hideNotify(entity me) { entity e; - if not(me.shown) + if (!me.shown) return; me.shown = 0; for(e = me.firstChild; e; e = e.nextSibling) @@ -347,7 +347,7 @@ void Container_removeItem(entity me, entity other) void Container_setFocus(entity me, entity other) { if(other) - if not(me.focused) + if (!me.focused) error("Trying to set focus in a non-focused control!"); if(me.focusedChild == other) return; diff --git a/qcsrc/menu/item/dialog.c b/qcsrc/menu/item/dialog.c index 5fa010353..4356c26b1 100644 --- a/qcsrc/menu/item/dialog.c +++ b/qcsrc/menu/item/dialog.c @@ -135,7 +135,7 @@ void Dialog_configureDialog(entity me) me.frame.alpha = me.alpha; me.addItem(me, me.frame, '0 0 0', '1 1 0', 1); - if not(me.titleFontSize) + if (!me.titleFontSize) me.titleHeight = 0; // no title bar absWidth = me.intendedWidth * conwidth; diff --git a/qcsrc/menu/item/inputcontainer.c b/qcsrc/menu/item/inputcontainer.c index 4531a1f4e..0f80c2b50 100644 --- a/qcsrc/menu/item/inputcontainer.c +++ b/qcsrc/menu/item/inputcontainer.c @@ -56,7 +56,7 @@ float InputContainer_keyDown(entity me, float scan, float ascii, float shift) { for(ff = f.prevSibling; ff; ff = ff.prevSibling) { - if not(ff.focusable) + if (!ff.focusable) continue; me.setFocus(me, ff); return 1; @@ -66,7 +66,7 @@ float InputContainer_keyDown(entity me, float scan, float ascii, float shift) { for(ff = me.lastChild; ff; ff = ff.prevSibling) { - if not(ff.focusable) + if (!ff.focusable) continue; me.setFocus(me, ff); return 1; @@ -80,7 +80,7 @@ float InputContainer_keyDown(entity me, float scan, float ascii, float shift) { for(ff = f.nextSibling; ff; ff = ff.nextSibling) { - if not(ff.focusable) + if (!ff.focusable) continue; me.setFocus(me, ff); return 1; @@ -90,7 +90,7 @@ float InputContainer_keyDown(entity me, float scan, float ascii, float shift) { for(ff = me.firstChild; ff; ff = ff.nextSibling) { - if not(ff.focusable) + if (!ff.focusable) continue; me.setFocus(me, ff); return 1; @@ -108,7 +108,7 @@ float InputContainer__changeFocusXY(entity me, vector pos) e = me.mouseFocusedChild; ne = me.itemFromPoint(me, pos); if(ne) - if not(ne.focusable) + if (!ne.focusable) ne = NULL; me.mouseFocusedChild = ne; if(ne) diff --git a/qcsrc/menu/item/nexposee.c b/qcsrc/menu/item/nexposee.c index 97eabd7d6..afe82e892 100644 --- a/qcsrc/menu/item/nexposee.c +++ b/qcsrc/menu/item/nexposee.c @@ -228,7 +228,7 @@ float Nexposee_mousePress(entity me, vector pos) } else if(me.animationState == 2) { - if not(SUPER(Nexposee).mousePress(me, pos)) + if (!(SUPER(Nexposee).mousePress(me, pos))) { me.animationState = 3; SUPER(Nexposee).setFocus(me, NULL); @@ -291,14 +291,14 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift) { if(me.selectedChild) me.selectedChild = me.selectedChild.prevSibling; - if not(me.selectedChild) + if (!me.selectedChild) me.selectedChild = me.lastChild; } else { if(me.selectedChild) me.selectedChild = me.selectedChild.nextSibling; - if not(me.selectedChild) + if (!me.selectedChild) me.selectedChild = me.firstChild; } } @@ -331,7 +331,7 @@ float Nexposee_keyDown(entity me, float scan, float ascii, float shift) } if(me.focusedChild) me.selectedChild = me.focusedChild; - if not(me.selectedChild) + if (!me.selectedChild) me.animationState = 0; SUPER(Nexposee).setFocus(me, NULL); return 1; diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index 0f2a525aa..fd6327244 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -67,7 +67,7 @@ void m_init() for(i = 0; ; ++i) { s = getgamedirinfo(i, GETGAMEDIRINFO_NAME); - if not(s) + if (!s) break; dprint(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION)); } diff --git a/qcsrc/menu/xonotic/checkbox.c b/qcsrc/menu/xonotic/checkbox.c index c28edcc07..b1a1af196 100644 --- a/qcsrc/menu/xonotic/checkbox.c +++ b/qcsrc/menu/xonotic/checkbox.c @@ -81,7 +81,7 @@ void XonoticCheckBox_loadCvars(entity me) { float m, d; - if not(me.cvarName) + if (!me.cvarName) return; m = (me.yesValue + me.noValue) * 0.5; @@ -90,7 +90,7 @@ void XonoticCheckBox_loadCvars(entity me) } void XonoticCheckBox_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(me.checked) diff --git a/qcsrc/menu/xonotic/checkbox_string.c b/qcsrc/menu/xonotic/checkbox_string.c index 3b6b36f4e..ecafefed6 100644 --- a/qcsrc/menu/xonotic/checkbox_string.c +++ b/qcsrc/menu/xonotic/checkbox_string.c @@ -50,7 +50,7 @@ void XonoticCheckBoxString_setChecked(entity me, float foo) } void XonoticCheckBoxString_loadCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(cvar_string(me.cvarName) == me.yesString) @@ -58,7 +58,7 @@ void XonoticCheckBoxString_loadCvars(entity me) } void XonoticCheckBoxString_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(me.checked) diff --git a/qcsrc/menu/xonotic/colorbutton.c b/qcsrc/menu/xonotic/colorbutton.c index fd19f280a..772c9e452 100644 --- a/qcsrc/menu/xonotic/colorbutton.c +++ b/qcsrc/menu/xonotic/colorbutton.c @@ -67,7 +67,7 @@ void XonoticColorButton_setChecked(entity me, float val) } void XonoticColorButton_loadCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(cvar_string(me.cvarName) == cvar_defstring(me.cvarName)) @@ -80,7 +80,7 @@ void XonoticColorButton_loadCvars(entity me) } void XonoticColorButton_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(me.checked) diff --git a/qcsrc/menu/xonotic/colorpicker_string.c b/qcsrc/menu/xonotic/colorpicker_string.c index c3593056c..5d53135e9 100644 --- a/qcsrc/menu/xonotic/colorpicker_string.c +++ b/qcsrc/menu/xonotic/colorpicker_string.c @@ -40,7 +40,7 @@ void XonoticColorpickerString_configureXonoticColorpickerString(entity me, strin void XonoticColorPickerString_loadCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(substring(me.cvarName, -1, 1) == "_") @@ -57,7 +57,7 @@ void XonoticColorPickerString_loadCvars(entity me) void XonoticColorPickerString_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(substring(me.cvarName, -1, 1) == "_") diff --git a/qcsrc/menu/xonotic/crosshairbutton.c b/qcsrc/menu/xonotic/crosshairbutton.c index 0b501f5b6..2703b233c 100644 --- a/qcsrc/menu/xonotic/crosshairbutton.c +++ b/qcsrc/menu/xonotic/crosshairbutton.c @@ -50,14 +50,14 @@ void XonoticCrosshairButton_setChecked(entity me, float val) } void XonoticCrosshairButton_loadCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; me.checked = (cvar(me.cvarName) == me.cvarValueFloat); } void XonoticCrosshairButton_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(me.checked) diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c b/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c index 4e6d6f590..0b9bed4df 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c @@ -232,12 +232,12 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i) me.encryptLabel.setText(me.encryptLabel, me.currentServerEncrypt); s = crypto_getidfp(me.currentServerCName); - if not(s) { s = _("N/A"); } + if (!s) { s = _("N/A"); } me.currentServerID = strzone(s); me.idLabel.setText(me.idLabel, me.currentServerID); s = crypto_getkeyfp(me.currentServerCName); - if not(s) { s = _("N/A"); } + if (!s) { s = _("N/A"); } me.currentServerKey = strzone(s); me.keyLabel.setText(me.keyLabel, me.currentServerKey); } diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hudconfirm.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hudconfirm.c index b06dc9207..f42cb35bc 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hudconfirm.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hudconfirm.c @@ -12,7 +12,7 @@ ENDCLASS(XonoticHUDConfirmDialog) #ifdef IMPLEMENTATION void HUDSetup_Start(entity me, entity btn) { - if not(gamestatus & (GAME_CONNECTED | GAME_ISSERVER)) + if (!(gamestatus & (GAME_CONNECTED | GAME_ISSERVER))) localcmd("map hudsetup/hudsetup", "\n"); else localcmd("togglemenu 0\n"); diff --git a/qcsrc/menu/xonotic/gametypebutton.c b/qcsrc/menu/xonotic/gametypebutton.c index c1dc04c73..cc10f3da9 100644 --- a/qcsrc/menu/xonotic/gametypebutton.c +++ b/qcsrc/menu/xonotic/gametypebutton.c @@ -53,14 +53,14 @@ void XonoticGametypeButton_setChecked(entity me, float val) } void XonoticGametypeButton_loadCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; me.checked = cvar(me.cvarName); } void XonoticGametypeButton_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; cvar_set(me.cvarName, ftos(me.checked)); diff --git a/qcsrc/menu/xonotic/inputbox.c b/qcsrc/menu/xonotic/inputbox.c index 56aa9702c..78bab2bcc 100644 --- a/qcsrc/menu/xonotic/inputbox.c +++ b/qcsrc/menu/xonotic/inputbox.c @@ -72,13 +72,13 @@ void XonoticInputBox_setText(entity me, string new) } void XonoticInputBox_loadCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; SUPER(XonoticInputBox).setText(me, cvar_string(me.cvarName)); } void XonoticInputBox_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; cvar_set(me.cvarName, me.text); } diff --git a/qcsrc/menu/xonotic/maplist.c b/qcsrc/menu/xonotic/maplist.c index b5af66126..ce937e4ad 100644 --- a/qcsrc/menu/xonotic/maplist.c +++ b/qcsrc/menu/xonotic/maplist.c @@ -84,7 +84,7 @@ void XonoticMapList_g_maplistCacheToggle(entity me, float i) string a, b, c, s, bspname; float n; s = me.g_maplistCache; - if not(s) + if (!s) return; b = substring(s, i, 1); if(b == "0") @@ -98,7 +98,7 @@ void XonoticMapList_g_maplistCacheToggle(entity me, float i) strunzone(s); me.g_maplistCache = strzone(strcat(a, b, c)); // TODO also update the actual cvar - if not((bspname = MapInfo_BSPName_ByID(i))) + if (!((bspname = MapInfo_BSPName_ByID(i)))) return; if(b == "1") cvar_set("g_maplist", strcat(bspname, " ", cvar_string("g_maplist"))); @@ -275,7 +275,7 @@ void MapList_LoadMap(entity btn, entity me) return; m = MapInfo_BSPName_ByID(i); - if not(m) + if (!m) { print(_("Huh? Can't play this (m is NULL). Refiltering so this won't happen again.\n")); me.refilter(me); @@ -313,7 +313,7 @@ float XonoticMapList_keyDown(entity me, float scan, float ascii, float shift) } else if(ascii == 43) // + { - if not(me.g_maplistCacheQuery(me, me.selectedItem)) + if (!me.g_maplistCacheQuery(me, me.selectedItem)) me.g_maplistCacheToggle(me, me.selectedItem); } else if(ascii == 45) // - diff --git a/qcsrc/menu/xonotic/radiobutton.c b/qcsrc/menu/xonotic/radiobutton.c index 4ac5aa7b1..85cc4fc5c 100644 --- a/qcsrc/menu/xonotic/radiobutton.c +++ b/qcsrc/menu/xonotic/radiobutton.c @@ -75,8 +75,8 @@ void XonoticRadioButton_loadCvars(entity me) } void XonoticRadioButton_draw(entity me) { - if not(me.cvarValue) - if not(me.cvarName) + if (!me.cvarValue) + if (!me.cvarName) { // this is the "other" option // always select this if none other is diff --git a/qcsrc/menu/xonotic/serverlist.c b/qcsrc/menu/xonotic/serverlist.c index 86fdf1c63..3531b68a2 100644 --- a/qcsrc/menu/xonotic/serverlist.c +++ b/qcsrc/menu/xonotic/serverlist.c @@ -663,7 +663,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float theAlpha = SKINALPHA_SERVERLIST_FULL; else if(freeslots == 0) theAlpha = SKINALPHA_SERVERLIST_FULL; // g_maxplayers support - else if not(gethostcachenumber(SLIST_FIELD_NUMHUMANS, i)) + else if (!gethostcachenumber(SLIST_FIELD_NUMHUMANS, i)) theAlpha = SKINALPHA_SERVERLIST_EMPTY; else theAlpha = 1; @@ -747,7 +747,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float string n; - if not(me.seenIPv4 && me.seenIPv6) + if (!(me.seenIPv4 && me.seenIPv6)) { iconPos_x += iconSize_x * 0.5; } diff --git a/qcsrc/menu/xonotic/slider.c b/qcsrc/menu/xonotic/slider.c index e833bb125..0577207ca 100644 --- a/qcsrc/menu/xonotic/slider.c +++ b/qcsrc/menu/xonotic/slider.c @@ -58,14 +58,14 @@ void XonoticSlider_setValue(entity me, float val) } void XonoticSlider_loadCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; me.setValue( me, cvar(me.cvarName) ); } void XonoticSlider_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; cvar_set(me.cvarName, ftos(me.value)); diff --git a/qcsrc/menu/xonotic/slider_decibels.c b/qcsrc/menu/xonotic/slider_decibels.c index 0ea9d161f..f70f43397 100644 --- a/qcsrc/menu/xonotic/slider_decibels.c +++ b/qcsrc/menu/xonotic/slider_decibels.c @@ -48,7 +48,7 @@ void XonoticDecibelsSlider_loadCvars(entity me) { float v; - if not(me.cvarName) + if (!me.cvarName) return; v = cvar(me.cvarName); @@ -61,7 +61,7 @@ void XonoticDecibelsSlider_loadCvars(entity me) } void XonoticDecibelsSlider_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(me.value > me.valueMax - 0.5 * me.valueStep) diff --git a/qcsrc/menu/xonotic/textslider.c b/qcsrc/menu/xonotic/textslider.c index 3fee2bf55..a4448f7de 100644 --- a/qcsrc/menu/xonotic/textslider.c +++ b/qcsrc/menu/xonotic/textslider.c @@ -52,7 +52,7 @@ void XonoticTextSlider_setValue(entity me, float val) } void XonoticTextSlider_loadCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; var float n = tokenize_console(me.cvarName); @@ -74,7 +74,7 @@ void XonoticTextSlider_loadCvars(entity me) } void XonoticTextSlider_saveCvars(entity me) { - if not(me.cvarName) + if (!me.cvarName) return; if(me.value >= 0 && me.value < me.nValues) diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index e5259cc8e..808c08535 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -507,7 +507,7 @@ void preMenuDraw() draw_CenterText(mid - 1 * line, l1, fs, '1 0 0', 1, 0); draw_CenterText(mid - 0 * line, l2, fs, '0 0 1', 1, 0); } - if not(campaign_name_previous) + if (!campaign_name_previous) campaign_name_previous = strzone(strcat(campaign_name, "x")); // force unequal if(campaign_name == campaign_name_previous) { diff --git a/qcsrc/server/accuracy.qc b/qcsrc/server/accuracy.qc index dfc923b2b..aca64a431 100644 --- a/qcsrc/server/accuracy.qc +++ b/qcsrc/server/accuracy.qc @@ -25,7 +25,7 @@ float accuracy_send(entity to, float sf) a = a.accuracy; if(to != a.owner) - if not(self.owner.cvar_cl_accuracy_data_share && autocvar_sv_accuracy_data_share) + if (!(self.owner.cvar_cl_accuracy_data_share && autocvar_sv_accuracy_data_share)) sf = 0; // note: zero sendflags can never be sent... so we can use that to say that we send no accuracy! WriteInt24_t(MSG_ENTITY, sf); diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index 45c7af3b7..387810be3 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -363,7 +363,7 @@ void bot_relinkplayerlist() void bot_clientdisconnect() { - if not(IS_BOT_CLIENT(self)) + if (!IS_BOT_CLIENT(self)) return; bot_clearqueue(self); if(self.cleanname) @@ -386,7 +386,7 @@ void bot_clientdisconnect() void bot_clientconnect() { - if not(IS_BOT_CLIENT(self)) + if (!IS_BOT_CLIENT(self)) return; self.bot_preferredcolors = self.clientcolors; self.bot_nextthink = time - random(); diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 7e23903ed..a0e6bfffd 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -20,7 +20,7 @@ void havocbot_ai() } else { - if not(self.jumppadcount) + if (!self.jumppadcount) self.havocbot_role(); } @@ -146,7 +146,7 @@ void havocbot_ai() havocbot_movetogoal(); // if the bot is not attacking, consider reloading weapons - if not(self.aistatus & AI_STATUS_ATTACKING) + if (!(self.aistatus & AI_STATUS_ATTACKING)) { float i; entity e; @@ -316,7 +316,7 @@ void havocbot_bunnyhop(vector dir) if(self.aistatus & AI_STATUS_ROAMING) if(self.goalcurrent.classname=="waypoint") - if not(self.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL) + if (!(self.goalcurrent.wpflags & WAYPOINTFLAG_PERSONAL)) if(fabs(gco_z - self.origin_z) < self.maxs_z - self.mins_z) if(self.goalstack01!=world) { @@ -422,7 +422,7 @@ void havocbot_movetogoal() } // Take off - if not(self.aistatus & AI_STATUS_JETPACK_FLYING) + if (!(self.aistatus & AI_STATUS_JETPACK_FLYING)) { // Brake almost completely so it can get a good direction if(vlen(self.velocity)>10) @@ -546,7 +546,7 @@ void havocbot_movetogoal() // If there is a trigger_hurt right below try to use the jetpack or make a rocketjump if(skill>6) - if not(self.flags & FL_ONGROUND) + if (!(self.flags & FL_ONGROUND)) { tracebox(self.origin, self.mins, self.maxs, self.origin + '0 0 -65536', MOVE_NOMONSTERS, self); if(tracebox_hits_trigger_hurt(self.origin, self.mins, self.maxs, trace_endpos )) diff --git a/qcsrc/server/bot/havocbot/role_onslaught.qc b/qcsrc/server/bot/havocbot/role_onslaught.qc index ab5372833..dc942a382 100644 --- a/qcsrc/server/bot/havocbot/role_onslaught.qc +++ b/qcsrc/server/bot/havocbot/role_onslaught.qc @@ -156,7 +156,7 @@ void havocbot_goalrating_ons_controlpoints_attack(float ratingscale) cp = world; for (; cp1; cp1 = cp1.chain) { - if not(cp1.wpconsidered) + if (!cp1.wpconsidered) continue; if(cp1.wpcost self.pauseregen_finished) * ((self.items & IT_FUEL_REGEN) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, rot_mod * frametime * (time > self.pauserotfuel_finished), limitf); } @@ -1766,7 +1766,7 @@ float SpectateUpdate() { if (self == self.enemy) return 0; - if not(IS_PLAYER(self.enemy)) + if (!IS_PLAYER(self.enemy)) return 0; SpectateCopy(self.enemy); @@ -1861,7 +1861,7 @@ float SpectatePrev() { // NOTE: chain order is from the highest to the lower entnum (unlike find) other = findchain(classname, "player"); - if not(other) // no player + if (!other) // no player return FALSE; entity first = other; @@ -1875,7 +1875,7 @@ float SpectatePrev() do { other = other.chain; } while(other && other.team != self.team); - if not(other) + if (!other) { other = first; while(other.team != self.team) @@ -2135,7 +2135,7 @@ void SpectatorThink() void PlayerUseKey() { - if not(IS_PLAYER(self)) + if (!IS_PLAYER(self)) return; if(self.vehicle) @@ -2603,7 +2603,7 @@ void PlayerPostThink (void) if((g_cts || g_race) && self.cvar_cl_allow_uidtracking == 1 && self.cvar_cl_allow_uid2name == 1) { - if not(self.stored_netname) + if (!self.stored_netname) self.stored_netname = strzone(uid2name(self.crypto_idfp)); if(self.stored_netname != self.netname) { diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index a94ba2901..040939021 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -168,7 +168,7 @@ void ImpulseCommands (void) case 33: if(self.deadflag == DEAD_NO && teamplay) { - if not(MUTATOR_CALLHOOK(HelpMePing)) + if (!MUTATOR_CALLHOOK(HelpMePing)) { wp = WaypointSprite_Attach("helpme", TRUE, RADARICON_HELPME, '1 0.5 0'); if(!wp) @@ -256,7 +256,7 @@ void ImpulseCommands (void) case 104: e = navigation_findnearestwaypoint(self, FALSE); if (e) - if not(e.wpflags & WAYPOINTFLAG_GENERATED) + if (!(e.wpflags & WAYPOINTFLAG_GENERATED)) { bprint(strcat("Waypoint removed at ",vtos(e.origin),"\n")); waypoint_remove(e); diff --git a/qcsrc/server/cl_physics.qc b/qcsrc/server/cl_physics.qc index b5b6ad793..9531010ec 100644 --- a/qcsrc/server/cl_physics.qc +++ b/qcsrc/server/cl_physics.qc @@ -804,7 +804,7 @@ void SV_PlayerPhysics() if(self.conveyor.state) self.velocity -= self.conveyor.movedir; - if not(IS_PLAYER(self)) + if (!IS_PLAYER(self)) { maxspd_mod = autocvar_sv_spectator_speed_multiplier; if(!self.spectatorspeed) @@ -860,12 +860,12 @@ void SV_PlayerPhysics() if(self.waterlevel < WATERLEVEL_SWIMMING) if(time >= self.ladder_time) - if not(self.hook) + if (!self.hook) { self.nextstep = time + 0.3 + random() * 0.1; trace_dphitq3surfaceflags = 0; tracebox(self.origin, self.mins, self.maxs, self.origin - '0 0 1', MOVE_NOMONSTERS, self); - if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS) + if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)) { if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS) GlobalSound(globalsound_metalfall, CH_PLAYER, VOICETYPE_PLAYERSOUND); @@ -1076,7 +1076,7 @@ void SV_PlayerPhysics() if (f > 0 && wishvel != '0 0 0') { self.velocity = self.velocity + wishvel * f * frametime; - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) self.ammo_fuel -= autocvar_g_jetpack_fuel * frametime * fvel * f; self.flags &= ~FL_ONGROUND; self.items |= IT_USING_JETPACK; diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 63924e60f..fe1479471 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -697,7 +697,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f msgin = formatmessage(msgin); - if not(IS_PLAYER(source)) + if (!IS_PLAYER(source)) colorstr = "^0"; // black for spectators else if(teamplay) colorstr = Team_ColorCode(source.team); @@ -857,9 +857,9 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f } if(!privatesay) - if not(IS_PLAYER(source)) + if (!IS_PLAYER(source)) { - if not(intermission_running) + if (!intermission_running) if(teamsay || (autocvar_g_chat_nospectators == 1) || (autocvar_g_chat_nospectators == 2 && !(warmup_stage || gameover))) teamsay = -1; // spectators } @@ -903,7 +903,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f { sprint(source, sourcemsgstr); sprint(privatesay, msgstr); - if not(autocvar_g_chat_tellprivacy) { dedicated_print(msgstr); } // send to server console too if "tellprivacy" is disabled + if (!autocvar_g_chat_tellprivacy) { dedicated_print(msgstr); } // send to server console too if "tellprivacy" is disabled if(cmsgstr != "") centerprint(privatesay, cmsgstr); } @@ -925,7 +925,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f { sprint(source, sourcemsgstr); dedicated_print(msgstr); // send to server console too - FOR_EACH_REALCLIENT(head) if not(IS_PLAYER(head)) + FOR_EACH_REALCLIENT(head) if (!IS_PLAYER(head)) if(head != source) sprint(head, msgstr); } @@ -1014,7 +1014,7 @@ void PrecachePlayerSounds(string f) } fclose(fh); - if not(allvoicesamples) + if (!allvoicesamples) { #define _VOICEMSG(m) allvoicesamples = strcat(allvoicesamples, " ", #m); ALLVOICEMSGS diff --git a/qcsrc/server/cl_weapons.qc b/qcsrc/server/cl_weapons.qc index 2fc23307e..8eaf8addc 100644 --- a/qcsrc/server/cl_weapons.qc +++ b/qcsrc/server/cl_weapons.qc @@ -346,7 +346,7 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce) W_SwitchWeapon_Force(self, w_getbestweapon(self)); a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo); - if not(a) return; + if (!a) return; Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_WEAPON_DROP, a, w); } diff --git a/qcsrc/server/cl_weaponsystem.qc b/qcsrc/server/cl_weaponsystem.qc index f530b5404..0c442d2af 100644 --- a/qcsrc/server/cl_weaponsystem.qc +++ b/qcsrc/server/cl_weaponsystem.qc @@ -93,7 +93,7 @@ void W_HitPlotAnalysis(entity player, vector screenforward, vector screenright, lag = ANTILAG_LATENCY(player); if(lag < 0.001) lag = 0; - if not(IS_REAL_CLIENT(player)) + if (!IS_REAL_CLIENT(player)) lag = 0; // only antilag for clients org = player.origin + player.view_ofs; @@ -733,7 +733,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) { if(e.classname == "droppedweapon") continue; - if not(e.flags & FL_ITEM) + if (!(e.flags & FL_ITEM)) continue; WaypointSprite_Spawn( s, @@ -816,7 +816,7 @@ void W_SwitchToOtherWeapon(entity pl) .float prevwarntime; float weapon_prepareattack_checkammo(float secondary) { - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) if (!weapon_action(self.weapon, WR_CHECKAMMO1 + secondary)) { // always keep the Mine Layer if we placed mines, so that we can detonate them @@ -1342,7 +1342,7 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri e = get_weaponinfo(self.weapon); // don't reload weapons that don't have the RELOADABLE flag - if not(e.spawnflags & WEP_FLAG_RELOADABLE) + if (!(e.spawnflags & WEP_FLAG_RELOADABLE)) { dprint("Warning: Attempted to reload a weapon that does not have the WEP_FLAG_RELOADABLE flag. Fix your code!\n"); return; @@ -1358,7 +1358,7 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri // no ammo, so nothing to load if(!self.(self.current_ammo) && self.reload_ammo_min) - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { if(IS_REAL_CLIENT(self) && self.reload_complain < time) { @@ -1367,7 +1367,7 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri self.reload_complain = time + 1; } // switch away if the amount of ammo is not enough to keep using this weapon - if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2)) + if (!(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))) { self.clip_load = -1; // reload later W_SwitchToOtherWeapon(self); diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 4850049e5..924a38e7d 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -5,7 +5,7 @@ float SV_ParseClientCommand_floodcheck() { - if not(timeout_status) // not while paused + if (!timeout_status) // not while paused { if(time <= (self.cmd_floodtime + autocvar_sv_clientcommand_antispam_time)) { @@ -208,7 +208,7 @@ void ClientCommand_ready(float request) // todo: anti-spam for toggling readynes } // cannot reset the game while a timeout is active! - if not(timeout_status) + if (!timeout_status) ReadyCount(); } else { sprint(self, "^1Game has already been restarted\n"); @@ -280,7 +280,7 @@ void ClientCommand_selectteam(float request, float argc) { if(teamplay) if not(self.team_forced > 0) - if not(lockteams) + if (!lockteams) { float selection; diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index ca59aba60..14754f501 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -24,7 +24,7 @@ string GetCallerName(entity caller) // verify that the client provided is acceptable for use float VerifyClientEntity(entity client, float must_be_real, float must_be_bots) { - if not(IS_CLIENT(client)) + if (!IS_CLIENT(client)) return CLIENT_DOESNT_EXIST; else if(must_be_real && !IS_REAL_CLIENT(client)) return CLIENT_NOT_REAL; @@ -479,7 +479,7 @@ void CommonCommand_timein(float request, entity caller) { if(!caller || autocvar_sv_timeout) { - if not(timeout_status) { print_to(caller, "^7Error: There is no active timeout called."); } + if (!timeout_status) { print_to(caller, "^7Error: There is no active timeout called."); } else if(caller && (caller != timeout_caller)) { print_to(caller, "^7Error: You are not allowed to stop the active timeout."); } else // everything should be okay, continue aborting timeout diff --git a/qcsrc/server/command/getreplies.qc b/qcsrc/server/command/getreplies.qc index 415d20f9c..191c0d9d6 100644 --- a/qcsrc/server/command/getreplies.qc +++ b/qcsrc/server/command/getreplies.qc @@ -25,7 +25,7 @@ string getrecords(float page) // 50 records per page { r = stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, "/captimerecord/time"))); - if not(r) + if (!r) continue; // TODO: uid2name @@ -44,7 +44,7 @@ string getrecords(float page) // 50 records per page { r = race_readTime(MapInfo_Map_bspname, 1); - if not(r) + if (!r) continue; h = race_readName(MapInfo_Map_bspname, 1); @@ -62,7 +62,7 @@ string getrecords(float page) // 50 records per page { r = race_readTime(MapInfo_Map_bspname, 1); - if not(r) + if (!r) continue; h = race_readName(MapInfo_Map_bspname, 1); diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index b336d3ee2..293676eb0 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1360,9 +1360,9 @@ void GameCommand_shuffleteams(float request) // sort through the random list of players made earlier for(z = 1; z <= maxclients; ++z) { - if not(shuffleteams_teams[i] >= x) + if (!(shuffleteams_teams[i] >= x)) { - if not(shuffleteams_players[z]) + if (!(shuffleteams_players[z])) continue; // not a player, move on to next random slot if(VerifyClientNumber(shuffleteams_players[z])) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index bb90536cf..91081b098 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -455,7 +455,7 @@ void ReadyRestart_force() if(autocvar_sv_timeout) { FOR_EACH_REALPLAYER(tmp_player) { tmp_player.allowed_timeouts = autocvar_sv_timeout_number; } } //reset map immediately if this cvar is not set - if not(autocvar_sv_ready_restart_after_countdown) { reset_map(TRUE); } + if (!autocvar_sv_ready_restart_after_countdown) { reset_map(TRUE); } if(autocvar_sv_eventlog) { GameLogEcho(":restart"); } } @@ -470,7 +470,7 @@ void ReadyRestart() // Reset ALL scores, but only do that at the beginning of the countdown if sv_ready_restart_after_countdown is off! // Otherwise scores could be manipulated during the countdown. - if not(autocvar_sv_ready_restart_after_countdown) { Score_ClearAll(); } + if (!autocvar_sv_ready_restart_after_countdown) { Score_ClearAll(); } ReadyRestart_force(); @@ -564,7 +564,7 @@ string ValidateMap(string validated_map, entity caller) { validated_map = MapInfo_FixName(validated_map); - if not(validated_map) + if (!validated_map) { print_to(caller, "This map is not available on this server."); return string_null; @@ -680,10 +680,10 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl ) return FALSE; - if not(VoteCommand_checkinlist(first_command, vote_list)) + if (!VoteCommand_checkinlist(first_command, vote_list)) return FALSE; - if not(VoteCommand_checkargs(startpos, argc)) + if (!VoteCommand_checkargs(startpos, argc)) return FALSE; switch(first_command) // now go through and parse the proper commands to adjust as needed. @@ -717,7 +717,7 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl case "gotomap": // re-direct all map selection commands to gotomap { vote_command = ValidateMap(argv(startpos + 1), caller); - if not(vote_command) { return FALSE; } + if (!vote_command) { return FALSE; } vote_parsed_command = strcat("gotomap ", vote_command); vote_parsed_display = strzone(strcat("^1", vote_parsed_command)); @@ -747,7 +747,7 @@ void VoteCommand_abstain(float request, entity caller) // CLIENT ONLY { case CMD_REQUEST_COMMAND: { - if not(vote_called) { print_to(caller, "^1No vote called."); } + if (!vote_called) { print_to(caller, "^1No vote called."); } else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); } else // everything went okay, continue changing vote @@ -792,8 +792,8 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm else if(!spectators_allowed && (caller && !IS_PLAYER(caller))) { print_to(caller, "^1Only players can call a vote."); } else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); } else if(caller && (time < caller.vote_waittime)) { print_to(caller, strcat("^1You have to wait ^2", ftos(ceil(caller.vote_waittime - time)), "^1 seconds before you can again call a vote.")); } - else if not(VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); } - else if not(VoteCommand_parse(caller, vote_command, autocvar_sv_vote_commands, 2, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); } + else if (!VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); } + else if (!VoteCommand_parse(caller, vote_command, autocvar_sv_vote_commands, 2, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); } else // everything went okay, continue with calling the vote { @@ -848,8 +848,8 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co { vote_command = VoteCommand_extractcommand(vote_command, 3, argc); - if not(caller.vote_master) { print_to(caller, "^1You do not have vote master privelages."); } - else if not(VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); } + if (!caller.vote_master) { print_to(caller, "^1You do not have vote master privelages."); } + else if (!VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); } else if not(VoteCommand_parse(caller, vote_command, strcat(autocvar_sv_vote_commands, " ", autocvar_sv_vote_master_commands), 3, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); } else // everything went okay, proceed with command @@ -886,7 +886,7 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co || ((autocvar_sv_vote_nospectators == 1) && warmup_stage) || (autocvar_sv_vote_nospectators == 0)); - if not(autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); } + if (!autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); } else if(vote_called) { print_to(caller, "^1There is already a vote called."); } else if(!spectators_allowed && (caller && !IS_PLAYER(caller))) { print_to(caller, "^1Only players can call a vote."); } else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); } @@ -934,7 +934,7 @@ void VoteCommand_no(float request, entity caller) // CLIENT ONLY { case CMD_REQUEST_COMMAND: { - if not(vote_called) { print_to(caller, "^1No vote called."); } + if (!vote_called) { print_to(caller, "^1No vote called."); } else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); } else if(((caller == vote_caller) || caller.vote_master) && autocvar_sv_vote_no_stops_vote) { VoteStop(caller); } @@ -989,7 +989,7 @@ void VoteCommand_stop(float request, entity caller) // BOTH { case CMD_REQUEST_COMMAND: { - if not(vote_called) { print_to(caller, "^1No vote called."); } + if (!vote_called) { print_to(caller, "^1No vote called."); } else if((caller == vote_caller) || !caller || caller.vote_master) { VoteStop(caller); } else { print_to(caller, "^1You are not allowed to stop that vote."); } @@ -1012,7 +1012,7 @@ void VoteCommand_yes(float request, entity caller) // CLIENT ONLY { case CMD_REQUEST_COMMAND: { - if not(vote_called) { print_to(caller, "^1No vote called."); } + if (!vote_called) { print_to(caller, "^1No vote called."); } else if not(caller.vote_selection == VOTE_SELECT_NULL || autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); } else // everything went okay, continue changing vote diff --git a/qcsrc/server/ent_cs.qc b/qcsrc/server/ent_cs.qc index 8fce148d1..7b3af04bf 100644 --- a/qcsrc/server/ent_cs.qc +++ b/qcsrc/server/ent_cs.qc @@ -26,13 +26,13 @@ float entcs_customize() o = self.owner; if(o.deadflag != DEAD_NO) return FALSE; - if not(IS_PLAYER(o)) + if (!IS_PLAYER(o)) return FALSE; if(other == o) return FALSE; if((IS_PLAYER(other)) || other.caplayer) if(!teamplay || o.team != other.team) - if not (radar_showennemies) + if (!radar_showennemies) return FALSE; return TRUE; } diff --git a/qcsrc/server/func_breakable.qc b/qcsrc/server/func_breakable.qc index 8dca538f1..a8dea48ef 100644 --- a/qcsrc/server/func_breakable.qc +++ b/qcsrc/server/func_breakable.qc @@ -70,7 +70,7 @@ void LaunchDebris (string debrisname, vector force) void func_breakable_colormod() { float h; - if not(self.spawnflags & 2) + if (!(self.spawnflags & 2)) return; h = self.health / self.max_health; if(h < 0.25) diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 15b7a62bf..b1394db07 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -147,7 +147,7 @@ void GiveFrags (entity attacker, entity targ, float f, float deathtype) } // after a frag, choose another random weapon set - if not(attacker.weapons & WepSet_FromWeapon(attacker.weapon)) + if (!(attacker.weapons & WepSet_FromWeapon(attacker.weapon))) W_SwitchWeapon_Force(attacker, w_getbestweapon(attacker)); } @@ -225,7 +225,7 @@ void Obituary_SpecialDeath( if(DEATH_ISSPECIAL(deathtype)) { entity deathent = deathtypes[(deathtype - DT_FIRST)]; - if not(deathent) { backtrace("Obituary_SpecialDeath: Could not find deathtype entity!\n"); return; } + if (!deathent) { backtrace("Obituary_SpecialDeath: Could not find deathtype entity!\n"); return; } if(murder) { @@ -326,7 +326,7 @@ float Obituary_WeaponDeath( void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) { // Sanity check - if not(IS_PLAYER(targ)) { backtrace("Obituary called on non-player?!\n"); return; } + if (!IS_PLAYER(targ)) { backtrace("Obituary called on non-player?!\n"); return; } // Declarations float notif_firstblood = FALSE; @@ -379,7 +379,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) } } } - else if not(Obituary_WeaponDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0)) + else if (!Obituary_WeaponDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0)) { backtrace("SUICIDE: what the hell happened here?\n"); return; @@ -493,7 +493,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype) ); } - if not(Obituary_WeaponDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker)) + if (!Obituary_WeaponDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker)) Obituary_SpecialDeath(targ, TRUE, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, 0); } } @@ -669,7 +669,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float } } - if not(DEATH_ISSPECIAL(deathtype)) + if (!DEATH_ISSPECIAL(deathtype)) { damage *= g_weapondamagefactor; mirrordamage *= g_weapondamagefactor; @@ -690,7 +690,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float mirrordamage = frag_mirrordamage; force = frag_force; - if not(g_minstagib) + if (!g_minstagib) { // apply strength multiplier if (attacker.items & IT_STRENGTH) @@ -749,7 +749,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float damage_goodhits += 1; damage_gooddamage += damage; - if not(DEATH_ISSPECIAL(deathtype)) + if (!DEATH_ISSPECIAL(deathtype)) { if(IS_PLAYER(targ)) // don't do this for vehicles if(IsFlying(victim)) @@ -1187,7 +1187,7 @@ void Fire_ApplyDamage(entity e) float t, d, hi, ty; entity o; - if not(Fire_IsBurning(e)) + if (!Fire_IsBurning(e)) return; for(t = 0, o = e.owner; o.owner && t < 16; o = o.owner, ++t); @@ -1216,12 +1216,12 @@ void Fire_ApplyDamage(entity e) } e.fire_hitsound = TRUE; - if not(IS_INDEPENDENT_PLAYER(e)) + if (!IS_INDEPENDENT_PLAYER(e)) FOR_EACH_PLAYER(other) if(e != other) { if(IS_PLAYER(other)) if(other.deadflag == DEAD_NO) - if not(IS_INDEPENDENT_PLAYER(other)) + if (!IS_INDEPENDENT_PLAYER(other)) if(boxesoverlap(e.absmin, e.absmax, other.absmin, other.absmax)) { t = autocvar_g_balance_firetransfer_time * (e.fire_endtime - time); diff --git a/qcsrc/server/g_hook.qc b/qcsrc/server/g_hook.qc index bde5e580a..76f7b5b99 100644 --- a/qcsrc/server/g_hook.qc +++ b/qcsrc/server/g_hook.qc @@ -383,7 +383,7 @@ void GrapplingHookFrame() // offhand hook controls if(self.BUTTON_HOOK) { - if not(self.hook || (self.hook_state & HOOK_WAITING_FOR_RELEASE)) + if (!(self.hook || (self.hook_state & HOOK_WAITING_FOR_RELEASE))) { self.hook_state |= HOOK_FIRING; self.hook_state |= HOOK_WAITING_FOR_RELEASE; diff --git a/qcsrc/server/g_subs.qc b/qcsrc/server/g_subs.qc index cc6f3694b..d32ab2caf 100644 --- a/qcsrc/server/g_subs.qc +++ b/qcsrc/server/g_subs.qc @@ -467,7 +467,7 @@ void tracebox_antilag_force_wz (entity source, vector v1, vector mi, vector ma, // check whether antilagged traces are enabled if (lag < 0.001) lag = 0; - if not(IS_REAL_CLIENT(forent)) + if (!IS_REAL_CLIENT(forent)) lag = 0; // only antilag for clients // change shooter to SOLID_BBOX so the shot can hit corpses @@ -799,7 +799,7 @@ void LODmodel_attach() } if(self.lodmodelindex1) - if not(self.SendEntity) + if (!self.SendEntity) SetCustomizer(self, LOD_customize, LOD_uncustomize); } diff --git a/qcsrc/server/g_triggers.qc b/qcsrc/server/g_triggers.qc index 359bf84a3..884c3e5b2 100644 --- a/qcsrc/server/g_triggers.qc +++ b/qcsrc/server/g_triggers.qc @@ -164,7 +164,7 @@ void multi_trigger() if (self.classname == "trigger_secret") { - if not(IS_PLAYER(self.enemy)) + if (!IS_PLAYER(self.enemy)) return; found_secrets = found_secrets + 1; WriteByte (MSG_ALL, SVC_FOUNDSECRET); @@ -205,8 +205,8 @@ void multi_use() void multi_touch() { - if not(self.spawnflags & 2) - if not(other.iscreature) + if (!(self.spawnflags & 2)) + if (!other.iscreature) return; if(self.team) @@ -459,7 +459,7 @@ void trigger_hurt_touch() entity own; own = self.enemy; - if not(IS_PLAYER(own)) + if (!IS_PLAYER(own)) { own = self; self.enemy = world; // I still hate you all @@ -628,7 +628,7 @@ void trigger_gravity_touch() g = self.gravity; - if not(self.spawnflags & 1) + if (!(self.spawnflags & 1)) { if(other.trigger_gravity_check) { @@ -691,7 +691,7 @@ void spawnfunc_trigger_gravity() void target_speaker_use_off(); void target_speaker_use_activator() { - if not(IS_REAL_CLIENT(activator)) + if (!IS_REAL_CLIENT(activator)) return; string snd; if(substring(self.noise, 0, 1) == "*") @@ -1164,7 +1164,7 @@ void misc_laser_think() if(self.enemy) { o = self.enemy.origin; - if not(self.spawnflags & 2) + if (!(self.spawnflags & 2)) o = self.origin + normalize(o - self.origin) * 32768; } else @@ -1766,7 +1766,7 @@ void target_voicescript_next(entity pl) return; if(vs.message == "") return; - if not(IS_PLAYER(pl)) + if (!IS_PLAYER(pl)) return; if(gameover) return; @@ -1918,13 +1918,13 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay, dotrigger = ((IS_PLAYER(source)) && (source.deadflag == DEAD_NO) && ((ear.radius == 0) || (vlen(source.origin - ear.origin) <= ear.radius))); domatch = ((ear.spawnflags & 32) || dotrigger); - if not(domatch) + if (!domatch) return msgin; - if not(msgin) + if (!msgin) { // we are in TUBA mode! - if not(ear.spawnflags & 256) + if (!(ear.spawnflags & 256)) return msgin; if(!W_Tuba_HasPlayed(source, ear.message, ear.movedir_x, !(ear.spawnflags & 512), ear.movedir_y, ear.movedir_z)) @@ -2062,7 +2062,7 @@ string trigger_magicear_processmessage_forallears(entity source, float teamsay, for(ear = magicears; ear; ear = ear.enemy) { msgout = trigger_magicear_processmessage(ear, source, teamsay, privatesay, msgin); - if not(ear.spawnflags & 64) + if (!(ear.spawnflags & 64)) if(magicear_matched) return msgout; msgin = msgout; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 68532192e..e91f52070 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -2238,7 +2238,7 @@ string MapVote_Suggest(string m) if(mapvote_initialized) return "Can't suggest - voting is already in progress!"; m = MapInfo_FixName(m); - if not(m) + if (!m) return "The map you suggested is not available on this server."; if(!autocvar_g_maplist_votable_suggestions_override_mostrecent) if(Map_IsRecent(m)) diff --git a/qcsrc/server/ipban.qc b/qcsrc/server/ipban.qc index 08fd83fe3..d3ab13459 100644 --- a/qcsrc/server/ipban.qc +++ b/qcsrc/server/ipban.qc @@ -434,7 +434,7 @@ float Ban_IsClientBanned(entity client, float idx) { if(!autocvar_g_banned_list_idmode) return TRUE; - if not(ban_idfp) + if (!ban_idfp) return TRUE; } return FALSE; diff --git a/qcsrc/server/item_key.qc b/qcsrc/server/item_key.qc index 5c7e30e36..f6c8abce3 100644 --- a/qcsrc/server/item_key.qc +++ b/qcsrc/server/item_key.qc @@ -10,7 +10,7 @@ TODO: float item_keys_usekey(entity l, entity p) { float valid = l.itemkeys & p.itemkeys; - if not(valid) { + if (!valid) { // other has none of the needed keys return FALSE; } else if (l.itemkeys == valid) { @@ -29,7 +29,7 @@ string item_keys_keylist(float keylist) { string n; // no keys - if not(keylist) + if (!keylist) return ""; // one key @@ -63,7 +63,7 @@ item_key * Key touch handler. */ void item_key_touch(void) { - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; // player already picked up this key @@ -318,7 +318,7 @@ void trigger_keylock_touch(void) { started_delay = FALSE; // only player may trigger the lock - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 91e922869..49aae079f 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -96,7 +96,7 @@ const string STR_OBSERVER = "observer"; #define FOR_EACH_REALCLIENT(v) FOR_EACH_CLIENT(v) if(IS_REAL_CLIENT(v)) #define FOR_EACH_PLAYER(v) FOR_EACH_CLIENT(v) if(IS_PLAYER(v)) -#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if not(IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too +#define FOR_EACH_SPEC(v) FOR_EACH_CLIENT(v) if (!IS_PLAYER(v)) // Samual: shouldn't this be IS_SPEC(v)? and rather create a separate macro to include observers too #define FOR_EACH_REALPLAYER(v) FOR_EACH_REALCLIENT(v) if(IS_PLAYER(v)) #define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5))) @@ -713,7 +713,7 @@ void readplayerstartcvars() for (j = WEP_FIRST; j <= WEP_LAST; ++j) { e = get_weaponinfo(j); - if not(e.spawnflags & WEP_FLAG_MUTATORBLOCKED) + if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)) g_weaponarena_weapons |= WepSet_FromWeapon(j); } } @@ -724,7 +724,7 @@ void readplayerstartcvars() for (j = WEP_FIRST; j <= WEP_LAST; ++j) { e = get_weaponinfo(j); - if not(e.spawnflags & WEP_FLAG_MUTATORBLOCKED) + if (!(e.spawnflags & WEP_FLAG_MUTATORBLOCKED)) if (e.spawnflags & WEP_FLAG_NORMAL) g_weaponarena_weapons |= WepSet_FromWeapon(j); } @@ -1037,7 +1037,7 @@ void readlevelcvars(void) if(!g_weapon_stay) g_weapon_stay = cvar("g_weapon_stay"); - if not(warmup_stage) + if (!warmup_stage) game_starttime = time + cvar("g_start_delay"); readplayerstartcvars(); @@ -2404,7 +2404,7 @@ float ExponentialFalloff(float mindist, float maxdist, float halflifedist, float #else string cvar_string_normal(string n) { - if not(cvar_type(n) & 1) + if (!(cvar_type(n) & 1)) backtrace(strcat("Attempt to access undefined cvar: ", n)); return builtin_cvar_string(n); } diff --git a/qcsrc/server/mutators/base.qc b/qcsrc/server/mutators/base.qc index f4761b884..d2cec391b 100644 --- a/qcsrc/server/mutators/base.qc +++ b/qcsrc/server/mutators/base.qc @@ -101,7 +101,7 @@ float Mutator_Add(mutatorfunc_t func, string name) { if(name == loaded_mutators[i]) return 1; // already added - if not(loaded_mutators[i]) + if (!(loaded_mutators[i])) j = i; } if(j < 0) diff --git a/qcsrc/server/mutators/gamemode_assault.qc b/qcsrc/server/mutators/gamemode_assault.qc index 94e104728..ceeb51dd9 100644 --- a/qcsrc/server/mutators/gamemode_assault.qc +++ b/qcsrc/server/mutators/gamemode_assault.qc @@ -266,7 +266,7 @@ void assault_new_round() // spawnfuncs void spawnfunc_info_player_attacker() { - if not(g_assault) { remove(self); return; } + if (!g_assault) { remove(self); return; } self.team = NUM_TEAM_1; // red, gets swapped every round spawnfunc_info_player_deathmatch(); @@ -274,7 +274,7 @@ void spawnfunc_info_player_attacker() void spawnfunc_info_player_defender() { - if not(g_assault) { remove(self); return; } + if (!g_assault) { remove(self); return; } self.team = NUM_TEAM_2; // blue, gets swapped every round spawnfunc_info_player_deathmatch(); @@ -282,7 +282,7 @@ void spawnfunc_info_player_defender() void spawnfunc_target_objective() { - if not(g_assault) { remove(self); return; } + if (!g_assault) { remove(self); return; } self.classname = "target_objective"; self.use = assault_objective_use; @@ -293,7 +293,7 @@ void spawnfunc_target_objective() void spawnfunc_target_objective_decrease() { - if not(g_assault) { remove(self); return; } + if (!g_assault) { remove(self); return; } self.classname = "target_objective_decrease"; @@ -311,7 +311,7 @@ void spawnfunc_target_objective_decrease() // destructible walls that can be used to trigger target_objective_decrease void spawnfunc_func_assault_destructible() { - if not(g_assault) { remove(self); return; } + if (!g_assault) { remove(self); return; } self.spawnflags = 3; self.classname = "func_assault_destructible"; @@ -326,7 +326,7 @@ void spawnfunc_func_assault_destructible() void spawnfunc_func_assault_wall() { - if not(g_assault) { remove(self); return; } + if (!g_assault) { remove(self); return; } self.classname = "func_assault_wall"; self.mdl = self.model; @@ -339,7 +339,7 @@ void spawnfunc_func_assault_wall() void spawnfunc_target_assault_roundend() { - if not(g_assault) { remove(self); return; } + if (!g_assault) { remove(self); return; } self.winning = 0; // round not yet won by attackers self.classname = "target_assault_roundend"; @@ -350,7 +350,7 @@ void spawnfunc_target_assault_roundend() void spawnfunc_target_assault_roundstart() { - if not(g_assault) { remove(self); return; } + if (!g_assault) { remove(self); return; } assault_attacker_team = NUM_TEAM_1; self.classname = "target_assault_roundstart"; @@ -373,7 +373,7 @@ void havocbot_goalrating_ast_targets(float ratingscale) if (ad.target == "") continue; - if not(ad.bot_attack) + if (!ad.bot_attack) continue; found = FALSE; @@ -555,7 +555,7 @@ MUTATOR_HOOKFUNCTION(assault_PlayerSpawn) MUTATOR_HOOKFUNCTION(assault_TurretSpawn) { - if not (self.team) + if (!self.team) self.team = 14; return FALSE; diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index 62320f37f..42e7b6294 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -386,7 +386,7 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype) entity player = ((capturetype == CAPTURE_NORMAL) ? toucher : enemy_flag.ctf_dropper); float old_time, new_time; - if not(player) { return; } // without someone to give the reward to, we can't possibly cap + if (!player) { return; } // without someone to give the reward to, we can't possibly cap // messages and sounds Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(enemy_flag, CENTER_CTF_CAPTURE_)); @@ -602,7 +602,7 @@ void ctf_CheckStalemate(void) WaypointSprite_Spawn("enemyflagcarrier", 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, world, tmp_entity.team, tmp_entity.owner, wps_enemyflagcarrier, TRUE, RADARICON_FLAG, WPCOLOR_ENEMYFC(tmp_entity.owner.team)); } - if not(wpforenemy_announced) + if (!wpforenemy_announced) { FOR_EACH_REALPLAYER(tmp_entity) Send_Notification(NOTIF_ONE, tmp_entity, MSG_CENTER, ((tmp_entity.flagcarried) ? CENTER_CTF_STALEMATE_CARRIER : CENTER_CTF_STALEMATE_OTHER)); @@ -787,7 +787,7 @@ void ctf_FlagTouch() else return; // do nothing } - else if not(IS_PLAYER(toucher)) // The flag just touched an object, most likely the world + else if (!IS_PLAYER(toucher)) // The flag just touched an object, most likely the world { if(time > self.wait) // if we haven't in a while, play a sound/effect { @@ -1066,7 +1066,7 @@ entity havocbot_ctf_find_enemy_flag(entity bot) float havocbot_ctf_teamcount(entity bot, vector org, float tc_radius) { - if not(teamplay) + if (!teamplay) return 0; float c = 0; @@ -1108,7 +1108,7 @@ void havocbot_goalrating_ctf_ourbase(float ratingscale) break; head = head.ctf_worldflagnext; } - if not(head) + if (!head) return; navigation_routerating(head.bot_basewaypoint, ratingscale, 10000); @@ -1130,7 +1130,7 @@ void havocbot_goalrating_ctf_enemyflag(float ratingscale) void havocbot_goalrating_ctf_enemybase(float ratingscale) { - if not(bot_waypoints_for_items) + if (!bot_waypoints_for_items) { havocbot_goalrating_ctf_enemyflag(ratingscale); return; @@ -1140,7 +1140,7 @@ void havocbot_goalrating_ctf_enemybase(float ratingscale) head = havocbot_ctf_find_enemy_flag(self); - if not(head) + if (!head) return; navigation_routerating(head.bot_basewaypoint, ratingscale, 10000); diff --git a/qcsrc/server/mutators/gamemode_domination.qc b/qcsrc/server/mutators/gamemode_domination.qc index 50f512991..f0e4955b2 100644 --- a/qcsrc/server/mutators/gamemode_domination.qc +++ b/qcsrc/server/mutators/gamemode_domination.qc @@ -182,7 +182,7 @@ void dompointthink() void dompointtouch() { entity head; - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; if (other.health < 1) return; diff --git a/qcsrc/server/mutators/gamemode_freezetag.qc b/qcsrc/server/mutators/gamemode_freezetag.qc index 0c22db05b..38465aca7 100644 --- a/qcsrc/server/mutators/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/gamemode_freezetag.qc @@ -582,7 +582,7 @@ MUTATOR_HOOKFUNCTION(freezetag_ItemTouch) MUTATOR_HOOKFUNCTION(freezetag_BotRoles) { - if not(self.deadflag) + if (!self.deadflag) { if (random() < 0.5) self.havocbot_role = havocbot_role_ft_freeing; diff --git a/qcsrc/server/mutators/gamemode_keepaway.qc b/qcsrc/server/mutators/gamemode_keepaway.qc index 145636239..98695f693 100644 --- a/qcsrc/server/mutators/gamemode_keepaway.qc +++ b/qcsrc/server/mutators/gamemode_keepaway.qc @@ -71,7 +71,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth return; } if(other.deadflag != DEAD_NO) { return; } - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) { // The ball just touched an object, most likely the world pointparticles(particleeffectnum("kaball_sparks"), self.origin, '0 0 0', 1); sound(self, CH_TRIGGER, "keepaway/touch.wav", VOL_BASE, ATTEN_NORM); @@ -306,7 +306,7 @@ MUTATOR_HOOKFUNCTION(ka_PlayerDamage) // for changing damage and force values th frag_force *= autocvar_g_keepaway_ballcarrier_force; } } - else if not(frag_target.ballcarried) // if the target is a noncarrier + else if (!frag_target.ballcarried) // if the target is a noncarrier { if(frag_target == frag_attacker) // damage done to yourself { diff --git a/qcsrc/server/mutators/gamemode_keyhunt.qc b/qcsrc/server/mutators/gamemode_keyhunt.qc index a0cbf619a..138f16144 100644 --- a/qcsrc/server/mutators/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/gamemode_keyhunt.qc @@ -426,7 +426,7 @@ void kh_Key_Touch() // runs many, many times when a key has been dropped and ca // maybe start a shorter countdown? } - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; if(other.deadflag != DEAD_NO) return; @@ -841,7 +841,7 @@ float kh_CheckPlayers(float num) if(tmp_player.team == t_team) ++players; - if not(players) { return t_team; } + if (!players) { return t_team; } } return 0; } @@ -855,7 +855,7 @@ void kh_WaitForPlayers() // delay start of the round until enough players are p } float p1 = kh_CheckPlayers(0), p2 = kh_CheckPlayers(1), p3 = kh_CheckPlayers(2), p4 = kh_CheckPlayers(3); - if not(p1 || p2 || p3 || p4) + if (!(p1 || p2 || p3 || p4)) { Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_ROUNDSTART, autocvar_g_balance_keyhunt_delay_round); kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round, kh_StartRound); diff --git a/qcsrc/server/mutators/gamemode_nexball.qc b/qcsrc/server/mutators/gamemode_nexball.qc index 5831250d2..75dc8fda5 100644 --- a/qcsrc/server/mutators/gamemode_nexball.qc +++ b/qcsrc/server/mutators/gamemode_nexball.qc @@ -248,7 +248,7 @@ void football_touch(void) self.nextthink = time + autocvar_g_nexball_delay_idle; return; } - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; if(other.health < 1) return; @@ -529,7 +529,7 @@ void spawnfunc_nexball_basketball(void) { nexball_mode |= NBM_BASKETBALL; self.classname = "nexball_basketball"; - if not(balls & BALL_BASKET) + if (!(balls & BALL_BASKET)) { /* CVTOV(g_nexball_basketball_effects_default); diff --git a/qcsrc/server/mutators/gamemode_onslaught.qc b/qcsrc/server/mutators/gamemode_onslaught.qc index b5b6594d7..a419d7b1f 100644 --- a/qcsrc/server/mutators/gamemode_onslaught.qc +++ b/qcsrc/server/mutators/gamemode_onslaught.qc @@ -510,7 +510,7 @@ void onslaught_generator_deaththink() vector org; float i; - if not (self.count) + if (!self.count) self.count = 40; // White shockwave @@ -614,7 +614,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage, #endif self.lasthealth = self.health; } - else if not(warmup_stage) + else if (!warmup_stage) { if (attacker == self) bprint(Team_ColoredFullName(self.team), " generator spontaneously exploded due to overtime!\n"); @@ -1271,7 +1271,7 @@ void onslaught_controlpoint_touch() { entity e; float a; - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; a = onslaught_controlpoint_attackable(self, other.team); if(a != 2 && a != 4) diff --git a/qcsrc/server/mutators/mutator_minstagib.qc b/qcsrc/server/mutators/mutator_minstagib.qc index f82817d12..26dfb5a4d 100644 --- a/qcsrc/server/mutators/mutator_minstagib.qc +++ b/qcsrc/server/mutators/mutator_minstagib.qc @@ -1,7 +1,7 @@ void spawnfunc_item_minst_cells (void) { - if not(g_minstagib) { remove(self); return; } - if not(self.ammo_cells) + if (!g_minstagib) { remove(self); return; } + if (!self.ammo_cells) self.ammo_cells = autocvar_g_minstagib_ammo_drop; StartItem ("models/items/a_cells.md3", @@ -28,7 +28,7 @@ void minstagib_stop_countdown(entity e) } void minstagib_ammocheck() { - if not(IS_PLAYER(self)) + if (!IS_PLAYER(self)) return; // not a player if (time < self.minstagib_nextthink) return; @@ -137,7 +137,7 @@ MUTATOR_HOOKFUNCTION(minstagib_PlayerPreThink) MUTATOR_HOOKFUNCTION(minstagib_PlayerPowerups) { - if not(self.effects & EF_FULLBRIGHT) + if (!(self.effects & EF_FULLBRIGHT)) self.effects |= EF_FULLBRIGHT; if (self.items & IT_STRENGTH) @@ -372,8 +372,8 @@ MUTATOR_HOOKFUNCTION(minstagib_ItemTouch) MUTATOR_HOOKFUNCTION(minstagib_OnEntityPreSpawn) { - if not(autocvar_g_powerups) { return FALSE; } - if not(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega") + if (!autocvar_g_powerups) { return FALSE; } + if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega")) return FALSE; entity e = spawn(); diff --git a/qcsrc/server/mutators/mutator_nades.qc b/qcsrc/server/mutators/mutator_nades.qc index d911720de..3d0df5dae 100644 --- a/qcsrc/server/mutators/mutator_nades.qc +++ b/qcsrc/server/mutators/mutator_nades.qc @@ -247,13 +247,13 @@ float CanThrowNade() if(self.deadflag != DEAD_NO) return FALSE; - if not(autocvar_g_nades) + if (!autocvar_g_nades) return FALSE; // allow turning them off mid match if(forbidWeaponUse()) return FALSE; - if not(IS_PLAYER(self)) + if (!IS_PLAYER(self)) return FALSE; return TRUE; diff --git a/qcsrc/server/mutators/mutator_new_toys.qc b/qcsrc/server/mutators/mutator_new_toys.qc index 873e1632c..f384a0aad 100644 --- a/qcsrc/server/mutators/mutator_new_toys.qc +++ b/qcsrc/server/mutators/mutator_new_toys.qc @@ -110,7 +110,7 @@ string nt_GetReplacement(string w, float m) if(m == NT_AUTOREPLACE_NEVER) return w; string s = nt_GetFullReplacement(w); - if not(s) + if (!s) return w; if(m == NT_AUTOREPLACE_RANDOM) s = strcat(w, " ", s); diff --git a/qcsrc/server/mutators/mutator_nix.qc b/qcsrc/server/mutators/mutator_nix.qc index 4a11e564b..dc12b0520 100644 --- a/qcsrc/server/mutators/mutator_nix.qc +++ b/qcsrc/server/mutators/mutator_nix.qc @@ -26,7 +26,7 @@ float NIX_CanChooseWeapon(float wpn) return FALSE; if(e.spawnflags & WEP_FLAG_MUTATORBLOCKED) return FALSE; - if not(e.spawnflags & WEP_FLAG_NORMAL) + if (!(e.spawnflags & WEP_FLAG_NORMAL)) return FALSE; } return TRUE; diff --git a/qcsrc/server/mutators/mutator_physical_items.qc b/qcsrc/server/mutators/mutator_physical_items.qc index 74b7db2f0..c99228673 100644 --- a/qcsrc/server/mutators/mutator_physical_items.qc +++ b/qcsrc/server/mutators/mutator_physical_items.qc @@ -105,7 +105,7 @@ MUTATOR_DEFINITION(mutator_physical_items) // check if we have a physics engine MUTATOR_ONADD { - if not(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) + if (!(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE"))) { dprint("Warning: Physical items are enabled but no physics engine can be used. Reverting to old items.\n"); return -1; diff --git a/qcsrc/server/mutators/mutator_superspec.qc b/qcsrc/server/mutators/mutator_superspec.qc index fc9fc7966..c323262f0 100644 --- a/qcsrc/server/mutators/mutator_superspec.qc +++ b/qcsrc/server/mutators/mutator_superspec.qc @@ -33,7 +33,7 @@ void superspec_save_client_conf() string fn = "superspec-local.options"; float fh; - if not(_ISLOCAL) + if (!_ISLOCAL) { if(self.crypto_idfp == "") return; @@ -68,7 +68,7 @@ void superspec_msg(string _center_title, string _con_title, entity _to, string _ return; if(_spamlevel > 1) - if not(_to.superspec_flags & SSF_VERBOSE) + if (!(_to.superspec_flags & SSF_VERBOSE)) return; centerprint(_to, strcat(_center_title, _msg)); @@ -452,7 +452,7 @@ MUTATOR_HOOKFUNCTION(superspec_ClientConnect) _hello.think = superspec_hello; _hello.nextthink = time + 5; - if not(_ISLOCAL) + if (!_ISLOCAL) { if(self.crypto_idfp == "") return FALSE; diff --git a/qcsrc/server/mutators/mutator_touchexplode.qc b/qcsrc/server/mutators/mutator_touchexplode.qc index f2d47a5ed..fabf13639 100644 --- a/qcsrc/server/mutators/mutator_touchexplode.qc +++ b/qcsrc/server/mutators/mutator_touchexplode.qc @@ -19,15 +19,15 @@ void PlayerTouchExplode(entity p1, entity p2) MUTATOR_HOOKFUNCTION(touchexplode_PlayerThink) { if(time > self.touchexplode_time) - if not(gameover) + if (!gameover) if(IS_PLAYER(self)) if(self.deadflag == DEAD_NO) - if not(IS_INDEPENDENT_PLAYER(self)) + if (!IS_INDEPENDENT_PLAYER(self)) FOR_EACH_PLAYER(other) if(self != other) { if(time > other.touchexplode_time) if(other.deadflag == DEAD_NO) - if not(IS_INDEPENDENT_PLAYER(other)) + if (!IS_INDEPENDENT_PLAYER(other)) if(boxesoverlap(self.absmin, self.absmax, other.absmin, other.absmax)) { PlayerTouchExplode(self, other); diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 94ba20f10..a077b213a 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -20,7 +20,7 @@ void sandbox_ObjectFunction_Touch() intensity = vlen(self.velocity) + vlen(other.velocity); if(intensity) // avoid divisions by 0 intensity /= 2; // average the two velocities - if not(intensity >= autocvar_g_sandbox_object_material_velocity_min) + if (!(intensity >= autocvar_g_sandbox_object_material_velocity_min)) return; // impact not strong enough to do anything // now offset intensity and apply it to the effects intensity -= autocvar_g_sandbox_object_material_velocity_min; // start from minimum velocity, not actual velocity @@ -74,7 +74,7 @@ entity sandbox_ObjectEdit_Get(float permissions) return trace_ent; // don't check permissions, anyone can edit this object if(trace_ent.crypto_idfp == "") return trace_ent; // the player who spawned this object did not have an UID, so anyone can edit it - if not(trace_ent.realowner != self && autocvar_g_sandbox_editor_free < 2) + if (!(trace_ent.realowner != self && autocvar_g_sandbox_editor_free < 2)) return trace_ent; // object does not belong to the player, and players can only edit their own objects on this server return world; } @@ -484,7 +484,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) print_to(self, "^1SANDBOX - WARNING: ^7Attempted to spawn an object without specifying a model. Please specify the path to your model file after the 'object_spawn' command"); return TRUE; } - if not(fexists(argv(2))) + if (!(fexists(argv(2)))) { print_to(self, "^1SANDBOX - WARNING: ^7Attempted to spawn an object with a non-existent model. Make sure the path to your model file is correct"); return TRUE; diff --git a/qcsrc/server/pathlib.qc b/qcsrc/server/pathlib.qc index 3cb4ca750..3799c755d 100644 --- a/qcsrc/server/pathlib.qc +++ b/qcsrc/server/pathlib.qc @@ -149,7 +149,7 @@ float floor_ok(vector point) case CONTENT_SKY: return 0; case CONTENT_EMPTY: - if not (pointcontents(point - '0 0 1') == CONTENT_SOLID) + if (!(pointcontents(point - '0 0 1') == CONTENT_SOLID)) return 0; break; case CONTENT_WATER: @@ -171,7 +171,7 @@ float inwater(vector point) } */ -#define _pcheck(p) traceline(p+z_up,p-z_down,MOVE_WORLDONLY,self); if not(floor_ok(trace_endpos)) return 1 +#define _pcheck(p) traceline(p+z_up,p-z_down,MOVE_WORLDONLY,self); if (!floor_ok(trace_endpos)) return 1 float edge_check(vector point,float fsize) { vector z_up,z_down; @@ -226,7 +226,7 @@ vector pathlib_wateroutnode(vector start,vector end,float doedge) traceline(end + ('0 0 0.25' * pathlib_gridsize),end - ('0 0 1' * pathlib_gridsize),MOVE_WORLDONLY,self); end = trace_endpos; - if not(pointcontents(end - '0 0 1') == CONTENT_SOLID) + if (!(pointcontents(end - '0 0 1') == CONTENT_SOLID)) return end; for(surface = start ; surface_z < (end_z + 32); ++surface_z) @@ -324,7 +324,7 @@ vector pathlib_walknode(vector start,vector end,float doedge) return trace_endpos; point = trace_endpos; - if not(floor_ok(trace_endpos)) + if (!floor_ok(trace_endpos)) return trace_endpos; tracebox(last_point + walknode_boxup, walknode_boxmin,walknode_boxmax, point + walknode_boxup, MOVE_WORLDONLY, self); @@ -352,7 +352,7 @@ vector pathlib_walknode(vector start,vector end,float doedge) point = trace_endpos; - if not(floor_ok(trace_endpos)) + if (!floor_ok(trace_endpos)) return trace_endpos; tracebox(last_point + walknode_boxup, walknode_boxmin,walknode_boxmax, point + walknode_boxup, MOVE_WORLDONLY, self); @@ -618,7 +618,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go } where = pathlib_movenode(parent.origin,to,0); - if not(pathlib_movenode_goodnode) + if (!pathlib_movenode_goodnode) return 0; if(doedge) @@ -648,7 +648,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go node.path_prev = parent; } - if not (best_open_node) + if (!best_open_node) best_open_node = node; else if(best_open_node.pathlib_node_f > node.pathlib_node_f) best_open_node = node; @@ -664,7 +664,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go node.pathlib_node_g = g; node.pathlib_node_f = f; - if not (best_open_node) + if (!best_open_node) best_open_node = node; else if(best_open_node.pathlib_node_f > node.pathlib_node_f) best_open_node = node; @@ -899,13 +899,13 @@ entity pathlib_astar(vector from,vector to) pathlib_movenode = pathlib_swimnode; } - if not(openlist) + if (!openlist) openlist = spawn(); - if not(closedlist) + if (!closedlist) closedlist = spawn(); - if not(scraplist) + if (!scraplist) scraplist = spawn(); pathlib_closed_cnt = 0; diff --git a/qcsrc/server/pathlib/main.qc b/qcsrc/server/pathlib/main.qc index fd889d043..589ff82a1 100644 --- a/qcsrc/server/pathlib/main.qc +++ b/qcsrc/server/pathlib/main.qc @@ -110,7 +110,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go node.path_prev = parent; } - if not (best_open_node) + if (!best_open_node) best_open_node = node; else if(best_open_node.pathlib_node_f > node.pathlib_node_f) best_open_node = node; @@ -121,7 +121,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go where = pathlib_movenode(parent.origin, to, 0); - if not(pathlib_movenode_goodnode) + if (!pathlib_movenode_goodnode) { //pathlib_showsquare(where, 0 ,30); //pathlib_showsquare(parent.origin, 1 ,30); @@ -141,7 +141,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go if(doedge) - if not (tile_check(where)) + if (!tile_check(where)) { dprint("tile_check fail\n"); pathlib_showsquare(where, 0 ,30); @@ -175,7 +175,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go //} } - if not (best_open_node) + if (!best_open_node) best_open_node = node; else if(best_open_node.pathlib_node_f > node.pathlib_node_f) best_open_node = node; @@ -192,7 +192,7 @@ float pathlib_makenode_adaptive(entity parent,vector start, vector to, vector go node.pathlib_node_g = g; node.pathlib_node_f = f; - if not (best_open_node) + if (!best_open_node) best_open_node = node; else if(best_open_node.pathlib_node_f > node.pathlib_node_f) best_open_node = node; @@ -405,10 +405,10 @@ entity pathlib_astar(vector from,vector to) pathlib_movenode = pathlib_swimnode; } - if not(openlist) + if (!openlist) openlist = spawn(); - if not(closedlist) + if (!closedlist) closedlist = spawn(); pathlib_closed_cnt = 0; diff --git a/qcsrc/server/pathlib/movenode.qc b/qcsrc/server/pathlib/movenode.qc index c45ac0dee..997eaa420 100644 --- a/qcsrc/server/pathlib/movenode.qc +++ b/qcsrc/server/pathlib/movenode.qc @@ -10,7 +10,7 @@ vector pathlib_wateroutnode(vector start,vector end, float doedge) traceline(end + ('0 0 0.25' * pathlib_gridsize),end - ('0 0 1' * pathlib_gridsize),MOVE_WORLDONLY,self); end = trace_endpos; - if not(pointcontents(end - '0 0 1') == CONTENT_SOLID) + if (!(pointcontents(end - '0 0 1') == CONTENT_SOLID)) return end; for(surface = start ; surface_z < (end_z + 32); ++surface_z) diff --git a/qcsrc/server/pathlib/path_waypoint.qc b/qcsrc/server/pathlib/path_waypoint.qc index 73b415537..22d1e732e 100644 --- a/qcsrc/server/pathlib/path_waypoint.qc +++ b/qcsrc/server/pathlib/path_waypoint.qc @@ -137,7 +137,7 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback) pathlib_movecost = 300; pathlib_movecost_diag = vlen('1 1 0' * pathlib_movecost); - if not (pathlib_wpp_waypointcallback) + if (!pathlib_wpp_waypointcallback) callback = FALSE; if (callback) @@ -147,10 +147,10 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback) pathlib_heuristic = pathlib_h_none; - if not(openlist) + if (!openlist) openlist = spawn(); - if not(closedlist) + if (!closedlist) closedlist = spawn(); pathlib_closed_cnt = 0; diff --git a/qcsrc/server/pathlib/utility.qc b/qcsrc/server/pathlib/utility.qc index 0a5ea42b1..7a0aec865 100644 --- a/qcsrc/server/pathlib/utility.qc +++ b/qcsrc/server/pathlib/utility.qc @@ -94,25 +94,25 @@ float tile_check_cross(vector where) // forward-right p = where + f + r; traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, self); - if not (location_isok(trace_endpos, 1, 0)) + if (!location_isok(trace_endpos, 1, 0)) return 0; // Forward-left p = where + f - r; traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, self); - if not (location_isok(trace_endpos, 1, 0)) + if (!location_isok(trace_endpos, 1, 0)) return 0; // Back-right p = where - f + r; traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, self); - if not (location_isok(trace_endpos, 1 ,0)) + if (!location_isok(trace_endpos, 1 ,0)) return 0; //Back-left p = where - f - r; traceline(p + tile_check_up, p - tile_check_down, MOVE_WORLDONLY, self); - if not (location_isok(trace_endpos, 1, 0)) + if (!location_isok(trace_endpos, 1, 0)) return 0; return 1; @@ -128,26 +128,26 @@ float tile_check_plus(vector where) // forward p = where + f; traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,self); - if not (location_isok(trace_endpos,1,0)) + if (!location_isok(trace_endpos,1,0)) return 0; //left p = where - r; traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,self); - if not (location_isok(trace_endpos,1,0)) + if (!location_isok(trace_endpos,1,0)) return 0; // Right p = where + r; traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,self); - if not (location_isok(trace_endpos,1,0)) + if (!location_isok(trace_endpos,1,0)) return 0; //Back p = where - f; traceline(p+tile_check_up,p-tile_check_down,MOVE_WORLDONLY,self); - if not (location_isok(trace_endpos,1,0)) + if (!location_isok(trace_endpos,1,0)) return 0; return 1; diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index bf3772090..aff0652d4 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -89,7 +89,7 @@ float Portal_TeleportPlayer(entity teleporter, entity player) vector from, to, safe, step, transform, ang, newvel; float planeshift, s, t; - if not(teleporter.enemy) + if (!teleporter.enemy) { backtrace("Portal_TeleportPlayer called without other portal being set. Stop."); return 0; @@ -160,7 +160,7 @@ float Portal_TeleportPlayer(entity teleporter, entity player) player = self; self = oldself; - if not(teleporter.enemy) + if (!teleporter.enemy) { backtrace("Portal_TeleportPlayer ended up without other portal being set BEFORE TeleportPlayer. Stop."); return 0; @@ -175,7 +175,7 @@ float Portal_TeleportPlayer(entity teleporter, entity player) Send_Notification(NOTIF_ONE, player, MSG_ANNCE, ANNCE_ACHIEVEMENT_AMAZING); } - if not(teleporter.enemy) + if (!teleporter.enemy) { backtrace("Portal_TeleportPlayer ended up without other portal being set AFTER TeleportPlayer. Stop."); return 0; diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index 63d846f1f..1e08c61e3 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -249,7 +249,7 @@ void race_SendTime(entity e, float cp, float t, float tvalid) if(tvalid) if(cp == race_timed_checkpoint) // finish line - if not(e.race_completed) + if (!e.race_completed) { float s; if(g_race_qualifying) @@ -457,7 +457,7 @@ void checkpoint_passed() /* * Trigger targets */ - if not((self.spawnflags & 2) && (IS_PLAYER(other))) + if (!((self.spawnflags & 2) && (IS_PLAYER(other)))) { activator = other; oldmsg = self.message; @@ -466,7 +466,7 @@ void checkpoint_passed() self.message = oldmsg; } - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; /* @@ -800,7 +800,7 @@ void spawnfunc_trigger_race_checkpoint() EXACTTRIGGER_INIT; self.use = checkpoint_use; - if not(self.spawnflags & 1) + if (!(self.spawnflags & 1)) self.touch = checkpoint_touch; o = (self.absmin + self.absmax) * 0.5; @@ -853,7 +853,7 @@ void spawnfunc_target_checkpoint() // defrag entity EXACTTRIGGER_INIT; self.use = checkpoint_use; - if not(self.spawnflags & 1) + if (!(self.spawnflags & 1)) self.touch = checkpoint_touch; o = (self.absmin + self.absmax) * 0.5; @@ -1090,7 +1090,7 @@ void spawnfunc_trigger_race_penalty() EXACTTRIGGER_INIT; self.use = penalty_use; - if not(self.spawnflags & 1) + if (!(self.spawnflags & 1)) self.touch = penalty_touch; if (self.race_penalty_reason == "") diff --git a/qcsrc/server/scores.qc b/qcsrc/server/scores.qc index 1537f6752..aee289335 100644 --- a/qcsrc/server/scores.qc +++ b/qcsrc/server/scores.qc @@ -742,7 +742,7 @@ entity PlayerScore_Sort(.float field, float teams, float strict, float nospectat pbest.field = j; - if not(pfirst) + if (!pfirst) pfirst = pbest; if(plast) plast.chain = pbest; @@ -765,7 +765,7 @@ float TeamScore_GetCompareValue(float t) } sk = teamscorekeepers[t - 1]; - if not(sk) + if (!sk) return -999999999; s = sk.teamscores_primary; if(teamscores_flags_primary & SFL_ZERO_IS_WORST) @@ -899,9 +899,9 @@ void Score_NicePrint(entity to) t = 0; FOR_EACH_CLIENT(p) - if not(IS_PLAYER(p)) + if (!IS_PLAYER(p)) { - if not(t) + if (!t) Score_NicePrint_Spectators(to); Score_NicePrint_Spectator(to, p); t = 1; diff --git a/qcsrc/server/scores_rules.qc b/qcsrc/server/scores_rules.qc index d60f4563c..b57666a68 100644 --- a/qcsrc/server/scores_rules.qc +++ b/qcsrc/server/scores_rules.qc @@ -17,12 +17,12 @@ void ScoreRules_basics(float teams, float sprio, float stprio, float score_enabl if(score_enabled) ScoreInfo_SetLabel_TeamScore (ST_SCORE, "score", stprio); - if not(INDEPENDENT_PLAYERS) + if (!INDEPENDENT_PLAYERS) ScoreInfo_SetLabel_PlayerScore(SP_KILLS, "kills", 0); ScoreInfo_SetLabel_PlayerScore(SP_DEATHS, "deaths", SFL_LOWER_IS_BETTER); - if not(INDEPENDENT_PLAYERS) + if (!INDEPENDENT_PLAYERS) ScoreInfo_SetLabel_PlayerScore(SP_SUICIDES, "suicides", SFL_LOWER_IS_BETTER); if(score_enabled) diff --git a/qcsrc/server/secret.qc b/qcsrc/server/secret.qc index 9af13eca2..64c91685e 100644 --- a/qcsrc/server/secret.qc +++ b/qcsrc/server/secret.qc @@ -10,7 +10,7 @@ void secrets_setstatus() { */ void trigger_secret_touch() { // only a player can trigger this - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; // update secrets found counter @@ -52,7 +52,7 @@ void spawnfunc_trigger_secret() { // set default sound if (self.noise == "") - if not(self.sounds) + if (!self.sounds) self.sounds = 1; // misc/secret.wav // this entity can't be a target itself!!!! diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 8b8f8efe8..5510be0e1 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -125,7 +125,7 @@ void CreatureFrame (void) else dprint(ftos(trace_dphitq3surfaceflags), "\n"); */ - if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS) + if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOSTEPS)) { if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_METALSTEPS) GlobalSound(globalsound_metalstep, CH_PLAYER, VOICETYPE_PLAYERSOUND); @@ -249,7 +249,7 @@ void SV_OnEntityPreSpawnFunction() { if (self) if (self.gametypefilter != "") - if not(isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, self.gametypefilter)) + if (!isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, self.gametypefilter)) { remove(self); return; @@ -349,14 +349,14 @@ void SV_OnEntityPreSpawnFunction() else { k = s; - if not(cvar(k)) + if (!cvar(k)) goto cvar_fail; } } inv = !inv; :cvar_fail // now inv is 1 if we want to keep the item, and 0 if we want to get rid of it - if not(inv) + if (!inv) { //print("cvarfilter fail\n"); remove(self); diff --git a/qcsrc/server/t_halflife.qc b/qcsrc/server/t_halflife.qc index 0a95b78d0..bb2254c97 100644 --- a/qcsrc/server/t_halflife.qc +++ b/qcsrc/server/t_halflife.qc @@ -37,7 +37,7 @@ void spawnfunc_func_healthcharger() {} void func_ladder_touch() { - if not(other.iscreature) + if (!other.iscreature) return; if (other.vehicle_flags & VHF_ISVEHICLE) return; diff --git a/qcsrc/server/t_items.qc b/qcsrc/server/t_items.qc index fcc8c0cf3..ab4505ae5 100644 --- a/qcsrc/server/t_items.qc +++ b/qcsrc/server/t_items.qc @@ -601,7 +601,7 @@ float Item_GiveTo(entity item, entity player) if (player.switchweapon == w_getbestweapon(player)) _switchweapon = TRUE; - if not(player.weapons & WepSet_FromWeapon(player.switchweapon)) + if (!(player.weapons & WepSet_FromWeapon(player.switchweapon))) _switchweapon = TRUE; pickedup |= Item_GiveAmmoTo(item, player, ammo_fuel, g_pickup_fuel_max, ITEM_MODE_FUEL); @@ -680,7 +680,7 @@ void Item_Touch (void) } } - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; if (other.deadflag) return; @@ -723,7 +723,7 @@ void Item_Touch (void) if (self.classname == "droppedweapon") remove (self); - else if not(self.spawnshieldtime) + else if (!self.spawnshieldtime) return; else { @@ -869,7 +869,7 @@ float commodity_pickupevalfunc(entity player, entity item) { wi = get_weaponinfo(i); - if not(player.weapons & WepSet_FromWeapon(i)) + if (!(player.weapons & WepSet_FromWeapon(i))) continue; if(wi.items & IT_SHELLS) @@ -1486,7 +1486,7 @@ void target_items_use (void) return; } - if not(IS_PLAYER(activator)) + if (!IS_PLAYER(activator)) return; if(activator.deadflag != DEAD_NO) return; @@ -1859,7 +1859,7 @@ float GiveItems(entity e, float beginarg, float endarg) { wi = get_weaponinfo(j); if(wi.weapon) - if not(wi.spawnflags & WEP_FLAG_MUTATORBLOCKED) + if (!(wi.spawnflags & WEP_FLAG_MUTATORBLOCKED)) got += GiveWeapon(e, j, op, val); } case "allammo": @@ -1943,7 +1943,7 @@ float GiveItems(entity e, float beginarg, float endarg) if(wi.weapon) { POSTGIVE_WEAPON(e, j, "weapons/weaponpickup.wav", string_null); - if not(save_weapons & WepSet_FromWeapon(j)) + if (!(save_weapons & WepSet_FromWeapon(j))) if(e.weapons & WepSet_FromWeapon(j)) weapon_action(wi.weapon, WR_PRECACHE); } @@ -1975,7 +1975,7 @@ float GiveItems(entity e, float beginarg, float endarg) else e.superweapons_finished += time; - if not(e.weapons & WepSet_FromWeapon(e.switchweapon)) + if (!(e.weapons & WepSet_FromWeapon(e.switchweapon))) _switchweapon = TRUE; if(_switchweapon) W_SwitchWeapon_Force(e, w_getbestweapon(e)); diff --git a/qcsrc/server/t_jumppads.qc b/qcsrc/server/t_jumppads.qc index 3c797f977..029bd8e5b 100644 --- a/qcsrc/server/t_jumppads.qc +++ b/qcsrc/server/t_jumppads.qc @@ -329,7 +329,7 @@ void spawnfunc_trigger_push() self.speed = 1000; self.movedir = self.movedir * self.speed * 10; - if not(self.noise) + if (!self.noise) self.noise = "misc/jumppad.wav"; precache_sound (self.noise); diff --git a/qcsrc/server/t_plats.qc b/qcsrc/server/t_plats.qc index 97ae43e1e..55844c8d6 100644 --- a/qcsrc/server/t_plats.qc +++ b/qcsrc/server/t_plats.qc @@ -95,7 +95,7 @@ void plat_go_up() void plat_center_touch() { - if not(other.iscreature) + if (!other.iscreature) return; if (other.health <= 0) @@ -110,7 +110,7 @@ void plat_center_touch() void plat_outside_touch() { - if not(other.iscreature) + if (!other.iscreature) return; if (other.health <= 0) @@ -258,7 +258,7 @@ void spawnfunc_func_plat() self.angles = '0 0 0'; self.classname = "plat"; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; self.effects |= EF_LOWPRECISION; setsize (self, self.mins , self.maxs); @@ -422,7 +422,7 @@ void spawnfunc_func_train() else self.view_ofs = self.mins; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; self.effects |= EF_LOWPRECISION; @@ -509,7 +509,7 @@ void spawnfunc_func_rotating() self.dmgtime2 = time; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; // no EF_LOWPRECISION here, as rounding angles is bad @@ -528,7 +528,7 @@ void func_bobbing_controller_think() vector v; self.nextthink = time + 0.1; - if not (self.owner.active == ACTIVE_ACTIVE) + if (!(self.owner.active == ACTIVE_ACTIVE)) { self.owner.velocity = '0 0 0'; return; @@ -588,7 +588,7 @@ void spawnfunc_func_bobbing() else // Z self.movedir = '0 0 1' * self.height; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; // wait for targets to spawn @@ -612,7 +612,7 @@ void func_pendulum_controller_think() float v; self.nextthink = time + 0.1; - if not (self.owner.active == ACTIVE_ACTIVE) + if (!(self.owner.active == ACTIVE_ACTIVE)) { self.owner.avelocity_x = 0; return; @@ -656,7 +656,7 @@ void spawnfunc_func_pendulum() self.blocked = generic_plat_blocked; self.avelocity_z = 0.0000001; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; if(!self.freq) @@ -745,7 +745,7 @@ void button_reset() void button_use() { - if not (self.active == ACTIVE_ACTIVE) + if (!(self.active == ACTIVE_ACTIVE)) return; self.enemy = activator; @@ -756,7 +756,7 @@ void button_touch() { if (!other) return; - if not(other.iscreature) + if (!other.iscreature) return; if(other.velocity * self.movedir < 0) return; @@ -799,7 +799,7 @@ void spawnfunc_func_button() { SetMovedir (); - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; self.effects |= EF_LOWPRECISION; @@ -1000,12 +1000,12 @@ float door_check_keys(void) { door = self; // no key needed - if not(door.itemkeys) + if (!door.itemkeys) return TRUE; // this door require a key // only a player can have a key - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return FALSE; if (item_keys_usekey(door, other)) { @@ -1113,7 +1113,7 @@ void door_use() void door_trigger_touch() { if (other.health < 1) - if not(other.iscreature && other.deadflag == DEAD_NO) + if (!(other.iscreature && other.deadflag == DEAD_NO)) return; if (time < self.attack_finished_single) @@ -1166,7 +1166,7 @@ Prints messages */ void door_touch() { - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; if (self.owner.attack_finished_single > time) return; @@ -1495,7 +1495,7 @@ void spawnfunc_func_door() SetMovedir (); self.max_health = self.health; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; self.effects |= EF_LOWPRECISION; self.classname = "door"; @@ -1621,7 +1621,7 @@ void spawnfunc_func_door_rotating() self.max_health = self.health; self.avelocity = self.movedir; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; self.velocity = '0 0 0'; //self.effects |= EF_LOWPRECISION; @@ -1839,7 +1839,7 @@ Prints messages */ void secret_touch() { - if not(other.iscreature) + if (!other.iscreature) return; if (self.attack_finished_single > time) return; @@ -1895,7 +1895,7 @@ void spawnfunc_func_door_secret() self.mangle = self.angles; self.angles = '0 0 0'; self.classname = "door"; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; self.effects |= EF_LOWPRECISION; @@ -1940,7 +1940,7 @@ void func_fourier_controller_think() float n, i, t; self.nextthink = time + 0.1; - if not (self.owner.active == ACTIVE_ACTIVE) + if (!(self.owner.active == ACTIVE_ACTIVE)) { self.owner.velocity = '0 0 0'; return; @@ -1991,7 +1991,7 @@ void spawnfunc_func_fourier() if(self.netname == "") self.netname = "1 0 0 0 1"; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; self.active = ACTIVE_ACTIVE; @@ -2073,7 +2073,7 @@ void func_vectormamamam_controller_think() { self.nextthink = time + 0.1; - if not (self.owner.active == ACTIVE_ACTIVE) + if (!(self.owner.active == ACTIVE_ACTIVE)) { self.owner.velocity = '0 0 0'; return; @@ -2154,7 +2154,7 @@ void spawnfunc_func_vectormamamam() if(self.netname == "") self.netname = "1 0 0 0 1"; - if not(InitMovingBrushTrigger()) + if (!InitMovingBrushTrigger()) return; // wait for targets to spawn diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index 7f8cb8292..8c2f048e8 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -142,7 +142,7 @@ float DoesQ3ARemoveThisEntity() return 1; if(self.notta) - if not(!teamplay || g_tdm || g_ctf) + if (!(!teamplay || g_tdm || g_ctf)) return 1; if(self.notsingle) diff --git a/qcsrc/server/t_teleporters.qc b/qcsrc/server/t_teleporters.qc index d61911ecd..0b2345118 100644 --- a/qcsrc/server/t_teleporters.qc +++ b/qcsrc/server/t_teleporters.qc @@ -33,7 +33,7 @@ float check_tdeath(entity player, vector org, vector telefragmin, vector telefra { TDEATHLOOP(org) { - if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team) + if (!(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team)) if(IS_PLAYER(head)) if(head.health >= 1) return 1; @@ -48,7 +48,7 @@ void tdeath(entity player, entity teleporter, entity telefragger, vector telefra { if (IS_PLAYER(player) && player.health >= 1) { - if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team) + if (!(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team)) { if(IS_PLAYER(head)) if(head.health >= 1) @@ -202,7 +202,7 @@ void Teleport_Touch (void) if (self.active != ACTIVE_ACTIVE) return; - if not(other.teleportable) + if (!other.teleportable) return; if(other.vehicle) @@ -230,7 +230,7 @@ void Teleport_Touch (void) activator = other; s = self.target; self.target = string_null; SUB_UseTargets(); - if not(self.target) self.target = s; + if (!self.target) self.target = s; oldself = self; self = e; diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 81c877db9..3e1ce9588 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -56,7 +56,7 @@ void InitGameplayMode() teamplay = 0; serverflags &= ~SERVERFLAG_TEAMPLAY; - if not(cvar_value_issafe(world.fog)) + if (!cvar_value_issafe(world.fog)) { print("The current map contains a potentially harmful fog setting, ignored\n"); world.fog = string_null; diff --git a/qcsrc/server/tturrets/system/system_aimprocs.qc b/qcsrc/server/tturrets/system/system_aimprocs.qc index 675b5de0d..6e283f415 100644 --- a/qcsrc/server/tturrets/system/system_aimprocs.qc +++ b/qcsrc/server/tturrets/system/system_aimprocs.qc @@ -43,7 +43,7 @@ vector turret_stdproc_aim_generic() prep = pre_pos + (self.enemy.velocity * (impact_time + mintime)); if(self.aim_flags & TFL_AIM_ZPREDICT) - if not(self.enemy.flags & FL_ONGROUND) + if (!(self.enemy.flags & FL_ONGROUND)) if(self.enemy.movetype == MOVETYPE_WALK || self.enemy.movetype == MOVETYPE_TOSS || self.enemy.movetype == MOVETYPE_BOUNCE) { float vz; diff --git a/qcsrc/server/tturrets/system/system_damage.qc b/qcsrc/server/tturrets/system/system_damage.qc index 4145a6ea3..c75abd8b2 100644 --- a/qcsrc/server/tturrets/system/system_damage.qc +++ b/qcsrc/server/tturrets/system/system_damage.qc @@ -88,7 +88,7 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo return; // Inactive turrets take no damage. (hm..) - if not (self.active) + if (!self.active) return; if (teamplay) diff --git a/qcsrc/server/tturrets/system/system_main.qc b/qcsrc/server/tturrets/system/system_main.qc index 5a77b17d9..17343f417 100644 --- a/qcsrc/server/tturrets/system/system_main.qc +++ b/qcsrc/server/tturrets/system/system_main.qc @@ -83,13 +83,13 @@ void load_unit_settings(entity ent, string unitname, float is_reload) if (ent == world) return; - if not (ent.turret_scale_damage) ent.turret_scale_damage = 1; - if not (ent.turret_scale_range) ent.turret_scale_range = 1; - if not (ent.turret_scale_refire) ent.turret_scale_refire = 1; - if not (ent.turret_scale_ammo) ent.turret_scale_ammo = 1; - if not (ent.turret_scale_aim) ent.turret_scale_aim = 1; - if not (ent.turret_scale_health) ent.turret_scale_health = 1; - if not (ent.turret_scale_respawn) ent.turret_scale_respawn = 1; + if (!ent.turret_scale_damage) ent.turret_scale_damage = 1; + if (!ent.turret_scale_range) ent.turret_scale_range = 1; + if (!ent.turret_scale_refire) ent.turret_scale_refire = 1; + if (!ent.turret_scale_ammo) ent.turret_scale_ammo = 1; + if (!ent.turret_scale_aim) ent.turret_scale_aim = 1; + if (!ent.turret_scale_health) ent.turret_scale_health = 1; + if (!ent.turret_scale_respawn) ent.turret_scale_respawn = 1; sbase = strcat(cvar_base,unitname); if (is_reload) @@ -332,7 +332,7 @@ void turret_stdproc_track() if (self.track_flags == TFL_TRACK_NO) return; - if not (self.active) + if (!self.active) target_angle = self.idle_aim - ('1 0 0' * self.aim_maxpitch); else if (self.enemy == world) { @@ -578,10 +578,10 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl if(e_target.owner == e_turret) return -0.5; - if not(checkpvs(e_target.origin, e_turret)) + if (!checkpvs(e_target.origin, e_turret)) return -1; - if not (e_target) + if (!e_target) return -2; if(g_onslaught) @@ -607,7 +607,7 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl // player if (IS_CLIENT(e_target)) { - if not (validate_flags & TFL_TARGETSELECT_PLAYERS) + if (!(validate_flags & TFL_TARGETSELECT_PLAYERS)) return -7; if (e_target.deadflag != DEAD_NO) @@ -622,11 +622,11 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl // Missile if (e_target.flags & FL_PROJECTILE) - if not (validate_flags & TFL_TARGETSELECT_MISSILES) + if (!(validate_flags & TFL_TARGETSELECT_MISSILES)) return -10; if (validate_flags & TFL_TARGETSELECT_MISSILESONLY) - if not (e_target.flags & FL_PROJECTILE) + if (!(e_target.flags & FL_PROJECTILE)) return -10.5; // Team check @@ -785,13 +785,13 @@ void turret_think() #endif // Handle ammo - if not (self.spawnflags & TSF_NO_AMMO_REGEN) + if (!(self.spawnflags & TSF_NO_AMMO_REGEN)) if (self.ammo < self.ammo_max) self.ammo = min(self.ammo + self.ammo_recharge, self.ammo_max); // Inactive turrets needs to run the think loop, // So they can handle animation and wake up if need be. - if not (self.active) + if (!self.active) { turret_stdproc_track(); return; @@ -827,11 +827,11 @@ void turret_think() // This one is doing something.. oddball. assume its handles what needs to be handled. // Predict? - if not(self.aim_flags & TFL_AIM_NO) + if (!(self.aim_flags & TFL_AIM_NO)) self.tur_aimpos = turret_stdproc_aim_generic(); // Turn & pitch? - if not(self.track_flags & TFL_TRACK_NO) + if (!(self.track_flags & TFL_TRACK_NO)) turret_stdproc_track(); turret_do_updates(self); @@ -847,11 +847,11 @@ void turret_think() if(self.volly_counter != self.shot_volly) { // Predict or whatnot - if not(self.aim_flags & TFL_AIM_NO) + if (!(self.aim_flags & TFL_AIM_NO)) self.tur_aimpos = turret_stdproc_aim_generic(); // Turn & pitch - if not(self.track_flags & TFL_TRACK_NO) + if (!(self.track_flags & TFL_TRACK_NO)) turret_stdproc_track(); turret_do_updates(self); @@ -896,7 +896,7 @@ void turret_think() if (self.enemy == world) { // Turn & pitch - if not(self.track_flags & TFL_TRACK_NO) + if (!(self.track_flags & TFL_TRACK_NO)) turret_stdproc_track(); // do any per-turret stuff @@ -910,11 +910,11 @@ void turret_think() self.lip = time + autocvar_g_turrets_aimidle_delay; // Keep track of the last time we had a target. // Predict? - if not(self.aim_flags & TFL_AIM_NO) + if (!(self.aim_flags & TFL_AIM_NO)) self.tur_aimpos = turret_stdproc_aim_generic(); // Turn & pitch? - if not(self.track_flags & TFL_TRACK_NO) + if (!(self.track_flags & TFL_TRACK_NO)) turret_stdproc_track(); turret_do_updates(self); @@ -1030,7 +1030,7 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa self.turret_type = _turret_type; e = find(world, classname, "turret_manager"); - if not (e) + if (!e) { e = spawn(); e.classname = "turret_manager"; @@ -1038,7 +1038,7 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa e.nextthink = time + 2; } - if not (self.spawnflags & TSF_SUSPENDED) + if (!(self.spawnflags & TSF_SUSPENDED)) builtin_droptofloor(); // why can't we use regular droptofloor here? // Terrainbase spawnflag. This puts a enlongated model @@ -1060,7 +1060,7 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa self.effects = EF_NODRAW; // Handle turret teams. - if not (teamplay) + if (!teamplay) self.team = MAX_SHOT_DISTANCE; // Group all turrets into the same team, so they dont kill eachother. else if(g_onslaught && self.targetname) { @@ -1081,7 +1081,7 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa * if it hits a glitch in my logic :P so try to set as mutch * as possible beforehand. */ - if not(self.ticrate) + if (!self.ticrate) { if (self.turrcaps_flags & TFL_TURRCAPS_SUPPORT) self.ticrate = 0.2; // Support units generaly dont need to have a high speed ai-loop @@ -1095,97 +1095,97 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa if (self.netname == "") self.netname = self.classname; - if not (self.respawntime) + if (!self.respawntime) self.respawntime = 60; self.respawntime = max(-1, self.respawntime); - if not (self.health) + if (!self.health) self.health = 1000; self.tur_health = max(1, self.health); - if not (self.turrcaps_flags) + if (!self.turrcaps_flags) self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_MEDPROJ | TFL_TURRCAPS_PLAYERKILL; - if not (self.damage_flags) + if (!self.damage_flags) self.damage_flags = TFL_DMG_YES | TFL_DMG_RETALIATE | TFL_DMG_AIMSHAKE; // Shot stuff. - if not (self.shot_refire) + if (!self.shot_refire) self.shot_refire = 1; self.shot_refire = bound(0.01, self.shot_refire, 9999); - if not (self.shot_dmg) + if (!self.shot_dmg) self.shot_dmg = self.shot_refire * 50; self.shot_dmg = max(1, self.shot_dmg); - if not (self.shot_radius) + if (!self.shot_radius) self.shot_radius = self.shot_dmg * 0.5; self.shot_radius = max(1, self.shot_radius); - if not (self.shot_speed) + if (!self.shot_speed) self.shot_speed = 2500; self.shot_speed = max(1, self.shot_speed); - if not (self.shot_spread) + if (!self.shot_spread) self.shot_spread = 0.0125; self.shot_spread = bound(0.0001, self.shot_spread, 500); - if not (self.shot_force) + if (!self.shot_force) self.shot_force = self.shot_dmg * 0.5 + self.shot_radius * 0.5; self.shot_force = bound(0.001, self.shot_force, 5000); - if not (self.shot_volly) + if (!self.shot_volly) self.shot_volly = 1; self.shot_volly = bound(1, self.shot_volly, floor(self.ammo_max / self.shot_dmg)); - if not (self.shot_volly_refire) + if (!self.shot_volly_refire) self.shot_volly_refire = self.shot_refire * self.shot_volly; self.shot_volly_refire = bound(self.shot_refire, self.shot_volly_refire, 60); - if not (self.firecheck_flags) + if (!self.firecheck_flags) self.firecheck_flags = TFL_FIRECHECK_DEAD | TFL_FIRECHECK_DISTANCES | TFL_FIRECHECK_LOS | TFL_FIRECHECK_AIMDIST | TFL_FIRECHECK_TEAMCECK | TFL_FIRECHECK_OWM_AMMO | TFL_FIRECHECK_REFIRE; // Range stuff. - if not (self.target_range) + if (!self.target_range) self.target_range = self.shot_speed * 0.5; self.target_range = bound(0, self.target_range, MAX_SHOT_DISTANCE); - if not (self.target_range_min) + if (!self.target_range_min) self.target_range_min = self.shot_radius * 2; self.target_range_min = bound(0, self.target_range_min, MAX_SHOT_DISTANCE); - if not (self.target_range_optimal) + if (!self.target_range_optimal) self.target_range_optimal = self.target_range * 0.5; self.target_range_optimal = bound(0, self.target_range_optimal, MAX_SHOT_DISTANCE); // Aim stuff. - if not (self.aim_maxrot) + if (!self.aim_maxrot) self.aim_maxrot = 90; self.aim_maxrot = bound(0, self.aim_maxrot, 360); - if not (self.aim_maxpitch) + if (!self.aim_maxpitch) self.aim_maxpitch = 20; self.aim_maxpitch = bound(0, self.aim_maxpitch, 90); - if not (self.aim_speed) + if (!self.aim_speed) self.aim_speed = 36; self.aim_speed = bound(0.1, self.aim_speed, 1000); - if not (self.aim_firetolerance_dist) + if (!self.aim_firetolerance_dist) self.aim_firetolerance_dist = 5 + (self.shot_radius * 2); self.aim_firetolerance_dist = bound(0.1, self.aim_firetolerance_dist, MAX_SHOT_DISTANCE); - if not (self.aim_flags) + if (!self.aim_flags) { self.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE; if(self.turrcaps_flags & TFL_TURRCAPS_RADIUSDMG) self.aim_flags |= TFL_AIM_GROUNDGROUND; } - if not (self.track_type) + if (!self.track_type) self.track_type = TFL_TRACKTYPE_STEPMOTOR; if (self.track_type != TFL_TRACKTYPE_STEPMOTOR) @@ -1193,17 +1193,17 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa // Fluid / Ineria mode. Looks mutch nicer. // Can reduce aim preformance alot, needs a bit diffrent aimspeed - if not (self.aim_speed) + if (!self.aim_speed) self.aim_speed = 180; self.aim_speed = bound(0.1, self.aim_speed, 1000); - if not (self.track_accel_pitch) + if (!self.track_accel_pitch) self.track_accel_pitch = 0.5; - if not (self.track_accel_rot) + if (!self.track_accel_rot) self.track_accel_rot = 0.5; - if not (self.track_blendrate) + if (!self.track_blendrate) self.track_blendrate = 0.35; } @@ -1212,25 +1212,25 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa // Target selection stuff. - if not (self.target_select_rangebias) + if (!self.target_select_rangebias) self.target_select_rangebias = 1; self.target_select_rangebias = bound(-10, self.target_select_rangebias, 10); - if not (self.target_select_samebias) + if (!self.target_select_samebias) self.target_select_samebias = 1; self.target_select_samebias = bound(-10, self.target_select_samebias, 10); - if not (self.target_select_anglebias) + if (!self.target_select_anglebias) self.target_select_anglebias = 1; self.target_select_anglebias = bound(-10, self.target_select_anglebias, 10); - if not (self.target_select_missilebias) + if (!self.target_select_missilebias) self.target_select_missilebias = -10; self.target_select_missilebias = bound(-10, self.target_select_missilebias, 10); self.target_select_playerbias = bound(-10, self.target_select_playerbias, 10); - if not (self.target_select_flags) + if (!self.target_select_flags) { self.target_select_flags = TFL_TARGETSELECT_LOS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_ANGLELIMITS; @@ -1247,27 +1247,27 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa self.target_validate_flags = self.target_select_flags; // Ammo stuff - if not (self.ammo_max) + if (!self.ammo_max) self.ammo_max = self.shot_dmg * 10; self.ammo_max = max(self.shot_dmg, self.ammo_max); - if not (self.ammo) + if (!self.ammo) self.ammo = self.shot_dmg * 5; self.ammo = bound(0,self.ammo, self.ammo_max); - if not (self.ammo_recharge) + if (!self.ammo_recharge) self.ammo_recharge = self.shot_dmg * 0.5; self.ammo_recharge = max(0 ,self.ammo_recharge); // Convert the recharge from X per sec to X per ticrate self.ammo_recharge = self.ammo_recharge * self.ticrate; - if not (self.ammo_flags) + if (!self.ammo_flags) self.ammo_flags = TFL_AMMO_ENERGY | TFL_AMMO_RECHARGE; // Damage stuff if(self.spawnflags & TSL_NO_RESPAWN) - if not (self.damage_flags & TFL_DMG_DEATH_NORESPAWN) + if (!(self.damage_flags & TFL_DMG_DEATH_NORESPAWN)) self.damage_flags |= TFL_DMG_DEATH_NORESPAWN; // Offsets & origins @@ -1306,7 +1306,7 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa self.tur_head.movetype = MOVETYPE_NOCLIP; // Defend mode? - if not (self.tur_defend) + if (!self.tur_defend) if (self.target != "") { self.tur_defend = find(world, targetname, self.target); diff --git a/qcsrc/server/tturrets/units/unit_fusionreactor.qc b/qcsrc/server/tturrets/units/unit_fusionreactor.qc index 8118b8f23..2833ab3f0 100644 --- a/qcsrc/server/tturrets/units/unit_fusionreactor.qc +++ b/qcsrc/server/tturrets/units/unit_fusionreactor.qc @@ -49,7 +49,7 @@ float turret_fusionreactor_firecheck() if(self.team != self.enemy.team) return 0; - if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY) + if (!(self.enemy.ammo_flags & TFL_AMMO_ENERGY)) return 0; return 1; diff --git a/qcsrc/server/tturrets/units/unit_machinegun.qc b/qcsrc/server/tturrets/units/unit_machinegun.qc index 8f18d845a..62abe38aa 100644 --- a/qcsrc/server/tturrets/units/unit_machinegun.qc +++ b/qcsrc/server/tturrets/units/unit_machinegun.qc @@ -21,7 +21,7 @@ void turret_machinegun_std_init() self.turrcaps_flags = TFL_TURRCAPS_PLAYERKILL; self.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE; - if not (autocvar_g_antilag_bullets) + if (!autocvar_g_antilag_bullets) self.turrcaps_flags |= TFL_TURRCAPS_HITSCAN; if (turret_stdproc_init("machinegun_std", "models/turrets/base.md3", "models/turrets/machinegun.md3", TID_MACHINEGUN) == 0) diff --git a/qcsrc/server/tturrets/units/unit_tessla.qc b/qcsrc/server/tturrets/units/unit_tessla.qc index 596993891..b4c220851 100644 --- a/qcsrc/server/tturrets/units/unit_tessla.qc +++ b/qcsrc/server/tturrets/units/unit_tessla.qc @@ -71,7 +71,7 @@ float turret_tesla_firecheck() self.target_select_time = time; } - if not (turret_stdproc_firecheck()) + if (!turret_stdproc_firecheck()) return 0; if(self.enemy) @@ -120,7 +120,7 @@ void turret_tesla_fire() void turret_tesla_postthink() { - if not (self.active) + if (!self.active) { self.tur_head.avelocity = '0 0 0'; return; diff --git a/qcsrc/server/vehicles/bumblebee.qc b/qcsrc/server/vehicles/bumblebee.qc index dff26d6ea..4499f26ae 100644 --- a/qcsrc/server/vehicles/bumblebee.qc +++ b/qcsrc/server/vehicles/bumblebee.qc @@ -339,7 +339,7 @@ float bumb_gunner_enter() float vehicles_valid_pilot() { - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return FALSE; if(other.deadflag != DEAD_NO) @@ -348,7 +348,7 @@ float vehicles_valid_pilot() if(other.vehicle != world) return FALSE; - if not(IS_REAL_CLIENT(other)) + if (!IS_REAL_CLIENT(other)) if(!autocvar_g_vehicles_allow_bots) return FALSE; diff --git a/qcsrc/server/vehicles/racer.qc b/qcsrc/server/vehicles/racer.qc index 97bf73aed..bbcf11c07 100644 --- a/qcsrc/server/vehicles/racer.qc +++ b/qcsrc/server/vehicles/racer.qc @@ -150,7 +150,7 @@ void racer_rocket_groundhugger() return; } - if not (self.realowner.vehicle) + if (!self.realowner.vehicle) { UpdateCSQCProjectile(self); return; @@ -198,7 +198,7 @@ void racer_rocket_tracker() return; } - if not (self.realowner.vehicle) + if (!self.realowner.vehicle) { UpdateCSQCProjectile(self); return; @@ -492,7 +492,7 @@ void racer_exit(float eject) self.movetype = MOVETYPE_BOUNCE; sound (self.tur_head, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_VEHICLEENGINE, ATTEN_NORM); - if not (self.owner) + if (!self.owner) return; makevectors(self.angles); diff --git a/qcsrc/server/vehicles/raptor.qc b/qcsrc/server/vehicles/raptor.qc index ecad45b67..2472f3a0d 100644 --- a/qcsrc/server/vehicles/raptor.qc +++ b/qcsrc/server/vehicles/raptor.qc @@ -249,7 +249,7 @@ void raptor_exit(float eject) self.nextthink = time; } - if not (self.owner) + if (!self.owner) return; makevectors(self.angles); diff --git a/qcsrc/server/vehicles/spiderbot.qc b/qcsrc/server/vehicles/spiderbot.qc index 9dc41952f..478067c8e 100644 --- a/qcsrc/server/vehicles/spiderbot.qc +++ b/qcsrc/server/vehicles/spiderbot.qc @@ -99,7 +99,7 @@ void spiderbot_rocket_guided() self.nextthink = time; - if not (self.realowner.vehicle) + if (!self.realowner.vehicle) self.think = spiderbot_rocket_unguided; crosshair_trace(self.realowner); @@ -117,7 +117,7 @@ void spiderbot_guide_release() { entity rkt; rkt = findchainentity(realowner, self.owner); - if not (rkt) + if (!rkt) return; crosshair_trace(self.owner); @@ -245,7 +245,7 @@ void spiderbot_rocket_do() } if (self.wait != -10) - if not (self.owner.BUTTON_ATCK2) + if (!self.owner.BUTTON_ATCK2) return; @@ -601,7 +601,7 @@ void spiderbot_exit(float eject) self.frame = 5; self.movetype = MOVETYPE_WALK; - if not (self.owner) + if (!self.owner) return; makevectors(self.angles); diff --git a/qcsrc/server/vehicles/vehicles.qc b/qcsrc/server/vehicles/vehicles.qc index 75fa9407e..f9aa1a04c 100644 --- a/qcsrc/server/vehicles/vehicles.qc +++ b/qcsrc/server/vehicles/vehicles.qc @@ -46,7 +46,7 @@ float SendAuxiliaryXhair(entity to, float sf) void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, float axh_id) { - if not(IS_REAL_CLIENT(own)) + if (!IS_REAL_CLIENT(own)) return; entity axh; @@ -101,7 +101,7 @@ void SendAuxiliaryXhair2(entity own, vector loc, vector clr, float axh_id) **/ void CSQCVehicleSetup(entity own, float vehicle_id) { - if not(IS_REAL_CLIENT(own)) + if (!IS_REAL_CLIENT(own)) return; msg_entity = own; @@ -559,7 +559,7 @@ void vehicles_touch() return; } - if not(IS_PLAYER(other)) + if (!IS_PLAYER(other)) return; if(other.deadflag != DEAD_NO) @@ -1153,7 +1153,7 @@ float vehicle_addplayerslot( entity _owner, float() _framefunc, void(float) _exitfunc) { - if not (_owner.vehicle_flags & VHF_MULTISLOT) + if (!(_owner.vehicle_flags & VHF_MULTISLOT)) _owner.vehicle_flags |= VHF_MULTISLOT; _slot.PlayerPhysplug = _framefunc; @@ -1310,7 +1310,7 @@ float vehicle_initialize(string net_name, } setsize(self, min_s, max_s); - if not (nodrop) + if (!nodrop) { setorigin(self, self.origin); tracebox(self.origin + '0 0 100', min_s, max_s, self.origin - '0 0 10000', MOVE_WORLDONLY, self); diff --git a/qcsrc/server/w_common.qc b/qcsrc/server/w_common.qc index 2eca8c2cb..b9c37cc4d 100644 --- a/qcsrc/server/w_common.qc +++ b/qcsrc/server/w_common.qc @@ -354,8 +354,8 @@ void W_BallisticBullet_Touch (void) // common/weapclip (intended) // common/noimpact (is supposed to eat projectiles, but is erased farther above) if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW) - if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID) - if not(trace_dphitcontents & DPCONTENTS_OPAQUE) + if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID)) + if (!(trace_dphitcontents & DPCONTENTS_OPAQUE)) { remove(self); return; @@ -444,7 +444,7 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f lag = ANTILAG_LATENCY(self); if(lag < 0.001) lag = 0; - if not(IS_REAL_CLIENT(self)) + if (!IS_REAL_CLIENT(self)) lag = 0; if(autocvar_g_antilag == 0 || self.cvar_cl_noantilag) lag = 0; // only do hitscan, but no antilag @@ -514,8 +514,8 @@ void fireBallisticBullet(vector start, vector dir, float spread, float pSpeed, f // common/weapclip (intended) // common/noimpact (is supposed to eat projectiles, but is erased farther above) if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODRAW) - if not(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID) - if not(trace_dphitcontents & DPCONTENTS_OPAQUE) + if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NONSOLID)) + if (!(trace_dphitcontents & DPCONTENTS_OPAQUE)) break; // go through solid! @@ -562,7 +562,7 @@ void fireBullet (vector start, vector dir, float spread, float damage, float for if (pointcontents (trace_endpos) != CONTENT_SKY) { - if not (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) + if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)) Damage_DamageInfo(trace_endpos, damage, 0, 0, dir * max(1, force), dtype, trace_ent.species, self); Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * force); @@ -593,14 +593,14 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp { if(is_from_exception) return (exception); // if exception is detected, allow it to override - else if not(is_from_contents) + else if (!is_from_contents) return FALSE; // otherwise, only allow damage from contents } else if(autocvar_g_projectiles_damage == 1) { if(is_from_exception) return (exception); // if exception is detected, allow it to override - else if not(is_from_contents || is_from_owner) + else if (!(is_from_contents || is_from_owner)) return FALSE; // otherwise, only allow self damage and damage from contents } else if(autocvar_g_projectiles_damage == 2) // allow any damage, but override for exceptions diff --git a/qcsrc/server/w_crylink.qc b/qcsrc/server/w_crylink.qc index 80af85acf..d447e2887 100644 --- a/qcsrc/server/w_crylink.qc +++ b/qcsrc/server/w_crylink.qc @@ -637,7 +637,7 @@ float w_crylink(float req) } self.crylink_waitrelease = 0; if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2)) - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { // ran out of ammo! self.cnt = WEP_CRYLINK; diff --git a/qcsrc/server/w_electro.qc b/qcsrc/server/w_electro.qc index dcf4e6563..3762ac4d7 100644 --- a/qcsrc/server/w_electro.qc +++ b/qcsrc/server/w_electro.qc @@ -279,7 +279,7 @@ void lgbeam_think() dt = frametime; // if this weapon is reloadable, decrease its load. Else decrease the player's ammo - if not(owner_player.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(owner_player.items & IT_UNLIMITED_WEAPON_AMMO)) { if(autocvar_g_balance_electro_primary_ammo) { diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index 811038b14..e32af7de5 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -337,7 +337,7 @@ void W_Hagar_Attack2_Load (void) } // we aren't checking ammo during an attack, so we must do it here - if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2)) + if (!(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))) { // note: this doesn't force the switch W_SwitchToOtherWeapon(self); @@ -442,7 +442,7 @@ float w_hagar(float req) } else if (req == WR_RELOAD) { - if not(self.hagar_load) // require releasing loaded rockets first + if (!self.hagar_load) // require releasing loaded rockets first W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav"); } else if (req == WR_SUICIDEMESSAGE) diff --git a/qcsrc/server/w_hlac.qc b/qcsrc/server/w_hlac.qc index 5959965a6..520c49261 100644 --- a/qcsrc/server/w_hlac.qc +++ b/qcsrc/server/w_hlac.qc @@ -148,7 +148,7 @@ void HLAC_fire1_02() if (self.BUTTON_ATCK) { if (!weapon_action(self.weapon, WR_CHECKAMMO1)) - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { W_SwitchWeapon_Force(self, w_getbestweapon(self)); w_ready(); diff --git a/qcsrc/server/w_hook.qc b/qcsrc/server/w_hook.qc index 923083387..4cef38441 100644 --- a/qcsrc/server/w_hook.qc +++ b/qcsrc/server/w_hook.qc @@ -151,8 +151,8 @@ float w_hook(float req) if (self.BUTTON_ATCK || (!(self.items & IT_JETPACK) && self.BUTTON_HOOK)) { if(!self.hook) - if not(self.hook_state & HOOK_WAITING_FOR_RELEASE) - if not(self.hook_state & HOOK_FIRING) + if (!(self.hook_state & HOOK_WAITING_FOR_RELEASE)) + if (!(self.hook_state & HOOK_FIRING)) if (time > self.hook_refire) if (weapon_prepareattack(0, -1)) { @@ -177,7 +177,7 @@ float w_hook(float req) self.hook_refire = max(self.hook_refire, time + autocvar_g_balance_hook_primary_refire * W_WeaponRateFactor()); // hook also inhibits health regeneration, but only for 1 second - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_pause_fuel_regen); } @@ -195,7 +195,7 @@ float w_hook(float req) { if ( time > self.hook_time_fueldecrease ) { - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { if ( self.ammo_fuel >= (time - self.hook_time_fueldecrease) * hooked_fuel ) { diff --git a/qcsrc/server/w_minelayer.qc b/qcsrc/server/w_minelayer.qc index 5d427a5a0..0db02d74f 100644 --- a/qcsrc/server/w_minelayer.qc +++ b/qcsrc/server/w_minelayer.qc @@ -470,7 +470,7 @@ float w_minelayer(float req) if(autocvar_g_balance_minelayer_reload_ammo && self.clip_load < autocvar_g_balance_minelayer_ammo) // forced reload { // not if we're holding the minelayer without enough ammo, but can detonate existing mines - if not (W_PlacedMines(FALSE) && self.ammo_rockets < autocvar_g_balance_minelayer_ammo) + if (!(W_PlacedMines(FALSE) && self.ammo_rockets < autocvar_g_balance_minelayer_ammo)) weapon_action(self.weapon, WR_RELOAD); } else if (self.BUTTON_ATCK) diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index 5ab21e2ea..d6f737037 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -156,7 +156,7 @@ float w_nex(float req) if(self.BUTTON_ATCK2) // only eat ammo when the button is pressed { dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate); - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { // if this weapon is reloadable, decrease its load. Else decrease the player's ammo if(autocvar_g_balance_nex_reload_ammo) diff --git a/qcsrc/server/w_rocketlauncher.qc b/qcsrc/server/w_rocketlauncher.qc index 6c5bae99c..fd851c207 100644 --- a/qcsrc/server/w_rocketlauncher.qc +++ b/qcsrc/server/w_rocketlauncher.qc @@ -147,8 +147,8 @@ void W_Rocket_Think (void) if (self.realowner.weapon == WEP_ROCKET_LAUNCHER) { if(self == self.realowner.lastrocket) - if not(self.realowner.rl_release) - if not(self.BUTTON_ATCK2) + if (!self.realowner.rl_release) + if (!self.BUTTON_ATCK2) if(autocvar_g_balance_rocketlauncher_guiderate) if(time > self.pushltime) if(self.realowner.deadflag == DEAD_NO) diff --git a/qcsrc/server/w_shotgun.qc b/qcsrc/server/w_shotgun.qc index b26fca2b7..5b2672fec 100644 --- a/qcsrc/server/w_shotgun.qc +++ b/qcsrc/server/w_shotgun.qc @@ -190,7 +190,7 @@ float w_shotgun(float req) if(autocvar_g_balance_shotgun_reload_ammo && self.clip_load < autocvar_g_balance_shotgun_primary_ammo) // forced reload { // don't force reload an empty shotgun if its melee attack is active - if not(autocvar_g_balance_shotgun_secondary && self.ammo_shells < autocvar_g_balance_shotgun_primary_ammo) + if (!(autocvar_g_balance_shotgun_secondary && self.ammo_shells < autocvar_g_balance_shotgun_primary_ammo)) weapon_action(self.weapon, WR_RELOAD); } else diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index db4f95385..dee2e15cf 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -313,7 +313,7 @@ void W_Tuba_NoteOn(float hittype) } } - if not(self.tuba_note) + if (!self.tuba_note) { self.tuba_note = spawn(); self.tuba_note.owner = self.tuba_note.realowner = self; diff --git a/qcsrc/server/w_uzi.qc b/qcsrc/server/w_uzi.qc index b3852b8e8..88dcc8c9f 100644 --- a/qcsrc/server/w_uzi.qc +++ b/qcsrc/server/w_uzi.qc @@ -93,7 +93,7 @@ void uzi_fire1_02() if (self.BUTTON_ATCK) { if (!weapon_action(self.weapon, WR_CHECKAMMO2)) - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { W_SwitchWeapon_Force(self, w_getbestweapon(self)); w_ready(); @@ -119,7 +119,7 @@ void uzi_mode1_fire_auto() } if (!weapon_action(self.weapon, WR_CHECKAMMO1)) - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { W_SwitchWeapon_Force(self, w_getbestweapon(self)); w_ready(); @@ -216,7 +216,7 @@ float w_uzi(float req) if(weapon_prepareattack(1, 0)) { if (!weapon_action(self.weapon, WR_CHECKAMMO2)) - if not(self.items & IT_UNLIMITED_WEAPON_AMMO) + if (!(self.items & IT_UNLIMITED_WEAPON_AMMO)) { W_SwitchWeapon_Force(self, w_getbestweapon(self)); w_ready(); diff --git a/qcsrc/server/waypointsprites.qc b/qcsrc/server/waypointsprites.qc index 6454838eb..8332171ae 100644 --- a/qcsrc/server/waypointsprites.qc +++ b/qcsrc/server/waypointsprites.qc @@ -197,7 +197,7 @@ float WaypointSprite_visible_for_player(entity e) { if(self.team != e.team) return FALSE; - if not(IS_PLAYER(e)) + if (!IS_PLAYER(e)) return FALSE; } diff --git a/qcsrc/warpzonelib/client.qc b/qcsrc/warpzonelib/client.qc index 6f7561234..5370ba519 100644 --- a/qcsrc/warpzonelib/client.qc +++ b/qcsrc/warpzonelib/client.qc @@ -25,7 +25,7 @@ void WarpZone_Read(float isnew) float f; warpzone_warpzones_exist = 1; - if not(self.enemy) + if (!self.enemy) { self.enemy = spawn(); self.enemy.classname = "warpzone_from"; diff --git a/qcsrc/warpzonelib/common.qc b/qcsrc/warpzonelib/common.qc index 386615247..6db41d133 100644 --- a/qcsrc/warpzonelib/common.qc +++ b/qcsrc/warpzonelib/common.qc @@ -113,7 +113,7 @@ float WarpZoneLib_BoxTouchesBrush_Recurse() return 0; } #endif - if not(trace_ent) + if (!trace_ent) return 0; if (trace_ent == WarpZoneLib_BoxTouchesBrush_ent) return 1; diff --git a/qcsrc/warpzonelib/server.qc b/qcsrc/warpzonelib/server.qc index 25bcd2901..0075bc849 100644 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@ -56,7 +56,7 @@ float WarpZone_Teleport(entity wz, entity player, float f0, float f1) o10 = o1 = WarpZone_TransformOrigin(wz, o0); v1 = WarpZone_TransformVelocity(wz, v0); - if not(IS_NOT_A_CLIENT(player)) + if (!IS_NOT_A_CLIENT(player)) a1 = WarpZone_TransformVAngles(wz, player.v_angle); else a1 = WarpZone_TransformAngles(wz, a0); @@ -184,16 +184,16 @@ void WarpZone_Touch (void) save1 = self.target; self.target = string_null; save2 = self.target3; self.target3 = string_null; SUB_UseTargets(); - if not(self.target) self.target = save1; - if not(self.target3) self.target3 = save2; + if (!self.target) self.target = save1; + if (!self.target3) self.target3 = save2; oldself = self; self = self.enemy; save1 = self.target; self.target = string_null; save2 = self.target2; self.target2 = string_null; SUB_UseTargets(); - if not(self.target) self.target = save1; - if not(self.target2) self.target2 = save2; + if (!self.target) self.target = save1; + if (!self.target2) self.target2 = save2; self = oldself; } else @@ -348,15 +348,15 @@ float WarpZone_CheckProjectileImpact(entity player) save1 = self.target; self.target = string_null; save2 = self.target3; self.target3 = string_null; SUB_UseTargets(); - if not(self.target) self.target = save1; - if not(self.target3) self.target3 = save2; + if (!self.target) self.target = save1; + if (!self.target3) self.target3 = save2; self = self.enemy; save1 = self.target; self.target = string_null; save2 = self.target2; self.target2 = string_null; SUB_UseTargets(); - if not(self.target) self.target = save1; - if not(self.target2) self.target2 = save2; + if (!self.target) self.target = save1; + if (!self.target2) self.target2 = save2; self = oldself; } else @@ -537,7 +537,7 @@ void WarpZone_InitStep_UpdateTransform() for(i_s = 0; ; ++i_s) { tex = getsurfacetexture(self, i_s); - if not(tex) + if (!tex) break; // this is beyond the last one if(tex == "textures/common/trigger" || tex == "trigger") continue; -- 2.39.2