Merge remote-tracking branch 'origin/samual/serverlist'
authorSamual Lenks <samual@xonotic.org>
Sun, 24 Nov 2013 04:55:13 +0000 (23:55 -0500)
committerSamual Lenks <samual@xonotic.org>
Sun, 24 Nov 2013 04:55:13 +0000 (23:55 -0500)
* origin/samual/serverlist: (63 commits)
  Use new cvar check URL; kill CVAR_POPCON.
  Show recommended servers when categories are disabled too
  Add a compatibility stop date to the update notification info.
  Fix my breaking of emergency pk3's :D
  ARGH, that really was a STUPID bug.
  Make APPEND_STRING behave "sane".
  Some cleanup
  Properly handle the cvars for serverlist categories now
  Support promoted servers in the recommendations
  Switch to new format for updatenotification
  Switch to recommendation mode 3
  Rename "Bookmark" button to "Favorite" button (it's called favorites...)
  Adjustments to category rendering- left align with colon over servername
  Simplify a LOT.
  Refactor item position code. Should be easier to adapt to new category handling.
  ONE BYTE.
  Fix bug in begin handling.
  Bottom align the headings.
  Give the headings 1.5 rows height.
  use a proper binary search
  ...

Conflicts:
qcsrc/menu/xonotic/serverlist.c
qcsrc/menu/xonotic/util.qc

244 files changed:
defaultXonotic.cfg
gamemodes.cfg
gfx/menu/luminos/gametype_arena.tga [deleted file]
gfx/menu/wickedx/gametype_arena.tga [deleted file]
gfx/menu/xaw/gametype_arena.tga [deleted file]
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/announcer.qc
qcsrc/client/autocvars.qh
qcsrc/client/bgmscript.qc
qcsrc/client/command/cl_cmd.qc
qcsrc/client/csqc_constants.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/damage.qc
qcsrc/client/gibs.qc
qcsrc/client/hook.qc
qcsrc/client/hud.qc
qcsrc/client/hud_config.qc
qcsrc/client/laser.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/movetypes.qc
qcsrc/client/particles.qc
qcsrc/client/projectile.qc
qcsrc/client/scoreboard.qc
qcsrc/client/shownames.qc
qcsrc/client/tturrets.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/campaign_file.qc
qcsrc/common/command/generic.qc
qcsrc/common/command/generic.qh
qcsrc/common/command/rpn.qc
qcsrc/common/constants.qh
qcsrc/common/counting.qh
qcsrc/common/csqcmodel_settings.qh
qcsrc/common/deathtypes.qh
qcsrc/common/mapinfo.qc
qcsrc/common/mapinfo.qh
qcsrc/common/net_notice.qc
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/common/teams.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/csqcmodellib/cl_model.qc
qcsrc/csqcmodellib/common.qh
qcsrc/dpdefs/csprogsdefs.qc
qcsrc/dpdefs/dpextensions.qc
qcsrc/dpdefs/menudefs.qc
qcsrc/menu/item/button.c
qcsrc/menu/item/container.c
qcsrc/menu/item/dialog.c
qcsrc/menu/item/inputbox.c
qcsrc/menu/item/inputcontainer.c
qcsrc/menu/item/nexposee.c
qcsrc/menu/item/tab.c
qcsrc/menu/menu.qc
qcsrc/menu/oo/interface.h
qcsrc/menu/xonotic/checkbox.c
qcsrc/menu/xonotic/checkbox_slider_invalid.c
qcsrc/menu/xonotic/checkbox_string.c
qcsrc/menu/xonotic/colorbutton.c
qcsrc/menu/xonotic/colorpicker.c
qcsrc/menu/xonotic/colorpicker_string.c
qcsrc/menu/xonotic/crosshairbutton.c
qcsrc/menu/xonotic/cvarlist.c
qcsrc/menu/xonotic/demolist.c
qcsrc/menu/xonotic/dialog_firstrun.c
qcsrc/menu/xonotic/dialog_hudsetup_exit.c
qcsrc/menu/xonotic/dialog_multiplayer_create.c
qcsrc/menu/xonotic/dialog_multiplayer_demo.c
qcsrc/menu/xonotic/dialog_multiplayer_join_serverinfo.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_crosshair.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hud.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_hudconfirm.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_view.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup_weapons.c
qcsrc/menu/xonotic/dialog_settings_audio.c
qcsrc/menu/xonotic/dialog_settings_effects.c
qcsrc/menu/xonotic/dialog_settings_input.c
qcsrc/menu/xonotic/dialog_settings_misc_cvars.c
qcsrc/menu/xonotic/dialog_settings_user.c
qcsrc/menu/xonotic/dialog_settings_video.c
qcsrc/menu/xonotic/gametypebutton.c
qcsrc/menu/xonotic/gametypelist.c
qcsrc/menu/xonotic/inputbox.c
qcsrc/menu/xonotic/mainwindow.c
qcsrc/menu/xonotic/maplist.c
qcsrc/menu/xonotic/playerlist.c
qcsrc/menu/xonotic/radiobutton.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/menu/xonotic/skinlist.c
qcsrc/menu/xonotic/slider.c
qcsrc/menu/xonotic/slider_decibels.c
qcsrc/menu/xonotic/textslider.c
qcsrc/menu/xonotic/util.qc
qcsrc/menu/xonotic/weaponslist.c
qcsrc/server-testcase/framework.qc
qcsrc/server/accuracy.qc
qcsrc/server/antilag.qc
qcsrc/server/autocvars.qh
qcsrc/server/bot/aim.qc
qcsrc/server/bot/bot.qc
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/havocbot/role_onslaught.qc
qcsrc/server/bot/navigation.qc
qcsrc/server/bot/scripting.qc
qcsrc/server/bot/waypoints.qc
qcsrc/server/campaign.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_impulse.qc
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/command/banning.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/getreplies.qc
qcsrc/server/command/radarmap.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/command/vote.qh
qcsrc/server/csqcprojectile.qc
qcsrc/server/defs.qh
qcsrc/server/ent_cs.qc
qcsrc/server/func_breakable.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_models.qc
qcsrc/server/g_subs.qc
qcsrc/server/g_triggers.qc
qcsrc/server/g_world.qc
qcsrc/server/ipban.qc
qcsrc/server/item_key.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/movelib.qc
qcsrc/server/mutators/base.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/gamemode_arena.qc [deleted file]
qcsrc/server/mutators/gamemode_arena.qh [deleted file]
qcsrc/server/mutators/gamemode_assault.qc
qcsrc/server/mutators/gamemode_ca.qc
qcsrc/server/mutators/gamemode_ctf.qc
qcsrc/server/mutators/gamemode_ctf.qh
qcsrc/server/mutators/gamemode_domination.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/mutators/gamemode_lms.qc
qcsrc/server/mutators/gamemode_nexball.qc
qcsrc/server/mutators/gamemode_onslaught.qc
qcsrc/server/mutators/mutator_bloodloss.qc
qcsrc/server/mutators/mutator_campcheck.qc
qcsrc/server/mutators/mutator_dodging.qc
qcsrc/server/mutators/mutator_melee_only.qc
qcsrc/server/mutators/mutator_midair.qc
qcsrc/server/mutators/mutator_minstagib.qc
qcsrc/server/mutators/mutator_multijump.qc
qcsrc/server/mutators/mutator_nades.qc
qcsrc/server/mutators/mutator_new_toys.qc
qcsrc/server/mutators/mutator_nix.qc
qcsrc/server/mutators/mutator_physical_items.qc
qcsrc/server/mutators/mutator_pinata.qc
qcsrc/server/mutators/mutator_random_gravity.qc
qcsrc/server/mutators/mutator_superspec.qc
qcsrc/server/mutators/mutator_touchexplode.qc
qcsrc/server/mutators/mutator_vampire.qc
qcsrc/server/mutators/mutators.qh
qcsrc/server/mutators/sandbox.qc
qcsrc/server/pathlib.qc
qcsrc/server/pathlib/debug.qc
qcsrc/server/pathlib/main.qc
qcsrc/server/pathlib/movenode.qc
qcsrc/server/pathlib/path_waypoint.qc
qcsrc/server/pathlib/utility.qc
qcsrc/server/playerstats.qc
qcsrc/server/portals.qc
qcsrc/server/progs.src
qcsrc/server/race.qc
qcsrc/server/scores.qc
qcsrc/server/scores_rules.qc
qcsrc/server/secret.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_halflife.qc
qcsrc/server/t_items.qc
qcsrc/server/t_jumppads.qc
qcsrc/server/t_plats.qc
qcsrc/server/t_quake3.qc
qcsrc/server/t_swamp.qc
qcsrc/server/t_teleporters.qc
qcsrc/server/target_spawn.qc
qcsrc/server/teamplay.qc
qcsrc/server/tturrets/system/system_aimprocs.qc
qcsrc/server/tturrets/system/system_damage.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/system/system_misc.qc
qcsrc/server/tturrets/units/unit_checkpoint.qc
qcsrc/server/tturrets/units/unit_ewheel.qc
qcsrc/server/tturrets/units/unit_flac.qc
qcsrc/server/tturrets/units/unit_fusionreactor.qc
qcsrc/server/tturrets/units/unit_hellion.qc
qcsrc/server/tturrets/units/unit_hk.qc
qcsrc/server/tturrets/units/unit_machinegun.qc
qcsrc/server/tturrets/units/unit_mlrs.qc
qcsrc/server/tturrets/units/unit_plasma.qc
qcsrc/server/tturrets/units/unit_tessla.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/bumblebee.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/w_common.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_rifle.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/w_uzi.qc
qcsrc/server/waypointsprites.qc
qcsrc/uncrusticracy.sh [new file with mode: 0644]
qcsrc/uncrustify.cfg [new file with mode: 0644]
qcsrc/uncrustify.sh [new file with mode: 0755]
qcsrc/warpzonelib/client.qc
qcsrc/warpzonelib/common.qc
qcsrc/warpzonelib/server.qc
tooltips.db.fr

index 64a542c8636a336c59b6f204759ad841d374ff1e..dd16de9bc6ee4224b900bf576cfc86ff8e5fce20 100644 (file)
@@ -400,7 +400,6 @@ pausable 0
 set g_spawnshieldtime 1 "number of seconds you are invincible after you spawned, this shield is lost after you fire"
 set g_antilag 2        "AntiLag (0 = no AntiLag, 1 = verified client side hit scan, 2 = server side hit scan in the past, 3 = unverified client side hit scan)"
 set g_antilag_nudge 0 "don't touch"
-set g_antilag_bullets 1 "Bullets AntiLag (0 = no AntiLag, 1 = server side hit scan in the past) - DO NOT TOUCH (severely changes weapon balance)"
 set g_shootfromclient 2 "let client decide if it has the gun left or right; if set to 2, center handedness is allowed; see also cl_gunalign"
 set g_shootfromeye 0 "shots are fired from your eye/crosshair; visual gun position can still be influenced by cl_gunalign 1 and 2"
 set g_shootfromcenter 0 "weapon gets moved to the center, shots still come from the barrel of your weapon; visual gun position can still be influenced by cl_gunalign 1 and 2"
@@ -465,6 +464,7 @@ set g_spawn_furthest 1 "this amount of the spawns shall be far away from any pla
 set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
 // respawn delay
 set g_respawn_delay 2 "number of seconds you have to wait before you can respawn again"
+set g_respawn_delay_max 0 "number of seconds you can wait before you're forced to respawn (only effective with g_forced_respawn 1)"
 set g_respawn_waves 0 "respawn in waves (every n seconds), intended to decrease overwhelming base attacks"
 
 // overtime
@@ -1436,7 +1436,7 @@ sv_cullentities_trace 1
 r_cullentities_trace 0
 
 // less "lagging" of other players, but also less PL tolerant... let's try this
-sv_clmovement_inputtimeout 0.04 // more than 1, less than 2 server frames
+sv_clmovement_inputtimeout 0.066 // slightly less than 2 frames, so only one frame can be compensated
 
 // exact gloss looks better, e.g. on g-23
 r_shadow_glossexact 1
index 665fa558490b75fac0e554e8f8badc87cc00e218..feed7488b5c2681d4e78565c600d6cf69a2350e0 100644 (file)
@@ -27,7 +27,6 @@ alias cl_hook_gamestart_tdm
 alias cl_hook_gamestart_dom
 alias cl_hook_gamestart_ctf
 alias cl_hook_gamestart_lms
-alias cl_hook_gamestart_arena
 alias cl_hook_gamestart_ca
 alias cl_hook_gamestart_kh
 alias cl_hook_gamestart_ons
@@ -48,7 +47,6 @@ alias sv_hook_gamestart_tdm
 alias sv_hook_gamestart_dom
 alias sv_hook_gamestart_ctf
 alias sv_hook_gamestart_lms
-alias sv_hook_gamestart_arena
 alias sv_hook_gamestart_ca
 alias sv_hook_gamestart_kh
 alias sv_hook_gamestart_ons
@@ -73,8 +71,6 @@ seta fraglimit_override -1    "Frag limit overriding the mapinfo specified one (use
 seta leadlimit_override -1     "Lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta capturelimit_override -1  "Capture limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta captureleadlimit_override -1      "Capture llead imit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_arena_point_limit -1    "Arena point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
-seta g_arena_point_leadlimit -1        "Arena point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta g_domination_point_limit -1       "Domination point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta g_domination_point_leadlimit -1   "Domination point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 seta g_keyhunt_point_limit -1  "Keyhunt point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
@@ -110,9 +106,6 @@ set g_ka_weapon_stay 0
 set g_kh_respawn_delay 0
 set g_kh_respawn_waves 0
 set g_kh_weapon_stay 0
-set g_arena_respawn_delay 0
-set g_arena_respawn_waves 0
-set g_arena_weapon_stay 0
 set g_ca_respawn_delay 0
 set g_ca_respawn_waves 0
 set g_ca_weapon_stay 0
@@ -136,16 +129,6 @@ set g_ft_respawn_delay 0
 set g_ft_weapon_stay 0
 
 
-// =======
-//  arena
-// =======
-set g_arena 0 "Arena: many one-on-one rounds are played to find the winner"
-set g_arena_maxspawned 2       "maximum number of players to spawn at once (the rest is spectating, waiting for their turn)"
-set g_arena_roundbased 1       "if disabled, the next player will spawn as soon as someone dies"
-set g_arena_round_timelimit 180
-set g_arena_warmup 5   "time, newly spawned players have to prepare themselves in round based matches"
-
-
 // =========
 //  assault
 // =========
@@ -166,7 +149,6 @@ seta g_ca_teams_override 0
 set g_ca_teams 0
 
 
-
 // ==================
 //  capture the flag
 // ==================
diff --git a/gfx/menu/luminos/gametype_arena.tga b/gfx/menu/luminos/gametype_arena.tga
deleted file mode 100644 (file)
index f49fa28..0000000
Binary files a/gfx/menu/luminos/gametype_arena.tga and /dev/null differ
diff --git a/gfx/menu/wickedx/gametype_arena.tga b/gfx/menu/wickedx/gametype_arena.tga
deleted file mode 100644 (file)
index f49fa28..0000000
Binary files a/gfx/menu/wickedx/gametype_arena.tga and /dev/null differ
diff --git a/gfx/menu/xaw/gametype_arena.tga b/gfx/menu/xaw/gametype_arena.tga
deleted file mode 100644 (file)
index ca720bc..0000000
Binary files a/gfx/menu/xaw/gametype_arena.tga and /dev/null differ
index 8e36cc9b549a85873c0ea2ecca3c0bb4ee69eddc..a06eb5e6584e3ac96f48c489b762ee748ce9a127 100644 (file)
@@ -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";
@@ -81,7 +81,7 @@ void CSQC_Init(void)
        //registercommand("hud_configure");
        //registercommand("hud_save");
        //registercommand("menu_action");
-       
+
        ConsoleCommand_macro_init();
 
        registercvar("hud_usecsqc", "1");
@@ -125,13 +125,13 @@ void CSQC_Init(void)
        turrets_precache();
        Tuba_Precache();
        CSQCPlayer_Precache();
-       
+
        if(autocvar_cl_reticle)
        {
                if(autocvar_cl_reticle_item_normal) { precache_pic("gfx/reticle_normal"); }
                if(autocvar_cl_reticle_item_nex) { precache_pic("gfx/reticle_nex"); }
        }
-       
+
        get_mi_min_max_texcoords(1); // try the CLEVER way first
        minimapname = strcat("gfx/", mi_shortname, "_radar.tga");
        shortmapname = mi_shortname;
@@ -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;
                }
@@ -651,7 +651,7 @@ void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
        spn_origin_x = ReadShort();
        spn_origin_y = ReadShort();
        spn_origin_z = ReadShort();
-       
+
        if(is_new)
        {
                self.origin = spn_origin;
@@ -682,7 +682,7 @@ void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
                                }
                        }
                        else { self.cnt = particleeffectnum("spawn_point_neutral"); }
-                       
+
                        self.draw = Spawn_Draw;
                }
        }
@@ -696,7 +696,7 @@ void Ent_ReadSpawnEvent(float is_new)
        // this way the server can disable the sending of
        // spawn origin or such to clients if wanted.
        float entnum = ReadByte();
-       
+
        if(entnum)
        {
                self.origin_x = ReadShort();
@@ -724,7 +724,7 @@ void Ent_ReadSpawnEvent(float is_new)
                        }
                }
        }
-       
+
        // local spawn actions
        if(is_new && (!entnum || (entnum == player_localentnum)))
        {
@@ -737,7 +737,7 @@ void Ent_ReadSpawnEvent(float is_new)
                        button_zoom = FALSE;
                }
        }
-       
+
        //print(sprintf("Ent_ReadSpawnEvent(is_new = %d); origin = %s, entnum = %d, localentnum = %d\n", is_new, vtos(self.origin), entnum, player_localentnum));
 }
 
@@ -822,9 +822,9 @@ void CSQC_Ent_Update(float bIsNewEntity)
                case ENT_CLIENT_GAUNTLET: Ent_ReadHook(bIsNewEntity, ENT_CLIENT_GAUNTLET); break;
                case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
                case ENT_CLIENT_AUXILIARYXHAIR: Net_AuXair2(bIsNewEntity); break;
-               case ENT_CLIENT_TURRET: ent_turret(); break; 
+               case ENT_CLIENT_TURRET: ent_turret(); break;
                case ENT_CLIENT_MODEL: CSQCModel_Read(bIsNewEntity); break;
-               case ENT_CLIENT_ITEM: ItemRead(bIsNewEntity); break;  
+               case ENT_CLIENT_ITEM: ItemRead(bIsNewEntity); break;
                case ENT_CLIENT_BUMBLE_RAYGUN: bumble_raygun_read(bIsNewEntity); break;
                case ENT_CLIENT_SPAWNPOINT: Ent_ReadSpawnPoint(bIsNewEntity); break;
                case ENT_CLIENT_SPAWNEVENT: Ent_ReadSpawnEvent(bIsNewEntity); break;
@@ -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;
index 46920a4174db384323cdbf66f5119b2c1658e468..8c9d59dd91f9a77e421d746a0b8193a8c449fb0f 100644 (file)
@@ -127,8 +127,8 @@ vector GetCurrentFov(float fov)
        else if(autocvar_cl_spawnzoom && zoomin_effect)
        {
                float spawnzoomfactor = bound(1, autocvar_cl_spawnzoom_factor, 16);
-               
-               current_viewzoom += (autocvar_cl_spawnzoom_speed * (spawnzoomfactor - current_viewzoom) * drawframetime); 
+
+               current_viewzoom += (autocvar_cl_spawnzoom_speed * (spawnzoomfactor - current_viewzoom) * drawframetime);
                current_viewzoom = bound(1 / spawnzoomfactor, current_viewzoom, 1);
                if(current_viewzoom == 1) { zoomin_effect = 0; }
        }
@@ -161,7 +161,7 @@ vector GetCurrentFov(float fov)
                setsensitivityscale(pow(current_viewzoom, 1 - zoomsensitivity));
        else
                setsensitivityscale(1);
-               
+
        makevectors(view_angles);
 
        if(autocvar_cl_velocityzoom && autocvar_cl_velocityzoom_type) // _type = 0 disables velocity zoom too
@@ -180,11 +180,11 @@ vector GetCurrentFov(float fov)
                                case 1: default: curspeed = vlen(v); break;
                        }
                }
-               
+
                velocityzoom = bound(0, drawframetime / max(0.000000001, autocvar_cl_velocityzoom_time), 1); // speed at which the zoom adapts to player velocity
                avgspeed = avgspeed * (1 - velocityzoom) + (curspeed / autocvar_cl_velocityzoom_speed) * velocityzoom;
                velocityzoom = exp(float2range11(avgspeed * -autocvar_cl_velocityzoom / 1) * 1);
-               
+
                //print(ftos(avgspeed), " avgspeed, ", ftos(curspeed), " curspeed, ", ftos(velocityzoom), " return\n"); // for debugging
        }
        else
@@ -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;
@@ -797,7 +797,7 @@ void CSQC_UpdateView(float w, float h)
                R_PolygonVertex(autocvar_vid_conheight * '0 1 0', tc_01, rgb, a);
                R_EndPolygon();
        }
-        
+
        // Draw the aiming reticle for weapons that use it
        // reticle_type is changed to the item we are zooming / aiming with, to decide which reticle to use
        // It must be a persisted float for fading out to work properly (you let go of the zoom button for
@@ -810,7 +810,7 @@ void CSQC_UpdateView(float w, float h)
                reticle_type = 1; // normal zoom
        else if((activeweapon == WEP_NEX) && button_attack2)
                reticle_type = 2; // nex zoom
-    
+
        if(reticle_type && autocvar_cl_reticle)
        {
                if(autocvar_cl_reticle_stretch)
@@ -1022,13 +1022,13 @@ void CSQC_UpdateView(float w, float h)
                        old_bluralpha = 0;
                }
 
-               // edge detection postprocess handling done second (used by hud_powerup) 
+               // edge detection postprocess handling done second (used by hud_powerup)
                float sharpen_intensity = 0, strength_finished = getstatf(STAT_STRENGTH_FINISHED), invincible_finished = getstatf(STAT_INVINCIBLE_FINISHED);
                if (strength_finished - time > 0) { sharpen_intensity += (strength_finished - time); }
                if (invincible_finished - time > 0) { sharpen_intensity += (invincible_finished - time); }
-               
+
                sharpen_intensity = bound(0, ((getstati(STAT_HEALTH) > 0) ? sharpen_intensity : 0), 5); // Check to see if player is alive (if not, set 0) - also bound to fade out starting at 5 seconds.
-               
+
                if(autocvar_hud_powerup && sharpen_intensity > 0)
                {
                        if(sharpen_intensity != old_sharpen_intensity) // reduce cvar_set spam as much as possible
@@ -1072,15 +1072,15 @@ void CSQC_UpdateView(float w, float h)
        {
                if(time - hit_time < MAX_TIME_DIFF) // don't play the sound if it's too old.
                        sound(world, CH_INFO, "misc/hit.wav", VOL_BASE, ATTEN_NONE);
-                       
+
                nextsound_hit_time = time + autocvar_cl_hitsound_antispam_time;
        }
        typehit_time = getstatf(STAT_TYPEHIT_TIME);
-       if(typehit_time > nextsound_typehit_time) 
+       if(typehit_time > nextsound_typehit_time)
        {
                if(time - typehit_time < MAX_TIME_DIFF) // don't play the sound if it's too old.
                        sound(world, CH_INFO, "misc/typehit.wav", VOL_BASE, ATTEN_NONE);
-                       
+
                nextsound_typehit_time = time + autocvar_cl_hitsound_antispam_time;
        }
 
@@ -1102,11 +1102,11 @@ void CSQC_UpdateView(float w, float h)
                                CSQC_common_hud();
 
                // crosshair goes VERY LAST
-               if(!scoreboard_active && !camera_active && intermission != 2 && spectatee_status != -1 && hud == HUD_NORMAL) 
+               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;
                        float wcross_alpha, wcross_resolution;
                        wcross_style = autocvar_crosshair;
@@ -1259,12 +1259,12 @@ void CSQC_UpdateView(float w, float h)
                        if(autocvar_crosshair_pickup)
                        {
                                float stat_pickup_time = getstatf(STAT_LAST_PICKUP);
-                               
+
                                if(pickup_crosshair_time < stat_pickup_time)
                                {
                                        if(time - stat_pickup_time < MAX_TIME_DIFF) // don't trigger the animation if it's too old
                                                pickup_crosshair_size = 1;
-                                               
+
                                        pickup_crosshair_time = stat_pickup_time;
                                }
 
@@ -1279,12 +1279,12 @@ void CSQC_UpdateView(float w, float h)
                        if(autocvar_crosshair_hitindication)
                        {
                                vector hitindication_color = ((autocvar_crosshair_color_special == 1) ? stov(autocvar_crosshair_hitindication_per_weapon_color) : stov(autocvar_crosshair_hitindication_color));
-                               
+
                                if(hitindication_crosshair_time < hit_time)
                                {
                                        if(time - hit_time < MAX_TIME_DIFF) // don't trigger the animation if it's too old
                                                hitindication_crosshair_size = 1;
-                                               
+
                                        hitindication_crosshair_time = hit_time;
                                }
 
@@ -1379,12 +1379,12 @@ void CSQC_UpdateView(float w, float h)
                                        // handle the values
                                        if (autocvar_crosshair_ring && activeweapon == WEP_NEX && nex_charge && autocvar_crosshair_ring_nex) // ring around crosshair representing velocity-dependent damage for the nex
                                        {
-                                               if (nex_chargepool || use_nex_chargepool) { 
-                                                       use_nex_chargepool = 1; 
+                                               if (nex_chargepool || use_nex_chargepool) {
+                                                       use_nex_chargepool = 1;
                                                        ring_inner_value = nex_chargepool;
-                                               } else { 
+                                               } else {
                                                        nex_charge_movingavg = (1 - autocvar_crosshair_ring_nex_currentcharge_movingavg_rate) * nex_charge_movingavg + autocvar_crosshair_ring_nex_currentcharge_movingavg_rate * nex_charge;
-                                                       ring_inner_value = bound(0, autocvar_crosshair_ring_nex_currentcharge_scale * (nex_charge - nex_charge_movingavg), 1); 
+                                                       ring_inner_value = bound(0, autocvar_crosshair_ring_nex_currentcharge_scale * (nex_charge - nex_charge_movingavg), 1);
                                                }
 
                                                ring_inner_alpha = autocvar_crosshair_ring_nex_inner_alpha;
@@ -1397,7 +1397,7 @@ void CSQC_UpdateView(float w, float h)
                                                ring_rgb = wcross_color;
                                                ring_image = "gfx/crosshair_ring_nexgun.tga";
                                        }
-                                       else if (autocvar_crosshair_ring && activeweapon == WEP_MINE_LAYER && minelayer_maxmines && autocvar_crosshair_ring_minelayer) 
+                                       else if (autocvar_crosshair_ring && activeweapon == WEP_MINE_LAYER && minelayer_maxmines && autocvar_crosshair_ring_minelayer)
                                        {
                                                ring_value = bound(0, getstati(STAT_LAYED_MINES) / minelayer_maxmines, 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
                                                ring_alpha = autocvar_crosshair_ring_minelayer_alpha;
@@ -1412,7 +1412,7 @@ void CSQC_UpdateView(float w, float h)
                                                ring_image = "gfx/crosshair_ring.tga";
                                        }
 
-                                       if(autocvar_crosshair_ring_reload && weapon_clipsize) // forces there to be only an ammo ring 
+                                       if(autocvar_crosshair_ring_reload && weapon_clipsize) // forces there to be only an ammo ring
                                        {
                                                ring_value = bound(0, weapon_clipload / weapon_clipsize, 1);
                                                ring_scale = autocvar_crosshair_ring_reload_size;
@@ -1431,11 +1431,11 @@ 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);
                                                }
-                                               
+
                                                if(wcross_ring_prev)
                                                {
                                                        if(f < 1)
@@ -1497,10 +1497,10 @@ void CSQC_UpdateView(float w, float h)
                                {
                                        vector wcross_color_old;
                                        wcross_color_old = wcross_color;
-                                       
+
                                        if((autocvar_crosshair_dot_color_custom) && (autocvar_crosshair_dot_color != "0"))
                                                wcross_color = stov(autocvar_crosshair_dot_color);
-                                               
+
                                        CROSSHAIR_DRAW(wcross_resolution * autocvar_crosshair_dot_size, "gfx/crosshairdot.tga", f * autocvar_crosshair_dot_alpha);
                                        // FIXME why don't we use wcross_alpha here?cl_notice_run();
                                        wcross_color = wcross_color_old;
@@ -1564,9 +1564,9 @@ void CSQC_UpdateView(float w, float h)
 
        if(autocvar__hud_configure)
                HUD_Panel_Mouse();
-    
+
     if(hud && !intermission)
-    {        
+    {
         if(hud == HUD_SPIDERBOT)
             CSQC_SPIDER_HUD();
         else if(hud == HUD_WAKIZASHI)
@@ -1578,9 +1578,9 @@ void CSQC_UpdateView(float w, float h)
         else if(hud == HUD_BUMBLEBEE_GUN)
             CSQC_BUMBLE_GUN_HUD();
     }
-       
+
        cl_notice_run();
-       
+
        // let's reset the view back to normal for the end
        setproperty(VF_MIN, '0 0 0');
        setproperty(VF_SIZE, '1 0 0' * w + '0 1 0' * h);
index b53c04da052b048a233054639cbf659480d3cc34..35077496911a9ea8f8f56664068d3cd06437e3f0 100644 (file)
@@ -1,6 +1,6 @@
 float announcer_1min;
 float announcer_5min;
-void Announcer_Countdown() 
+void Announcer_Countdown()
 {
        float starttime = getstatf(STAT_GAMESTARTTIME);
        float roundstarttime = getstatf(STAT_ROUNDSTARTTIME);
@@ -20,8 +20,8 @@ void Announcer_Countdown()
 
        if(countdown <= 0) // countdown has finished, starttime is now
        {
-               Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_BEGIN); 
-               Local_Notification(MSG_MULTI, MULTI_COUNTDOWN_BEGIN); 
+               Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_BEGIN);
+               Local_Notification(MSG_MULTI, MULTI_COUNTDOWN_BEGIN);
                remove(self);
                return;
        }
@@ -50,22 +50,22 @@ void Announcer_Countdown()
  * and STAT_FRAGLIMIT to be auto-sent)
  */
  float previous_game_starttime;
-void Announcer_Gamestart() 
+void Announcer_Gamestart()
 {
        float startTime = getstatf(STAT_GAMESTARTTIME);
        float roundstarttime = getstatf(STAT_ROUNDSTARTTIME);
        if(roundstarttime > startTime)
                startTime = roundstarttime;
 
-       if(previous_game_starttime != startTime) 
+       if(previous_game_starttime != startTime)
        {
                if((time + 5.0) < startTime) // if connecting to server while restart was active don't always play prepareforbattle
                        Local_Notification(MSG_ANNCE, ANNCE_PREPARE);
 
-               if(time < startTime) 
+               if(time < startTime)
                {
                        entity e = find(world, classname, "announcer_countdown");
-                       if not(e)
+                       if (!e)
                        {
                                e = spawn();
                                e.classname = "announcer_countdown";
@@ -74,39 +74,39 @@ void Announcer_Gamestart()
                        e.nextthink = startTime - floor(startTime - time); //synchronize nextthink to startTime
                }
        }
-       
+
        previous_game_starttime = startTime;
 }
 
 
 // Plays the 1 minute or 5 minutes (of maptime) remaining sound, if client wants it
-void Announcer_Time() 
+void Announcer_Time()
 {
        float timelimit = getstatf(STAT_TIMELIMIT);
        float timeleft = max(0, timelimit * 60 + getstatf(STAT_GAMESTARTTIME) - time);
        float warmup_timeleft = 0;
-       
-       if(warmup_stage) 
+
+       if(warmup_stage)
                if(autocvar_g_warmup_limit > 0)
-                       warmup_timeleft = max(0, autocvar_g_warmup_limit + getstatf(STAT_GAMESTARTTIME) - time); 
+                       warmup_timeleft = max(0, autocvar_g_warmup_limit + getstatf(STAT_GAMESTARTTIME) - time);
 
        // 5 minute check
-       if(autocvar_cl_announcer_maptime >= 2) 
+       if(autocvar_cl_announcer_maptime >= 2)
        {
                // make sure that after connect (and e.g. 4 minutes left) we will not get a wrong sound
                if(announcer_5min)
                {
-                       if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timeleft > 300) 
+                       if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timeleft > 300)
                                || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft > 300))
                                        announcer_5min = FALSE;
                }
-               else 
+               else
                {
-                       if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timelimit > 0 && timeleft < 300 && timeleft > 299) 
+                       if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timelimit > 0 && timeleft < 300 && timeleft > 299)
                                || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft < 300 && warmup_timeleft > 299))
                        {
                                //if we're in warmup mode, check whether there's a warmup timelimit
-                               if not(autocvar_g_warmup_limit == -1 && warmup_stage) 
+                               if(!(autocvar_g_warmup_limit == -1 && warmup_stage))
                                {
                                        announcer_5min = TRUE;
                                        Local_Notification(MSG_ANNCE, ANNCE_REMAINING_MIN_5);
@@ -120,15 +120,15 @@ void Announcer_Time()
        {
                if (announcer_1min)
                {
-                       if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timeleft > 60) 
+                       if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timeleft > 60)
                                || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft > 60))
                                        announcer_1min = FALSE;
                }
-               else if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timelimit > 0 && timeleft < 60) 
+               else if(((!warmup_stage || autocvar_g_warmup_limit == 0) && timelimit > 0 && timeleft < 60)
                        || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft < 60))
                {
                        // if we're in warmup mode, check whether there's a warmup timelimit
-                       if not(autocvar_g_warmup_limit == -1 && warmup_stage) 
+                       if(!(autocvar_g_warmup_limit == -1 && warmup_stage))
                        {
                                announcer_1min = TRUE;
                                Local_Notification(MSG_ANNCE, ANNCE_REMAINING_MIN_1);
index 8175695abb0ac5ef0a4c033e671a742a907776fb..403792020ac7c7e08aa6a412f15abd5e98cffa9b 100644 (file)
@@ -337,7 +337,7 @@ float autocvar_hud_panel_weapons_timeout;
 float autocvar_hud_panel_weapons_timeout_effect;
 float autocvar_hud_panel_weapons_timeout_fadebgmin;
 float autocvar_hud_panel_weapons_timeout_fadefgmin;
-var float autocvar_hud_panel_weapons_timeout_speed_in = 0.25; 
+var float autocvar_hud_panel_weapons_timeout_speed_in = 0.25;
 var float autocvar_hud_panel_weapons_timeout_speed_out = 0.75;
 float autocvar_hud_progressbar_alpha;
 float autocvar_hud_showbinds;
index 694bc0cc6f960169a3f61628b8541b482c5151ca..fda38b125c6cc5780458ded23b7761e027400ba8 100644 (file)
@@ -17,10 +17,10 @@ float GetAttackDecaySustainAmplitude(float a, float d, float s, float t)
        //   attack: from 0 to 1, in time a for a full length
        //   decay: from 1 to s, in time d
        //   sustain: s
-       
+
        if(t < 0)
                return 0;
-       
+
        if(a)
                if(t <= a)
                        return t / a;
@@ -38,10 +38,10 @@ float GetReleaseAmplitude(float d, float s, float r, float t)
 
        if(!r)
                return 0;
-       
+
        if(t > r)
                return 0;
-       
+
        releaseval = s * (1 - t / r);
 
        if(t < -d)
@@ -70,7 +70,7 @@ float GetReleaseTime(float d, float s, float r, float amp)
 
        if(!s)
                return 0;
-       
+
        // if amp > s, we may be in the attack or in the prolonged decay curve
        releasetime = (1 - amp / s) * r;
 
@@ -172,7 +172,7 @@ float BGMScript(entity e)
 
        if(e.bgmscript == "")
                return 1;
-       
+
        if(autocvar_bgmvolume <= 0)
                return -1;
 
index cbf294fa8a2f6598851d29f1f098dad3e121d524..9aae77dde687ef5417a61b71ae29b4524365e963 100644 (file)
@@ -37,9 +37,9 @@ void LocalCommand_blurtest(float request)
                        blurtest_radius = stof(argv(2));
                        blurtest_power = stof(argv(3));
                        print("Enabled blurtest\n");
-                       return; 
+                       return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -117,7 +117,7 @@ void LocalCommand_create_scrshot_ent(float request)
                        float fh;
                        string filename = strcat(MapInfo_Map_bspname, "_scrshot_ent.txt");
                        fh = fopen(filename, FILE_WRITE);
-                       
+
                        if(fh >= 0)
                        {
                                fputs(fh, "{\n");
@@ -125,9 +125,9 @@ void LocalCommand_create_scrshot_ent(float request)
                                fputs(fh, strcat("\"origin\" \"", strcat(ftos(view_origin_x), " ", ftos(view_origin_y), " ", ftos(view_origin_z)), "\"\n"));
                                fputs(fh, strcat("\"angles\" \"", strcat(ftos(view_angles_x), " ", ftos(view_angles_y), " ", ftos(view_angles_z)), "\"\n"));
                                fputs(fh, "}\n");
-                               
+
                                print("Completed screenshot entity dump in ^2data/data/", MapInfo_Map_bspname, "_scrshot_ent.txt^7.\n");
-                               
+
                                fclose(fh);
                        }
                        else
@@ -136,7 +136,7 @@ void LocalCommand_create_scrshot_ent(float request)
                        }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -155,7 +155,7 @@ void LocalCommand_debugmodel(float request, float argc)
                {
                        string modelname = argv(1);
                        entity debugmodel_entity;
-                       
+
                        debugmodel_entity = spawn();
                        precache_model(modelname);
                        setmodel(debugmodel_entity, modelname);
@@ -163,10 +163,10 @@ void LocalCommand_debugmodel(float request, float argc)
                        debugmodel_entity.angles = view_angles;
                        debugmodel_entity.draw = DrawDebugModel;
                        debugmodel_entity.classname = "debugmodel";
-                       
-                       return; 
+
+                       return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -185,18 +185,18 @@ void LocalCommand_handlevote(float request, float argc)
                {
                        float vote_selection;
                        string vote_string;
-                       
+
                        if(InterpretBoolean(argv(1)))
                        {
-                               vote_selection = 2; 
+                               vote_selection = 2;
                                vote_string = "yes";
                        }
                        else
                        {
-                               vote_selection = 1; 
-                               vote_string = "no"; 
+                               vote_selection = 1;
+                               vote_string = "no";
                        }
-                       
+
                        if(vote_selection)
                        {
                                if(uid2name_dialog) // handled by "uid2name" option
@@ -208,11 +208,11 @@ void LocalCommand_handlevote(float request, float argc)
                                        uid2name_dialog = 0;
                                }
                                else { localcmd(strcat("cmd vote ", vote_string, "\n")); }
-                               
+
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2handlevote^7\n");
                case CMD_REQUEST_USAGE:
@@ -237,7 +237,7 @@ void LocalCommand_hud(float request, float argc)
                                        cvar_set("_hud_configure", ftos(!autocvar__hud_configure));
                                        return;
                                }
-                               
+
                                case "save":
                                {
                                        if(argv(2))
@@ -250,10 +250,10 @@ void LocalCommand_hud(float request, float argc)
                                                break; // go to usage, we're missing the paramater needed here.
                                        }
                                }
-                               
+
                                case "scoreboard_columns_set":
                                {
-                                       Cmd_HUD_SetFields(argc); 
+                                       Cmd_HUD_SetFields(argc);
                                        return;
                                }
 
@@ -262,7 +262,7 @@ void LocalCommand_hud(float request, float argc)
                                        Cmd_HUD_Help();
                                        return;
                                }
-                               
+
                                case "radar":
                                {
                                        if(argv(2))
@@ -273,7 +273,7 @@ void LocalCommand_hud(float request, float argc)
                                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2hud^7\n");
                case CMD_REQUEST_USAGE:
@@ -298,10 +298,10 @@ void LocalCommand_localprint(float request, float argc)
                        if(argv(1))
                        {
                                centerprint_hud(argv(1));
-                               return; 
+                               return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2localprint^7\n");
                case CMD_REQUEST_USAGE:
@@ -322,10 +322,10 @@ void LocalCommand_mv_download(float request, float argc)
                        if(argv(1))
                        {
                                Cmd_MapVote_MapDownload(argc);
-                               return; 
+                               return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2mv_download^7\n");
                case CMD_REQUEST_USAGE:
@@ -348,18 +348,18 @@ void LocalCommand_sendcvar(float request, float argc)
                                // W_FixWeaponOrder will trash argv, so save what we need.
                                string thiscvar = strzone(argv(1));
                                string s = cvar_string(thiscvar);
-                               
+
                                if(thiscvar == "cl_weaponpriority")
                                        s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 1);
                                else if(substring(thiscvar, 0, 17) == "cl_weaponpriority" && strlen(thiscvar) == 18)
                                        s = W_FixWeaponOrder(W_NumberWeaponOrder(s), 0);
-                                       
+
                                localcmd("cmd sentcvar ", thiscvar, " \"", s, "\"\n");
                                strunzone(thiscvar);
-                               return; 
+                               return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2sendcvar^7\n");
                case CMD_REQUEST_USAGE:
@@ -379,10 +379,10 @@ void LocalCommand_(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       
-                       return; 
+
+                       return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -411,15 +411,15 @@ void LocalCommand_(float request)
        CLIENT_COMMAND("mv_download", LocalCommand_mv_download(request, arguments), "Retrieve mapshot picture from the server") \
        CLIENT_COMMAND("sendcvar", LocalCommand_sendcvar(request, arguments), "Send a cvar to the server (like weaponpriority)") \
        /* nothing */
-       
+
 void LocalCommand_macro_help()
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(strtolower(description) != "") { print("  ^2", name, "^7: ", description, "\n"); } }
-               
+
        CLIENT_COMMANDS(0, 0)
        #undef CLIENT_COMMAND
-       
+
        return;
 }
 
@@ -427,10 +427,10 @@ float LocalCommand_macro_command(float argc)
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
-               
+
        CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc)
        #undef CLIENT_COMMAND
-       
+
        return FALSE;
 }
 
@@ -438,10 +438,10 @@ float LocalCommand_macro_usage(float argc)
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
-               
+
        CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc)
        #undef CLIENT_COMMAND
-       
+
        return FALSE;
 }
 
@@ -449,10 +449,10 @@ void LocalCommand_macro_write_aliases(float fh)
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(strtolower(description) != "") { CMD_Write_Alias("qc_cmd_cl", name, description); } }
-               
+
        CLIENT_COMMANDS(0, 0)
        #undef CLIENT_COMMAND
-       
+
        return;
 }
 
@@ -468,24 +468,24 @@ void GameCommand(string command)
 
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
-       // argv:   0    - 1      - 2     - 3 
+       // argv:   0    - 1      - 2     - 3
        // cmd     vote - master - login - password
 
-       if(strtolower(argv(0)) == "help") 
+       if(strtolower(argv(0)) == "help")
        {
-               if(argc == 1) 
+               if(argc == 1)
                {
                        print("\nClient console commands:\n");
                        LocalCommand_macro_help();
 
                        print("\nGeneric commands shared by all programs:\n");
                        GenericCommand_macro_help();
-                       
+
                        print("\nUsage:^3 cl_cmd COMMAND...^7, where possible commands are listed above.\n");
                        print("For help about a specific command, type cl_cmd help COMMAND\n");
-                       
+
                        return;
-               } 
+               }
                else if(GenericCommand_macro_usage(argc)) // Instead of trying to call a command, we're going to see detailed information about it
                {
                        return;
@@ -494,8 +494,8 @@ void GameCommand(string command)
                {
                        return;
                }
-       } 
-       else if(GenericCommand(command)) 
+       }
+       else if(GenericCommand(command))
        {
                return; // handled by common/command/generic.qc
        }
@@ -503,10 +503,10 @@ void GameCommand(string command)
        {
                return; // handled by one of the above LocalCommand_* functions
        }
-       
+
        // nothing above caught the command, must be invalid
        print(((command != "") ? strcat("Unknown client command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try cl_cmd help.\n");
-       
+
        return;
 }
 
@@ -523,7 +523,7 @@ void GameCommand(string command)
        CONSOLE_COMMAND("+showaccuracy", { scoreboard_showaccuracy = TRUE; }) \
        CONSOLE_COMMAND("-showaccuracy", { scoreboard_showaccuracy = FALSE; }) \
        /* nothing */
-       
+
 #define CONSOLE_COMMANDS_MOVEMENT \
        CONSOLE_COMMAND("+forward", { ++camera_direction_x; }) \
        CONSOLE_COMMAND("-forward", { --camera_direction_x; }) \
@@ -551,7 +551,7 @@ void ConsoleCommand_macro_init()
 
        CONSOLE_COMMANDS_NORMAL
        #undef CONSOLE_COMMAND
-       
+
        // then init movement commands
        #ifndef CAMERATEST
        if(isdemo())
@@ -565,7 +565,7 @@ void ConsoleCommand_macro_init()
        #ifndef CAMERATEST
        }
        #endif
-       
+
        return;
 }
 
@@ -573,10 +573,10 @@ float ConsoleCommand_macro_normal(float argc)
 {
        #define CONSOLE_COMMAND(name,execution) \
                { if(name == strtolower(argv(0))) { { execution } return TRUE; } }
-               
+
        CONSOLE_COMMANDS_NORMAL
        #undef CONSOLE_COMMAND
-       
+
        return FALSE;
 }
 
@@ -590,7 +590,7 @@ float ConsoleCommand_macro_movement(float argc)
                CONSOLE_COMMANDS_MOVEMENT
                #undef CONSOLE_COMMAND
        }
-       
+
        return FALSE;
 }
 
@@ -612,7 +612,7 @@ float CSQC_ConsoleCommand(string command)
        {
                return TRUE;
        }
-       
+
        // Return value should be 1 if CSQC handled the command, otherwise return 0 to have the engine handle it.
 
        return FALSE;
index 0016196bac4f615bb0df44c5893d771ec95f0d49..3889603aa8867679a4ba23cc4cf6d69150664f6e 100644 (file)
@@ -39,7 +39,7 @@ const float           VF_PERSPECTIVE                                  = 200;  //(float)
 const float            VF_CL_VIEWANGLES                                = 33;   //(vector)
 const float            VF_CL_VIEWANGLES_X                              = 34;   //(float)
 const float            VF_CL_VIEWANGLES_Y                              = 35;   //(float)
-const float            VF_CL_VIEWANGLES_Z                              = 36;   //(float) 
+const float            VF_CL_VIEWANGLES_Z                              = 36;   //(float)
 
 // Server Autosent Stat Constants
 const float            STAT_HEALTH                                             = 0;
index 3837ed4c97b50823be3f604172221766a4c79cbb..848c632773404b03f3e2b2f5cdea611483e78a17 100644 (file)
@@ -93,7 +93,7 @@ string forceplayermodels_goodmodel;
 float forceplayermodels_goodmodelindex;
 
 .vector glowmod;
-.vector old_glowmod; 
+.vector old_glowmod;
 
 void CSQCPlayer_ModelAppearance_PreUpdate(void)
 {
@@ -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();
@@ -283,7 +283,7 @@ void CSQCPlayer_ModelAppearance_Apply(float islocalplayer)
                        // Fade out to black now...
                        if(self.old_glowmod == '0 0 0') { self.old_glowmod = self.glowmod; }
                        self.colormap = 0;
-                       
+
                        self.glowmod = self.old_glowmod * bound(0, 1 - (time - self.death_time) / autocvar_cl_deathglow, 1);
                        self.glowmod_x = max(self.glowmod_x, 0.0001);
                        self.glowmod_y = max(self.glowmod_y, 0.0001);
@@ -493,7 +493,7 @@ void CSQCModel_Effects_Apply(void)
        self.renderflags &= ~(RF_DEPTHHACK | RF_ADDITIVE | RF_FULLBRIGHT | EF_NOSHADOW | RF_USEAXIS);
        self.effects = 0;
        self.traileffect = 0;
-                       
+
        if(eff & EF_BRIGHTFIELD)
                self.traileffect = particleeffectnum("TR_NEXUIZPLASMA");
        // ignoring EF_MUZZLEFLASH
index cd7ac7bfa468a1e8422ddb7c131bc9784a0e6436..cc3653db4d2deb21a79aaa188112f83b7e3ae6ec 100644 (file)
@@ -85,7 +85,7 @@ void DamageEffect(vector hitorg, float dmg, float type, float specnum)
        e = get_weaponinfo(type);
 
        effectname = strcat("damage_", e.netname);
-       
+
        // if damage was dealt with a bullet weapon, our effect is blood
        // since blood is species dependent, include the species tag
        if(type == WEP_SHOTGUN || type == WEP_UZI || type == WEP_RIFLE)
@@ -133,7 +133,7 @@ void Ent_DamageInfo(float isNew)
        force = decompressShortVector(ReadShort());
        species = ReadByte();
 
-       if not(isNew)
+       if (!isNew)
                return;
 
        if(rad < 0)
@@ -143,7 +143,7 @@ void Ent_DamageInfo(float isNew)
        }
        else
                forcemul = 1;
-       
+
        for(self = findradius(w_org, rad + MAX_DAMAGEEXTRARADIUS); self; self = self.chain)
        {
                // attached ents suck
@@ -198,7 +198,7 @@ void Ent_DamageInfo(float isNew)
        }
 
        self = oldself;
-       
+
        if(DEATH_ISVEHICLE(w_deathtype))
        {
                traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
@@ -206,14 +206,14 @@ void Ent_DamageInfo(float isNew)
                        w_backoff = trace_plane_normal;
                else
                        w_backoff = -1 * normalize(w_org - (w_org + normalize(force) * 16));
-               
+
                setorigin(self, w_org + w_backoff * 2); // for sound() calls
-               
+
                switch(w_deathtype)
                {
                        case DEATH_VH_CRUSH:
                                break;
-                               
+
                        // spiderbot
                        case DEATH_VH_SPID_MINIGUN:
                                string _snd;
@@ -229,7 +229,7 @@ void Ent_DamageInfo(float isNew)
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_MIN);
                                pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                                break;
-            
+
                        case DEATH_VH_WAKI_GUN:
                                sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTEN_NORM);
                                pointparticles(particleeffectnum("wakizashi_gun_impact"), self.origin, w_backoff * 1000, 1);
@@ -242,7 +242,7 @@ void Ent_DamageInfo(float isNew)
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_MIN);
                                pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                                break;
-                               
+
                        case DEATH_VH_RAPT_CANNON:
                                sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTEN_NORM);
                                pointparticles(particleeffectnum("raptor_cannon_impact"), self.origin, w_backoff * 1000, 1);
@@ -273,8 +273,8 @@ void Ent_DamageInfo(float isNew)
                                break;
                }
        }
-       
-       
+
+
        if(DEATH_ISTURRET(w_deathtype))
        {
                string _snd;
@@ -283,22 +283,22 @@ void Ent_DamageInfo(float isNew)
                        w_backoff = trace_plane_normal;
                else
                        w_backoff = -1 * normalize(w_org - (w_org + normalize(force) * 16));
-               
+
                setorigin(self, w_org + w_backoff * 2); // for sound() calls
-               
+
                switch(w_deathtype)
-               {   
+               {
                         case DEATH_TURRET_EWHEEL:
                                sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTEN_MIN);
                                pointparticles(particleeffectnum("laser_impact"), self.origin, w_backoff * 1000, 1);
                                break;
-                        
+
                         case DEATH_TURRET_FLAC:
                                pointparticles(particleeffectnum("hagar_explode"), w_org, '0 0 0', 1);
                                _snd = strcat("weapons/hagexp", ftos(1 + rint(random() * 2)), ".waw");
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
                                break;
-                               
+
                         case DEATH_TURRET_MLRS:
                         case DEATH_TURRET_HK:
                         case DEATH_TURRET_WALK_ROCKET:
@@ -306,19 +306,19 @@ void Ent_DamageInfo(float isNew)
                                sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_MIN);
                                pointparticles(particleeffectnum("rocket_explode"), self.origin, w_backoff * 1000, 1);
                                break;
-                        
+
                         case DEATH_TURRET_MACHINEGUN:
                         case DEATH_TURRET_WALK_GUN:
                                _snd = strcat("weapons/ric", ftos(1 + rint(random() * 2)), ".waw");
                                sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
                                pointparticles(particleeffectnum("machinegun_impact"), self.origin, w_backoff * 1000, 1);
                                break;
-                                                 
+
                         case DEATH_TURRET_PLASMA:
                                sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_MIN);
                                pointparticles(particleeffectnum("electro_impact"), self.origin, w_backoff * 1000, 1);
                                break;
-                                                 
+
                         case DEATH_TURRET_WALK_MEELE:
                                sound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTEN_MIN);
                                pointparticles(particleeffectnum("TE_SPARK"), self.origin, w_backoff * 1000, 1);
@@ -326,17 +326,17 @@ void Ent_DamageInfo(float isNew)
 
                         case DEATH_TURRET_PHASER:
                                break;
-                               
+
                         case DEATH_TURRET_TESLA:
                                te_smallflash(self.origin);
                                break;
 
                }
        }
-       
+
        // TODO spawn particle effects and sounds based on w_deathtype
        if(!DEATH_ISSPECIAL(w_deathtype))
-       if not(hitplayer && !rad) // don't show ground impacts for hitscan weapons if a player was hit
+       if(!hitplayer || rad) // don't show ground impacts for hitscan weapons if a player was hit
        {
                float hitwep;
 
index afd61edab20461e3c61d67efcb0d819ccf4e6f89..835d14a1ee6f3b6d9336ae96ffdbef27ac6c6cc6 100644 (file)
@@ -176,7 +176,7 @@ void Ent_GibSplash(float isNew)
        {
                if(cl_gentle_gibs == 2)
                        gentle_prefix = "";
-               else if(cl_gentle_gibs == 3) 
+               else if(cl_gentle_gibs == 3)
                        gentle_prefix = "happy_";
        }
        else if(autocvar_cl_particlegibs)
@@ -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)
index ab489153011cb2303905e28d04f3ce16d90be8ee..196730a72dde016cbe3fd28308955ed2c2de6ee1 100644 (file)
@@ -8,7 +8,7 @@ void Draw_CylindricLine(vector from, vector to, float thickness, string texture,
 {
        // I want to draw a quad...
        // from and to are MIDPOINTS.
-       
+
        vector axis, thickdir, A, B, C, D;
        float length_tex;
 
index 398078acecb09fb751a34d6006a7019da26ee3f2..a78177b1991c5783e5e9b185cc5225d6a0d447d3 100644 (file)
@@ -142,16 +142,16 @@ float stringwidth_nocolors(string s, vector theSize)
        return stringwidth(s, FALSE, theSize);
 }
 
-void drawstringright(vector position, string text, vector scale, vector rgb, float theAlpha, float flag)
+void drawstringright(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag)
 {
-       position_x -= 2 / 3 * strlen(text) * scale_x;
-       drawstring(position, text, scale, rgb, theAlpha, flag);
+       position_x -= 2 / 3 * strlen(text) * theScale_x;
+       drawstring(position, text, theScale, rgb, theAlpha, flag);
 }
 
-void drawstringcenter(vector position, string text, vector scale, vector rgb, float theAlpha, float flag)
+void drawstringcenter(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag)
 {
-       position_x = 0.5 * (vid_conwidth - 0.6025 * strlen(text) * scale_x);
-       drawstring(position, text, scale, rgb, theAlpha, flag);
+       position_x = 0.5 * (vid_conwidth - 0.6025 * strlen(text) * theScale_x);
+       drawstring(position, text, theScale, rgb, theAlpha, flag);
 }
 
 // return the string of the onscreen race timer
@@ -242,7 +242,7 @@ float GetPlayerColorForce(float i)
 
 float GetPlayerColor(float i)
 {
-       if not(playerslots[i].gotscores) // unconnected
+       if(!playerslots[i].gotscores) // unconnected
                return NUM_SPECTATOR;
        else if(stof(getplayerkeyvalue(i, "frags")) == FRAGS_SPECTATOR)
                return NUM_SPECTATOR;
@@ -734,12 +734,12 @@ 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
-               weapon_pos = (panel_pos 
-                       + eX * column * weapon_size_x 
+               weapon_pos = (panel_pos
+                       + eX * column * weapon_size_x
                        + eY * row * weapon_size_y);
 
                // draw background behind currently selected weapon
@@ -1133,7 +1133,7 @@ void HUD_Powerups(void)
        {
                if(!autocvar_hud_panel_powerups) return;
                if(spectatee_status == -1) return;
-               if not(getstati(STAT_ITEMS, 0, 24) & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON)) return;
+               if(!(getstati(STAT_ITEMS, 0, 24) & (IT_STRENGTH | IT_INVINCIBLE | IT_SUPERWEAPON))) return;
                if (getstati(STAT_HEALTH) <= 0) return;
 
                strength_time = bound(0, getstatf(STAT_STRENGTH_FINISHED) - time, 99);
@@ -1543,7 +1543,7 @@ void HUD_HealthArmor(void)
                                        {
                                                float BLINK_FACTOR = 0.15;
                                                float BLINK_BASE = 0.85;
-                                               float BLINK_FREQ = 9; 
+                                               float BLINK_FREQ = 9;
                                                pain_health_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
                                        }
                                }
@@ -1664,7 +1664,7 @@ void HUD_Notify(void)
        float entries, height;
        entries = bound(1, floor(KN_MAX_ENTRIES * mySize_y/mySize_x), KN_MAX_ENTRIES);
        height = mySize_y/entries;
-       
+
        vector fontsize;
        float fontheight = height * autocvar_hud_panel_notify_fontsize;
        fontsize = '0.5 0.5 0' * fontheight;
@@ -1726,7 +1726,7 @@ void HUD_Notify(void)
                        {
                                break;
                        }
-                       
+
                        attacker = notify_attackers[j];
                        victim = notify_victims[j];
                        icon = notify_icon[j];
@@ -1865,10 +1865,10 @@ void HUD_Radar(void)
                panel_size_y = bound(0.2, panel_size_y, 1) * vid_conheight;
                panel_pos_x = (vid_conwidth - panel_size_x) / 2;
                panel_pos_y = (vid_conheight - panel_size_y) / 2;
-               
+
                panel_bg = strcat(hud_skin_path, "/border_default"); // always use the default border when maximized
                if(precache_pic(panel_bg) == "") { panel_bg = "gfx/hud/default/border_default"; } // fallback
-               
+
                switch(hud_panel_radar_maximized_zoommode)
                {
                        default:
@@ -1885,7 +1885,7 @@ void HUD_Radar(void)
                                f = 1;
                                break;
                }
-               
+
                switch(hud_panel_radar_maximized_rotation)
                {
                        case 0:
@@ -1914,7 +1914,7 @@ void HUD_Radar(void)
                                f = 1;
                                break;
                }
-               
+
                switch(hud_panel_radar_rotation)
                {
                        case 0:
@@ -2297,7 +2297,7 @@ void HUD_Score(void)
                        score = tm.(teamscores[ts_primary]);
                        if(autocvar__hud_configure)
                                score = 123;
-                       
+
                        if (score > max_fragcount)
                                max_fragcount = score;
 
@@ -2752,7 +2752,7 @@ void HUD_Mod_CTF(vector pos, vector mySize)
        stat_items = getstati(STAT_ITEMS, 0, 24);
        redflag = (stat_items/IT_RED_FLAG_TAKEN) & 3;
        blueflag = (stat_items/IT_BLUE_FLAG_TAKEN) & 3;
-       
+
        if(redflag || blueflag)
                mod_active = 1;
        else
@@ -3029,29 +3029,29 @@ void HUD_Mod_KH(vector pos, vector mySize)
 float kaball_prevstatus; // last remembered status
 float kaball_statuschange_time; // time when the status changed
 
-// we don't need to reset for keepaway since it immediately 
+// we don't need to reset for keepaway since it immediately
 // autocorrects prevstatus as to if the player has the ball or not
 
 void HUD_Mod_Keepaway(vector pos, vector mySize)
 {
        mod_active = 1; // keepaway should always show the mod HUD
-       
+
        float BLINK_FACTOR = 0.15;
        float BLINK_BASE = 0.85;
-       float BLINK_FREQ = 5; 
+       float BLINK_FREQ = 5;
        float kaball_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
-       
+
        float stat_items = getstati(STAT_ITEMS, 0, 24);
        float kaball = (stat_items/IT_KEY1) & 1;
-       
+
        if(kaball != kaball_prevstatus)
        {
                kaball_statuschange_time = time;
                kaball_prevstatus = kaball;
        }
-       
+
        vector kaball_pos, kaball_size;
-       
+
        if(mySize_x > mySize_y) {
                kaball_pos = pos + eX * 0.25 * mySize_x;
                kaball_size = eX * 0.5 * mySize_x + eY * mySize_y;
@@ -3059,13 +3059,13 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
                kaball_pos = pos + eY * 0.25 * mySize_y;
                kaball_size = eY * 0.5 * mySize_y + eX * mySize_x;
        }
-       
+
        float kaball_statuschange_elapsedtime = time - kaball_statuschange_time;
        float f = bound(0, kaball_statuschange_elapsedtime*2, 1);
-       
+
        if(kaball_prevstatus && f < 1)
                drawpic_aspect_skin_expanding(kaball_pos, "keepawayball_carrying", kaball_size, '1 1 1', panel_fg_alpha * kaball_alpha, DRAWFLAG_NORMAL, f);
-       
+
        if(kaball)
                drawpic_aspect_skin(pos, "keepawayball_carrying", eX * mySize_x + eY * mySize_y, '1 1 1', panel_fg_alpha * kaball_alpha * f, DRAWFLAG_NORMAL);
 }
@@ -3123,7 +3123,7 @@ void HUD_Mod_Race(vector pos, vector mySize)
        float f; // yet another function has this
        score = me.(scores[ps_primary]);
 
-       if not((scores_flags[ps_primary] & SFL_TIME) && !teamplay) // race/cts record display on HUD
+       if(!(scores_flags[ps_primary] & SFL_TIME) || teamplay) // race/cts record display on HUD
                return; // no records in the actual race
 
        // clientside personal record
@@ -3591,7 +3591,7 @@ void HUD_EngineInfo(void)
                frametimeavg = (frametimeavg + frametimeavg1 + frametimeavg2 + currentframetime)/4; // average three frametimes into framecounter for slightly more stable fps readings :P
                frametimeavg2 = frametimeavg1;
                frametimeavg1 = frametimeavg;
-               
+
                float weight;
                weight = cvar("hud_panel_engineinfo_framecounter_exponentialmovingaverage_new_weight");
                if(currentframetime > 0.0001) // filter out insane values which sometimes seem to occur and throw off the average? If you are getting 10,000 fps or more, then you don't need a framerate counter.
@@ -3669,7 +3669,7 @@ void HUD_InfoMessages(void)
 
        vector fontsize;
        fontsize = '0.20 0.20 0' * mySize_y;
-       
+
        float a;
        a = panel_fg_alpha;
 
@@ -3704,9 +3704,7 @@ void HUD_InfoMessages(void)
                        s = sprintf(_("^1Press ^3%s^1 for gamemode info"), getcommandkey("server info", "+show_info"));
                        drawInfoMessage(s)
 
-                       if(gametype == MAPINFO_TYPE_ARENA)
-                               s = _("^1Wait for your turn to join");
-                       else if(gametype == MAPINFO_TYPE_LMS)
+                       if(gametype == MAPINFO_TYPE_LMS)
                        {
                                entity sk;
                                sk = playerslots[player_localnum];
@@ -3795,7 +3793,7 @@ void HUD_InfoMessages(void)
                        }
                }
        }
-       else 
+       else
        {
                s = _("^7Press ^3ESC ^7to show HUD options.");
                drawInfoMessage(s)
@@ -3871,7 +3869,7 @@ void HUD_Physics(void)
                        conversion_factor = 0.0254 * 1.943844492; // 1 m/s = 1.943844492 knots, because 1 knot = 1.852 km/h
                        break;
        }
-       
+
        vector vel = (csqcplayer ? csqcplayer.velocity : pmove_vel);
 
        float max_speed = floor( autocvar_hud_panel_physics_speed_max * conversion_factor + 0.5 );
@@ -3894,9 +3892,9 @@ void HUD_Physics(void)
                        acceleration = (vlen(vel) - vlen(acc_prevspeed));
                else
                        acceleration = (vlen(vel - '0 0 1' * vel_z) - vlen(acc_prevspeed - '0 0 1' * acc_prevspeed_z));
-               
+
                acceleration = acceleration * (1 / max(0.0001, f)) * (0.0254 / 9.80665);
-               
+
                acc_prevspeed = vel;
                acc_prevtime = time;
 
@@ -4229,9 +4227,9 @@ void HUD_CenterPrint (void)
                if (scoreboard_bottom >= 0.96 * vid_conheight)
                        return;
                vector target_pos;
-               
+
                target_pos = eY * scoreboard_bottom + eX * 0.5 * (vid_conwidth - panel_size_x);
-               
+
                if(target_pos_y > panel_pos_y)
                {
                        panel_pos = panel_pos + (target_pos - panel_pos) * sqrt(scoreboard_fade_alpha);
@@ -4288,7 +4286,7 @@ void HUD_CenterPrint (void)
                }
 
 
-               // fade the centerprint_hud in/out 
+               // fade the centerprint_hud in/out
                if(centerprint_time[j] < 0)
                        a = bound(0, (time - centerprint_expire_time[j]) / max(0.0001, autocvar_hud_panel_centerprint_fade_in), 1);
                else if(centerprint_expire_time[j] - autocvar_hud_panel_centerprint_fade_out > time)
@@ -4297,21 +4295,21 @@ void HUD_CenterPrint (void)
                        a = (centerprint_expire_time[j] - time) / max(0.0001, autocvar_hud_panel_centerprint_fade_out);
                else
                        a = 0;
-               
+
                // set the size from fading in/out before subsequent fading
-               sz = autocvar_hud_panel_centerprint_fade_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_minfontsize); 
-               
+               sz = autocvar_hud_panel_centerprint_fade_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_minfontsize);
+
                // also fade it based on positioning
                if(autocvar_hud_panel_centerprint_fade_subsequent)
                {
                        a = a * bound(autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha, (1 - (g / max(1, autocvar_hud_panel_centerprint_fade_subsequent_passone))), 1); // pass one: all messages after the first have half theAlpha
                        a = a * bound(autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha, (1 - (g / max(1, autocvar_hud_panel_centerprint_fade_subsequent_passtwo))), 1); // pass two: after that, gradually lower theAlpha even more for each message
                }
-               
+
                // finally set the size based on the new theAlpha from subsequent fading
-               sz = sz * (autocvar_hud_panel_centerprint_fade_subsequent_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_subsequent_minfontsize)); 
+               sz = sz * (autocvar_hud_panel_centerprint_fade_subsequent_minfontsize + a * (1 - autocvar_hud_panel_centerprint_fade_subsequent_minfontsize));
                drawfontscale = sz * '1 1 0';
-               
+
                if (centerprint_countdown_num[j])
                        n = tokenizebyseparator(strreplace("^COUNT", count_seconds(centerprint_countdown_num[j]), centerprint_messages[j]), "\n");
                else
@@ -4354,15 +4352,15 @@ void HUD_CenterPrint (void)
                        }
                }
 
-               ++g; // move next position number up 
-               
+               ++g; // move next position number up
+
                msg_size = pos_y - msg_size;
                if (autocvar_hud_panel_centerprint_flip)
                {
                        pos_y = current_msg_pos_y - CENTERPRINT_SPACING * fontsize_y;
                        if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages
                                pos_y += (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(sz));
-                               
+
                        if (pos_y < panel_pos_y) // check if the next message can be shown
                        {
                                drawfontscale = '1 1 0';
@@ -4374,7 +4372,7 @@ void HUD_CenterPrint (void)
                        pos_y += CENTERPRINT_SPACING * fontsize_y;
                        if (a < 1 && centerprint_msgID[j] == 0) // messages with id can be replaced just after they are faded out, so never move over them the next messages
                                pos_y -= (msg_size + CENTERPRINT_SPACING * fontsize_y) * (1 - sqrt(sz));
-                               
+
                        if(pos_y > panel_pos_y + panel_size_y - fontsize_y) // check if the next message can be shown
                        {
                                drawfontscale = '1 1 0';
index ca8ec19c1ab51cbf33cba4eb27c119b3ae413016..869e30dda0d782f593b9a95e8b60cd371dd94048 100644 (file)
@@ -131,7 +131,7 @@ void HUD_Panel_ExportCfg(string cfgname)
                                        HUD_Write_PanelCvar_q("_maximized_scale");
                                        HUD_Write_PanelCvar_q("_maximized_size");
                                        HUD_Write_PanelCvar_q("_maximized_rotation");
-                                       HUD_Write_PanelCvar_q("_maximized_zoommode"); 
+                                       HUD_Write_PanelCvar_q("_maximized_zoommode");
                                        break;
                                case HUD_PANEL_SCORE:
                                        HUD_Write_PanelCvar_q("_rankings");
@@ -978,7 +978,7 @@ void HUD_Panel_FirstInDrawQ(float id)
        }
        // now save the new top id
        panel_order[0] = id;
-       
+
        // let's save them into the cvar by some strcat trickery
        string s = "";
        for(i = 0; i < HUD_PANEL_NUM; ++i)
@@ -1087,10 +1087,10 @@ 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;
-               
+
                mousepos_x = bound(0, mousepos_x, vid_conwidth);
                mousepos_y = bound(0, mousepos_y, vid_conheight);
        }
index 49aa033c17ae3092f4acd65adbe9b151d424c98c..f6b3fc4cbe7894392a38fd455dacbe77d800a0dc 100644 (file)
@@ -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);
index 107b25d712ad523caeeb3002f122fa18b1c0c2b4..8caeb01d524064f51c3191440555c0cd814ce0e3 100644 (file)
@@ -56,16 +56,16 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
        vector rgb;
        string label;
        float text_size;
-       
+
        isize -= hud_fontsize_y; // respect the text when calculating the image size
 
        rgb = MapVote_RGB(id, count);
-       
+
        img_size_y = isize;
        img_size_x = isize / 0.75; // 4:3 x can be stretched easily, height is defined in isize
 
        pos_y = pos_y + img_size_y;
-       
+
        label = MapVote_FormatMapItem(id, map, count, tsize, hud_fontsize);
 
        text_size = stringwidth(label, false, hud_fontsize);
@@ -78,7 +78,7 @@ void MapVote_DrawMapItem(vector pos, float isize, float tsize, string map, strin
 
        pos_x -= text_size*0.5;
        drawstring(pos, label, hud_fontsize, rgb, theAlpha, DRAWFLAG_NORMAL);
-       
+
        pos_x = pos_x + text_size*0.5 - img_size_x*0.5;
        pos_y = pos_y - img_size_y;
 
@@ -110,15 +110,15 @@ void MapVote_DrawAbstain(vector pos, float isize, float tsize, float count, floa
        vector rgb;
        float text_size;
        string label;
-       
+
        rgb = MapVote_RGB(id, count);
 
        pos_y = pos_y + hud_fontsize_y;
-       
+
        label = MapVote_FormatMapItem(id, _("Don't care"), count, tsize, hud_fontsize);
 
        text_size = stringwidth(label, false, hud_fontsize);
-       
+
        pos_x -= text_size*0.5;
        drawstring(pos, label, hud_fontsize, rgb, 1, DRAWFLAG_NORMAL);
 }
@@ -176,10 +176,10 @@ void MapVote_Draw()
        if(!mv_active)
                return;
 
-       if not(autocvar_hud_cursormode)
+       if (!autocvar_hud_cursormode)
        {
                mv_mousepos = mv_mousepos + getmousepos();
-               
+
                mv_mousepos_x = bound(0, mv_mousepos_x, vid_conwidth);
                mv_mousepos_y = bound(0, mv_mousepos_y, vid_conheight);
        }
@@ -273,12 +273,12 @@ void Cmd_MapVote_MapDownload(float argc)
                print(_("mv_mapdownload: ^3You're not supposed to use this command on your own!\n"));
                return;
        }
-       
+
        id = stof(argv(1));
        for(pak = mv_pk3list; pak; pak = pak.chain)
                if(pak.sv_entnum == id)
                        break;
-       
+
        if(!pak || pak.sv_entnum != id) {
                print(_("^1Error:^7 Couldn't find pak index.\n"));
                return;
@@ -301,10 +301,10 @@ void MapVote_CheckPK3(string pic, string pk3, float id)
        pak.netname = pk3;
        pak.message = pic;
        pak.sv_entnum = id;
-       
+
        pak.chain = mv_pk3list;
        mv_pk3list = pak;
-       
+
        if(pk3 != "")
        {
                localcmd(strcat("\ncurl --pak ", pk3, "; wait; cl_cmd mv_download ", ftos(id), "\n"));
@@ -367,10 +367,10 @@ void MapVote_Init()
                mv_maps_mask = ReadByte();
        else
                mv_maps_mask = ReadShort();
-       
+
        // Assume mv_pk3list is world, there should only be 1 mapvote per round
        mv_pk3list = world; // I'm still paranoid!
-       
+
        for(i = 0, power = 1; i < mv_num_maps; ++i, power *= 2)
        {
                mv_votes[i] = 0;
@@ -380,7 +380,7 @@ void MapVote_Init()
                        map = strzone(ReadString());
                        pk3 = strzone(ReadString());
                        j = bound(0, ReadByte(), n_ssdirs - 1);
-       
+
                        mv_maps[i] = map;
                        mv_pk3[i] = pk3;
                        map = strzone(strcat(ssdirs[j], "/", map));
@@ -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;
index 926e11399d39d370321183122dc2aff49e3fd498..2c2fc56df0983219934ebbdd062dda2ca767fc6e 100644 (file)
@@ -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;
@@ -302,18 +302,18 @@ var string _drawpic_picpath;
                _drawpic_picpath = string_null;\
        } while(0)
 
-void drawpic_aspect_skin_expanding(vector position, string pic, vector scale, vector rgb, float theAlpha, float flag, float fadelerp)
+void drawpic_aspect_skin_expanding(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp)
 {
        float sz;
        sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
 
-       drawpic_aspect_skin(position + expandingbox_resize_centered_box_offset(sz, scale, 1), pic, scale * sz, rgb, theAlpha * (1 - fadelerp), flag);
+       drawpic_aspect_skin(position + expandingbox_resize_centered_box_offset(sz, theScale, 1), pic, theScale * sz, rgb, theAlpha * (1 - fadelerp), flag);
 }
 
-void drawpic_aspect_skin_expanding_two(vector position, string pic, vector scale, vector rgb, float theAlpha, float flag, float fadelerp)
+void drawpic_aspect_skin_expanding_two(vector position, string pic, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp)
 {
-       drawpic_aspect_skin_expanding(position, pic, scale, rgb, theAlpha, flag, fadelerp);
-       drawpic_skin(position, pic, scale, rgb, theAlpha * fadelerp, flag);
+       drawpic_aspect_skin_expanding(position, pic, theScale, rgb, theAlpha, flag, fadelerp);
+       drawpic_skin(position, pic, theScale, rgb, theAlpha * fadelerp, flag);
 }
 #define SET_POS_AND_SZ_Y_ASPECT(allow_colors)\
        float textaspect, oldsz;\
@@ -341,14 +341,14 @@ void drawcolorcodedstring_aspect(vector pos, string text, vector sz, float theAl
 }
 
 vector drawfontscale;
-void drawstring_expanding(vector position, string text, vector scale, vector rgb, float theAlpha, float flag, float fadelerp)
+void drawstring_expanding(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp)
 {
        float sz;
        sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
 
        drawfontscale = sz * '1 1 0';
        dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
-       drawstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, FALSE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), rgb, theAlpha * (1 - fadelerp), flag);
+       drawstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, FALSE, theScale * (sz / drawfontscale_x)) / (theScale_x * sz)), text, theScale * (sz / drawfontscale_x), rgb, theAlpha * (1 - fadelerp), flag);
        // width parameter:
        //    (scale_x * sz / drawfontscale_x) * drawfontscale_x * SIZE1 / (scale_x * sz)
        //    SIZE1
@@ -361,14 +361,14 @@ void drawstring_aspect_expanding(vector pos, string text, vector sz, vector colo
        drawstring_expanding(pos, text, '1 1 0' * sz_y, color, theAlpha, drawflag, fadelerp);
 }
 
-void drawcolorcodedstring_expanding(vector position, string text, vector scale, float theAlpha, float flag, float fadelerp)
+void drawcolorcodedstring_expanding(vector position, string text, vector theScale, float theAlpha, float flag, float fadelerp)
 {
        float sz;
        sz = expandingbox_sizefactor_from_fadelerp(fadelerp);
 
        drawfontscale = sz * '1 1 0';
        dummyfunction(0, 0, 0, 0, 0, 0, 0, 0);
-       drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, scale, stringwidth(text, TRUE, scale * (sz / drawfontscale_x)) / (scale_x * sz)), text, scale * (sz / drawfontscale_x), theAlpha * (1 - fadelerp), flag);
+       drawcolorcodedstring(position + expandingbox_resize_centered_box_offset(sz, theScale, stringwidth(text, TRUE, theScale * (sz / drawfontscale_x)) / (theScale_x * sz)), text, theScale * (sz / drawfontscale_x), theAlpha * (1 - fadelerp), flag);
        drawfontscale = '1 1 0';
 }
 
@@ -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)
@@ -576,11 +576,11 @@ vector getplayerorigin(float pl)
 float getplayerisdead(float pl)
 {
        entity e;
-       
+
        e = CSQCModel_server2csqc(pl + 1);
        if(e)
                return e.csqcmodel_isdead;
-       
+
        return FALSE;
 }
 
index 0622aafe31903e567870fc064d63fb8eb6256fe8..22bbd142f90871ad4d8c906eda836d489dca761d 100644 (file)
@@ -128,7 +128,7 @@ float _Movetype_TestEntityPosition(vector ofs) // SV_TestEntityPosition
        vector org;
        float cont;
        org = self.move_origin + ofs;
-       
+
        cont = self.dphitcontentsmask;
        self.dphitcontentsmask = DPCONTENTS_SOLID;
        tracebox(self.move_origin, self.mins, self.maxs, self.move_origin, MOVE_NOMONSTERS, self);
@@ -264,7 +264,7 @@ void _Movetype_Physics_Toss(float dt) // SV_Physics_Toss
                _Movetype_PushEntity(move, TRUE);
                if(wasfreed(self))
                        return;
-       
+
                if(trace_startsolid)
                {
                        _Movetype_UnstickEntity();
index 00343a432d30d431f8a9f7de4a2acd274b507680..ce8b6dd7f9ecbe612a0aeb52d87650633d6228e7 100644 (file)
@@ -290,9 +290,9 @@ void Net_ReadNexgunBeamParticle()
        shotorg_x = ReadCoord(); shotorg_y = ReadCoord(); shotorg_z = ReadCoord();
        endpos_x = ReadCoord(); endpos_y = ReadCoord(); endpos_z = ReadCoord();
        charge = ReadByte() / 255.0;
-       
+
        pointparticles(particleeffectnum("nex_muzzleflash"), shotorg, normalize(endpos - shotorg) * 1000, 1);
-       
+
        //draw either the old v2.3 beam or the new beam
        charge = sqrt(charge); // divide evenly among trail spacing and alpha
        particles_alphamin = particles_alphamax = particles_fade = charge;
index b86c234bdbba9062e6b121cb745efc96050a6351..52f6e2324b5ecd578a15b1556e9ce90279fefc45 100644 (file)
@@ -111,7 +111,7 @@ void Projectile_Draw()
                        case PROJECTILE_NADE_PINK:
                        case PROJECTILE_NADE_BURN:
                        case PROJECTILE_NADE:
-                               rot = self.avelocity; 
+                               rot = self.avelocity;
                                break;
                        case PROJECTILE_HOOKBOMB:
                                rot = '1000 0 0'; // forward
@@ -167,10 +167,7 @@ void Projectile_Draw()
 
        switch(self.cnt)
        {
-               case PROJECTILE_BULLET_GLOWING:
-               case PROJECTILE_BULLET_GLOWING_TRACER:
-                       adddynamiclight(self.origin, 50 * a, '1 1 0');
-                       break;
+               // Possibly add dlights here.
                default:
                        break;
        }
@@ -292,9 +289,6 @@ void Ent_Projectile()
                {
                        case PROJECTILE_ELECTRO: setmodel(self, "models/ebomb.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
                        case PROJECTILE_ROCKET: setmodel(self, "models/rocket.md3");self.traileffect = particleeffectnum("TR_ROCKET"); self.scale = 2; break;
-                       case PROJECTILE_BULLET: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_bullet"); break;
-                       case PROJECTILE_BULLET_GLOWING: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_rifle_weak"); break;
-                       case PROJECTILE_BULLET_GLOWING_TRACER: setmodel(self, "models/tracer.mdl");self.traileffect = particleeffectnum("tr_rifle"); break;
                        case PROJECTILE_CRYLINK: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
                        case PROJECTILE_CRYLINK_BOUNCING: setmodel(self, "models/plasmatrail.mdl");self.traileffect = particleeffectnum("TR_CRYLINKPLASMA"); break;
                        case PROJECTILE_ELECTRO_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
@@ -324,7 +318,7 @@ void Ent_Projectile()
 
                        case PROJECTILE_BUMBLE_GUN: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
                        case PROJECTILE_BUMBLE_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
-                       
+
                        case PROJECTILE_NADE_RED: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_red"); break;
                        case PROJECTILE_NADE_RED_BURN: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_red_burn"); break;
                        case PROJECTILE_NADE_BLUE: setmodel(self, "models/weapons/v_ok_grenade.md3");self.traileffect = particleeffectnum("nade_blue"); break;
@@ -467,7 +461,7 @@ void Ent_Projectile()
                                break;
             case PROJECTILE_WAKIROCKET:
                 loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTEN_NORM);
-                               break;            
+                               break;
             /*
             case PROJECTILE_WAKICANNON:
                                break;
@@ -523,7 +517,7 @@ void Projectile_Precache()
        precache_model("models/rocket.md3");
        precache_model("models/tagrocket.md3");
        precache_model("models/tracer.mdl");
-       
+
        precache_model("models/weapons/v_ok_grenade.md3");
 
        precache_sound("weapons/electro_fly.wav");
index 339c8b29bc62fdf7dcb9bb4087c35ccee6a07cfc..b037d03d20cb35a4431315f87bc6ade863153b8b 100644 (file)
@@ -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;
@@ -586,7 +586,7 @@ string HUD_GetField(entity pl, float field)
                        } else
                                str = sprintf("%.1f", num/denom);
                        return str;
-                       
+
                case SP_SUM:
                        f = pl.(scores[SP_KILLS]);
                        f -= pl.(scores[SP_DEATHS]);
@@ -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;
@@ -1081,7 +1081,7 @@ vector HUD_DrawKeyValue(vector pos, string key, string value) {
        drawstring(pos, value, hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
        pos_x = px;
        pos_y+= hud_fontsize_y;
-       
+
        return pos;
 }
 
@@ -1098,14 +1098,14 @@ 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
        drawstring(pos, _("Map stats:"), hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
        pos_y += 1.25 * hud_fontsize_y + autocvar_scoreboard_border_thickness;
-       
-       // draw table   
+
+       // draw table
        vector tmp = '0 0 0';
        tmp_x = sbwidth;
        tmp_y = hud_fontsize_y * rows;
@@ -1119,7 +1119,7 @@ vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) {
        // draw secrets
        val = sprintf("%d/%d", stat_secrets_found, stat_secrets_total);
        pos = HUD_DrawKeyValue(pos, _("Secrets found:"), val);
-       
+
        // update position
        pos_y += 1.25 * hud_fontsize_y;
        return pos;
@@ -1207,7 +1207,7 @@ void HUD_DrawScoreboard()
                        scoreboard_fade_alpha = 0;
        }
 
-       if not(scoreboard_fade_alpha)
+       if (!scoreboard_fade_alpha)
                return;
 
        HUD_UpdatePlayerTeams();
@@ -1316,7 +1316,7 @@ void HUD_DrawScoreboard()
                        pos = HUD_DrawScoreboardAccuracyStats(pos, rgb, bg_size);
        }
 
-               
+
        if(teamplay)
                pos = HUD_DrawMapStats(pos, Team_ColorRGB(myteam), bg_size);
        else
@@ -1364,14 +1364,14 @@ void HUD_DrawScoreboard()
                                str = strcat(str, _(" or"));
                        if(teamplay)
                        {
-                               str = strcat(str, sprintf(_(" until ^3%s %s^7"), ScoreString(teamscores_flags[ts_primary], fl), 
+                               str = strcat(str, sprintf(_(" until ^3%s %s^7"), ScoreString(teamscores_flags[ts_primary], fl),
                                        (teamscores_label[ts_primary] == "score")   ? CTX(_("SCO^points")) :
                                        (teamscores_label[ts_primary] == "fastest") ? CTX(_("SCO^is beaten")) :
                                        TranslateScoresLabel(teamscores_label[ts_primary])));
                        }
                        else
                        {
-                               str = strcat(str, sprintf(_(" until ^3%s %s^7"), ScoreString(scores_flags[ps_primary], fl), 
+                               str = strcat(str, sprintf(_(" until ^3%s %s^7"), ScoreString(scores_flags[ps_primary], fl),
                                        (scores_label[ps_primary] == "score")   ? CTX(_("SCO^points")) :
                                        (scores_label[ps_primary] == "fastest") ? CTX(_("SCO^is beaten")) :
                                        TranslateScoresLabel(scores_label[ps_primary])));
@@ -1383,14 +1383,14 @@ void HUD_DrawScoreboard()
                                str = strcat(str, _(" or"));
                        if(teamplay)
                        {
-                               str = strcat(str, sprintf(_(" until a lead of ^3%s %s^7"), ScoreString(teamscores_flags[ts_primary], ll), 
+                               str = strcat(str, sprintf(_(" until a lead of ^3%s %s^7"), ScoreString(teamscores_flags[ts_primary], ll),
                                        (teamscores_label[ts_primary] == "score")   ? CTX(_("SCO^points")) :
                                        (teamscores_label[ts_primary] == "fastest") ? CTX(_("SCO^is beaten")) :
                                        TranslateScoresLabel(teamscores_label[ts_primary])));
                        }
                        else
                        {
-                               str = strcat(str, sprintf(_(" until a lead of ^3%s %s^7"), ScoreString(scores_flags[ps_primary], ll), 
+                               str = strcat(str, sprintf(_(" until a lead of ^3%s %s^7"), ScoreString(scores_flags[ps_primary], ll),
                                        (scores_label[ps_primary] == "score")   ? CTX(_("SCO^points")) :
                                        (scores_label[ps_primary] == "fastest") ? CTX(_("SCO^is beaten")) :
                                        TranslateScoresLabel(scores_label[ps_primary])));
@@ -1410,7 +1410,7 @@ void HUD_DrawScoreboard()
                        // a negative number means we are awaiting respawn, time value is still the same
                        respawn_time *= -1; // remove mark now that we checked it
                        respawn_time = max(time, respawn_time); // don't show a negative value while the server is respawning the player (lag)
-                       
+
                        str = sprintf(_("^1Respawning in ^3%s^1..."),
                                (autocvar_scoreboard_respawntime_decimals ?
                                        count_seconds_decs(respawn_time - time, autocvar_scoreboard_respawntime_decimals)
index f20f143b0315497e797817c0533a55b8a8f8966a..c581fba428fe42ff44f203da50c94f7f612e8eb1 100644 (file)
@@ -13,13 +13,13 @@ void Draw_ShowNames(entity ent)
 {
        if(!autocvar_hud_shownames)
                return;
-       
+
 #ifdef COMPAT_XON050_ENGINE
        if((ent.sv_entnum == player_localentnum) || (ent.sv_entnum == spectatee_status)) // ent is me or person i'm spectating
 #else
        if(ent.sv_entnum == player_localentnum) // ent is me or person i'm spectating
 #endif
-               if not (autocvar_hud_shownames_self && autocvar_chase_active) 
+               if(!(autocvar_hud_shownames_self && autocvar_chase_active))
                        return;
 
        makevectors(view_angles);
@@ -27,7 +27,7 @@ void Draw_ShowNames(entity ent)
        if(ent.sameteam || (!ent.sameteam && autocvar_hud_shownames_enemies))
        {
                ent.origin_z += autocvar_hud_shownames_offset;
-       
+
                float hit;
                if(ent.sameteam && !autocvar_hud_shownames_crosshairdistance)
                {
@@ -45,9 +45,9 @@ void Draw_ShowNames(entity ent)
                // handle tag fading
                float overlap = FALSE, onscreen, crosshairdistance;
                vector o, eo;
-               
+
                o = project_3d_to_2d(ent.origin);
-               
+
                if(autocvar_hud_shownames_antioverlap)
                {
                        // fade tag out if another tag that is closer to you overlaps
@@ -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))
@@ -71,30 +71,30 @@ void Draw_ShowNames(entity ent)
 
                onscreen = (o_z >= 0 && o_x >= 0 && o_y >= 0 && o_x <= vid_conwidth && o_y <= vid_conheight);
                crosshairdistance = sqrt( pow(o_x - vid_conwidth/2, 2) + pow(o_y - vid_conheight/2, 2) );
-               
+
                if(autocvar_hud_shownames_crosshairdistance)
                {
                        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.
                }
-               
+
                if(!ent.fadedelay)
                        ent.fadedelay = time + SHOWNAMES_FADEDELAY;
 
                if(!ent.sameteam && (!onscreen || !hit)) // out of view, fade out
-               { 
-                       ent.alpha = max(0, ent.alpha - SHOWNAMES_FADESPEED * frametime); 
+               {
+                       ent.alpha = max(0, ent.alpha - SHOWNAMES_FADESPEED * frametime);
                        ent.fadedelay = 0; // reset fade in delay, enemy has left the view
                }
                else if(ent.csqcmodel_isdead) // dead player, fade out slowly
-                       ent.alpha = max(0, ent.alpha - SHOWNAMES_FADESPEED * 0.25 * frametime); 
+                       ent.alpha = max(0, ent.alpha - SHOWNAMES_FADESPEED * 0.25 * frametime);
                else if(overlap) // tag overlap detected, fade out
-                       ent.alpha = max(0, ent.alpha - SHOWNAMES_FADESPEED * frametime); 
+                       ent.alpha = max(0, ent.alpha - SHOWNAMES_FADESPEED * frametime);
                else if(ent.sameteam) // fade in for team mates
                        ent.alpha = min(1, ent.alpha + SHOWNAMES_FADESPEED * frametime);
                else if(time > ent.fadedelay) // fade in for enemies
@@ -102,7 +102,7 @@ void Draw_ShowNames(entity ent)
 
                if(!ent.alpha)
                        return;
-               
+
                float dist;
                dist = vlen(ent.origin - view_origin);
 
@@ -218,7 +218,7 @@ void Draw_ShowNames_All()
                setorigin(e, getplayerorigin(i));
                if(e.origin == GETPLAYERORIGIN_ERROR)
                        continue;
-                       
+
                e.csqcmodel_isdead = getplayerisdead(i);
 
                Draw_ShowNames(e);
index 161bfa385a1b3f1c32690429fbdecbdb231d93e1..2088348b17527dd50317c5a464a4afa6896415a0 100644 (file)
@@ -14,7 +14,7 @@ void turrets_precache()
 }
 
 void turret_precache(float _tid)
-{    
+{
     if (!turret_is_precache[TID_COMMON])
     {
         precache_sound ("weapons/rocket_impact.wav");
@@ -38,13 +38,13 @@ void turret_precache(float _tid)
     {
         case TID_EWHEEL:
             precache_model ("models/turrets/ewheel-base2.md3");
-            precache_model ("models/turrets/ewheel-gun1.md3");            
+            precache_model ("models/turrets/ewheel-gun1.md3");
             break;
         case TID_FLAC:
             precache_model ("models/turrets/flac.md3");
             break;
         case TID_FUSION:
-            precache_model ("models/turrets/reactor.md3");    
+            precache_model ("models/turrets/reactor.md3");
             break;
         case TID_HELLION:
             precache_model ("models/turrets/hellion.md3");
@@ -79,7 +79,7 @@ void turret_precache(float _tid)
             precache_model ("models/turrets/walker_body.md3");
             precache_sound ("weapons/uzi_fire.wav");
             break;
-    }    
+    }
     turret_is_precache[_tid] = TRUE;
 }
 
@@ -148,19 +148,19 @@ void turret_tid2info(float _tid)
             tid2info_min = '-70 -70 0';
             tid2info_max = '70 70 95';
             break;
-    }    
+    }
 }
 
 void turret_remove()
-{    
+{
     remove(self.tur_head);
     //remove(self.enemy);
-    self.tur_head = world;    
+    self.tur_head = world;
 }
 
 .vector glowmod;
 void turret_changeteam()
-{      
+{
        switch(self.team - 1)
        {
         case NUM_TEAM_1: // Red
@@ -183,46 +183,46 @@ void turret_changeteam()
             self.teamradar_color = '1 0 1';
             break;
        }
-       
+
        if(self.team)
         self.colormap = 1024 + (self.team - 1) * 17;
-       
+
        self.tur_head.colormap = self.colormap;
        self.tur_head.glowmod = self.glowmod;
-       
+
 }
 
 void turret_head_draw()
-{    
+{
     self.drawmask = MASK_NORMAL;
 }
 
 void turret_draw()
-{        
+{
     float dt;
 
     dt = time - self.move_time;
     self.move_time = time;
     if(dt <= 0)
         return;
-    
+
     self.tur_head.angles += dt * self.tur_head.move_avelocity;
 
     if (self.health < 127)
     {
         dt = random();
-        
+
         if(dt < 0.03)
-            te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);        
+            te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
     }
-    
+
     if(self.health < 85)
     if(dt < 0.01)
         pointparticles(particleeffectnum("smoke_large"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
-    
+
     if(self.health < 32)
     if(dt < 0.015)
-        pointparticles(particleeffectnum("smoke_small"), (self.origin + (randomvec() * 80)), '0 0 0', 1);        
+        pointparticles(particleeffectnum("smoke_small"), (self.origin + (randomvec() * 80)), '0 0 0', 1);
 
 }
 
@@ -230,33 +230,33 @@ void turret_draw2d()
 {
        if(self.netname == "")
            return;
-       
+
        if(!autocvar_g_waypointsprite_turrets)
                return;
-               
+
     if(autocvar_cl_hidewaypoints)
-        return; 
+        return;
 
        float dist = vlen(self.origin - view_origin);
-    float t = (GetPlayerColor(player_localnum) + 1);   
+    float t = (GetPlayerColor(player_localnum) + 1);
 
        vector o;
        string txt;
-       
+
        if(autocvar_cl_vehicles_hud_tactical)
        if(dist < 10240 && t != self.team)
        {
         // TODO: Vehicle tactical hud
         o = project_3d_to_2d(self.origin + '0 0 32');
-        if(o_z < 0 
-        || o_x < (vid_conwidth * waypointsprite_edgeoffset_left) 
-        || o_y < (vid_conheight * waypointsprite_edgeoffset_top) 
-        || o_x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))  
+        if(o_z < 0
+        || o_x < (vid_conwidth * waypointsprite_edgeoffset_left)
+        || o_y < (vid_conheight * waypointsprite_edgeoffset_top)
+        || o_x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))
         || o_y > (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)))
             return; // Dont draw wp's for turrets out of view
         o_z = 0;
         if(hud != HUD_NORMAL)
-        {        
+        {
             switch(hud)
             {
                 case HUD_SPIDERBOT:
@@ -267,14 +267,14 @@ void turret_draw2d()
                         txt = "gfx/vehicles/vth-mover.tga";
                     else
                         txt = "gfx/vehicles/vth-stationary.tga";
-                        
+
                     vector pz = drawgetimagesize(txt) * 0.25;
                     drawpic(o - pz * 0.5, txt, pz , '1 1 1', 0.75, DRAWFLAG_NORMAL);
                     break;
             }
         }
        }
-    
+
        if(dist > self.maxdistance)
         return;
 
@@ -282,7 +282,7 @@ void turret_draw2d()
        float a = self.alpha * autocvar_hud_panel_fg_alpha;
        vector rgb = spritelookupcolor(spriteimage, self.teamradar_color);
 
-       
+
        if(self.maxdistance > waypointsprite_normdistance)
                a *= pow(bound(0, (self.maxdistance - dist) / (self.maxdistance - waypointsprite_normdistance), 1), waypointsprite_distancealphaexponent);
        else if(self.maxdistance > 0)
@@ -291,7 +291,7 @@ void turret_draw2d()
        if(rgb == '0 0 0')
        {
                self.teamradar_color = '1 0 1';
-               print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage)); 
+               print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage));
        }
 
        txt = self.netname;
@@ -299,18 +299,18 @@ void turret_draw2d()
                txt = _("Spam");
        else
                txt = spritelookuptext(spriteimage);
-       
+
        if(time - floor(time) > 0.5 && t == self.team)
        {
                if(self.helpme && time < self.helpme)
                {
                    a *= SPRITE_HELPME_BLINK;
                    txt = sprintf(_("%s under attack!"), txt);
-               }                       
+               }
                else
                        a *= spritelookupblinkvalue(spriteimage);
        }
-       
+
        if(autocvar_g_waypointsprite_uppercase)
                txt = strtoupper(txt);
 
@@ -322,23 +322,23 @@ void turret_draw2d()
 
        if(a <= 0)
            return;
-               
+
        rgb = fixrgbexcess(rgb);
 
        o = project_3d_to_2d(self.origin + '0 0 64');
-       if(o_z < 0 
-       || o_x < (vid_conwidth * waypointsprite_edgeoffset_left) 
-       || o_y < (vid_conheight * waypointsprite_edgeoffset_top) 
-       || o_x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))  
+       if(o_z < 0
+       || o_x < (vid_conwidth * waypointsprite_edgeoffset_left)
+       || o_y < (vid_conheight * waypointsprite_edgeoffset_top)
+       || o_x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))
        || o_y > (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)))
            return; // Dont draw wp's for turrets out of view
 
        o_z = 0;
 
        float edgedistance_min, crosshairdistance;
-               edgedistance_min = min((o_y - (vid_conheight * waypointsprite_edgeoffset_top)), 
+               edgedistance_min = min((o_y - (vid_conheight * waypointsprite_edgeoffset_top)),
        (o_x - (vid_conwidth * waypointsprite_edgeoffset_left)),
-       (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o_x, 
+       (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o_x,
        (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)) - o_y);
 
        float vidscale = max(vid_conwidth / vid_width, vid_conheight / vid_height);
@@ -361,7 +361,7 @@ void turret_draw2d()
                t = t * (1 - (1 - waypointsprite_crosshairfadescale) * (1 - bound(0, crosshairdistance/waypointsprite_crosshairfadedistance, 1)));
        }
 
-       o = drawspritearrow(o, M_PI, rgb, a, SPRITE_ARROW_SCALE * t);       
+       o = drawspritearrow(o, M_PI, rgb, a, SPRITE_ARROW_SCALE * t);
     o = drawspritetext(o, M_PI, (SPRITE_HEALTHBAR_WIDTH + 2 * SPRITE_HEALTHBAR_BORDER) * t, rgb, a, waypointsprite_fontsize * '1 1 0', txt);
     drawhealthbar(
             o,
@@ -383,50 +383,50 @@ void turret_draw2d()
 }
 
 void turret_walker_draw()
-{        
+{
     float dt;
-            
+
     dt = time - self.move_time;
     self.move_time = time;
     if(dt <= 0)
         return;
-    
+
     fixedmakevectors(self.angles);
     movelib_groundalign4point(300, 100, 0.25, 45);
     setorigin(self, self.origin + self.velocity * dt);
     self.tur_head.angles += dt * self.tur_head.move_avelocity;
     self.angles_y = self.move_angles_y;
-    
+
     if (self.health < 127)
     if(random() < 0.15)
-        te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);    
+        te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
 }
 
 void turret_ewheel_draw()
-{        
+{
     float dt;
-            
+
     dt = time - self.move_time;
     self.move_time = time;
     if(dt <= 0)
         return;
-    
-    fixedmakevectors(self.angles);    
+
+    fixedmakevectors(self.angles);
     setorigin(self, self.origin + self.velocity * dt);
     self.tur_head.angles += dt * self.tur_head.move_avelocity;
     self.angles_y = self.move_angles_y;
-    
+
     if (self.health < 127)
     if(random() < 0.05)
-        te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);    
+        te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
 }
 
 void(entity e, entity tagentity, string tagname) setattachment = #443;
 void turret_construct()
-{    
+{
     if(self.tur_head == world)
         self.tur_head = spawn();
-    
+
     turret_tid2info(self.turret_type);
     self.netname = tid2info_name;
 
@@ -435,12 +435,12 @@ void turret_construct()
     setmodel(self.tur_head, tid2info_head);
     setsize(self, tid2info_min, tid2info_max);
     setsize(self.tur_head, '0 0 0', '0 0 0');
-    
+
     if(self.turret_type == TID_EWHEEL)
         setattachment(self.tur_head, self, "");
     else
         setattachment(self.tur_head, self, "tag_head");
-    
+
     self.tur_head.classname     = "turret_head";
     self.tur_head.owner         = self;
     self.tur_head.move_movetype = MOVETYPE_NOCLIP;
@@ -450,24 +450,24 @@ void turret_construct()
     self.solid                  = SOLID_BBOX;
     self.tur_head.solid         = SOLID_NOT;
     self.movetype               = MOVETYPE_NOCLIP;
-    self.tur_head.movetype      = MOVETYPE_NOCLIP;    
+    self.tur_head.movetype      = MOVETYPE_NOCLIP;
     self.draw                   = turret_draw;
     self.entremove              = turret_remove;
     self.drawmask               = MASK_NORMAL;
     self.tur_head.drawmask      = MASK_NORMAL;
-    self.anim_start_time        = 0;    
+    self.anim_start_time        = 0;
     self.draw2d = turret_draw2d;
     self.maxdistance = autocvar_g_waypointsprite_turrets_maxdist;
     self.teamradar_color = '1 0 0';
     self.alpha = 1;
-    
+
     if(self.turret_type == TID_EWHEEL || self.turret_type == TID_WALKER)
     {
         self.gravity            = 1;
         self.movetype           = MOVETYPE_BOUNCE;
         self.move_movetype      = MOVETYPE_BOUNCE;
-        self.move_origin        = self.origin;                
-        self.move_time          = time;        
+        self.move_origin        = self.origin;
+        self.move_time          = time;
         switch(self.turret_type)
         {
             case TID_EWHEEL:
@@ -476,8 +476,8 @@ void turret_construct()
             case TID_WALKER:
                 self.draw               = turret_walker_draw;
                 break;
-            
-        }        
+
+        }
     }
 }
 
@@ -486,9 +486,9 @@ void turret_gibboom();
 void turret_gib_draw()
 {
     Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
-    
+
     self.drawmask = MASK_NORMAL;
-       
+
        if(self.cnt)
        {
            if(time >= self.nextthink)
@@ -501,14 +501,14 @@ void turret_gib_draw()
        {
         self.alpha = bound(0, self.nextthink - time, 1);
         if(self.alpha < ALPHA_MIN_VISIBLE)
-            remove(self);          
+            remove(self);
        }
 }
 
 void turret_gibboom()
 {
     float i;
-    
+
     sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
     pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
 
@@ -519,43 +519,43 @@ void turret_gibboom()
 entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, float _explode)
 {
     entity gib;
-    
+
     traceline(_from, _to, MOVE_NOMONSTERS, world);
     if(trace_startsolid)
         return world;
-    
+
     gib = spawn();
     setorigin(gib, _from);
     setmodel(gib, _model);
     gib.colormod    = _cmod;
        gib.solid       = SOLID_CORPSE;
-    gib.draw        = turret_gib_draw;    
+    gib.draw        = turret_gib_draw;
     gib.cnt         = _explode;
     setsize(gib, '-1 -1 -1', '1 1 1');
     if(_explode)
     {
         gib.nextthink = time + 0.2 * (autocvar_cl_gibs_lifetime * (1 + prandom() * 0.15));
         gib.effects = EF_FLAME;
-    }        
+    }
     else
         gib.nextthink = time + autocvar_cl_gibs_lifetime * (1 + prandom() * 0.15);
-    
+
     gib.gravity         = 1;
        gib.move_movetype   = MOVETYPE_BOUNCE;
        gib.move_origin     = _from;
        setorigin(gib,        _from);
-       gib.move_velocity   = _to;      
+       gib.move_velocity   = _to;
        gib.move_avelocity  = prandomvec() * 32;
        gib.move_time       = time;
        gib.damageforcescale = 1;
        gib.classname = "turret_gib";
-       
+
        return gib;
 }
 
 void turret_die()
-{    
-    
+{
+
     sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
     pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
     turret_tid2info(self.turret_type);
@@ -569,9 +569,9 @@ void turret_die()
         else if (self.turret_type == TID_TESLA)
             turret_gibtoss(tid2info_base, self.origin + '0 0 18', '0 0 200', '-1 -1 -1', FALSE);
         else
-        {        
+        {
             if (random() > 0.5)
-            {            
+            {
                 turret_gibtoss("models/turrets/base-gib2.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE);
                 turret_gibtoss("models/turrets/base-gib3.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE);
                 turret_gibtoss("models/turrets/base-gib4.md3", self.origin + '0 0 8', '0 0 50' + randomvec() * 150, '0 0 0', FALSE);
@@ -585,11 +585,11 @@ void turret_die()
                 headgib.angles = headgib.move_angles = self.tur_head.angles;
                 headgib.avelocity = headgib.move_avelocity = self.tur_head.move_avelocity + randomvec() * 45;
                 headgib.avelocity_y = headgib.move_avelocity_y = headgib.move_avelocity_y * 5;
-                headgib.gravity = 0.5;        
+                headgib.gravity = 0.5;
             }
         }
     }
-    
+
     setmodel(self, "null");
     setmodel(self.tur_head, "null");
 }
@@ -600,63 +600,63 @@ void ent_turret()
     sf = ReadByte();
 
        if(sf & TNSF_SETUP)
-       {           
+       {
            self.turret_type = ReadByte();
-                   
+
            self.origin_x = ReadCoord();
            self.origin_y = ReadCoord();
            self.origin_z = ReadCoord();
            setorigin(self, self.origin);
-           
+
            self.angles_x = ReadAngle();
            self.angles_y = ReadAngle();
-           
+
            turret_precache(self.turret_type);
            turret_construct();
            self.colormap = 1024;
-           self.glowmod = '0 1 1'; 
+           self.glowmod = '0 1 1';
            self.tur_head.colormap = self.colormap;
            self.tur_head.glowmod = self.glowmod;
     }
-    
+
     if(sf & TNSF_ANG)
     {
         if(self.tur_head == world) // aparenly this can happpen before TNSF_SETUP. great.
             self.tur_head = spawn();
-            
+
         self.tur_head.move_angles_x = ReadShort();
         self.tur_head.move_angles_y = ReadShort();
         //self.tur_head.angles = self.angles + self.tur_head.move_angles;
         self.tur_head.angles = self.tur_head.move_angles;
     }
-    
+
     if(sf & TNSF_AVEL)
     {
         if(self.tur_head == world) // aparenly this can happpen before TNSF_SETUP. great.
             self.tur_head = spawn();
-            
+
         self.tur_head.move_avelocity_x = ReadShort();
-        self.tur_head.move_avelocity_y = ReadShort();            
+        self.tur_head.move_avelocity_y = ReadShort();
     }
-    
+
     if(sf & TNSF_MOVE)
     {
         self.origin_x = ReadShort();
         self.origin_y = ReadShort();
         self.origin_z = ReadShort();
         setorigin(self, self.origin);
-        
+
         self.velocity_x = ReadShort();
         self.velocity_y = ReadShort();
         self.velocity_z = ReadShort();
-        
+
         self.move_angles_y = ReadShort();
-            
+
         self.move_time     = time;
         self.move_velocity = self.velocity;
         self.move_origin   = self.origin;
     }
-        
+
     if(sf & TNSF_ANIM)
     {
         self.frame1time = ReadCoord();
@@ -668,18 +668,18 @@ void ent_turret()
         float _tmp;
         _tmp = ReadByte();
         if(_tmp != self.team)
-        {            
-            self.team = _tmp;                
+        {
+            self.team = _tmp;
             turret_changeteam();
         }
-        
-        _tmp = ReadByte();        
+
+        _tmp = ReadByte();
         if(_tmp == 0 && self.health != 0)
             turret_die();
         else if(self.health && self.health != _tmp)
             self.helpme = servertime + 10;
 
         self.health = _tmp;
-    } 
+    }
     //self.enemy.health = self.health / 255;
 }
index c95185d74cd6340efd98fca485cefac781f9cf2a..d8727e1760b4a05941246d7a96a5c0dcf13fb8de 100644 (file)
@@ -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;
@@ -103,7 +103,7 @@ void Net_AuXair2(float bIsNew)
         axh.alpha                      = 1;
                AuxiliaryXhair[axh_id] = axh;
     }
-    
+
        axh.move_origin_x       = ReadCoord();
        axh.move_origin_y       = ReadCoord();
        axh.move_origin_z       = ReadCoord();
@@ -111,31 +111,31 @@ void Net_AuXair2(float bIsNew)
        axh.colormod_y          = ReadByte() / 255;
        axh.colormod_z          = ReadByte() / 255;
     axh.cnt                    = time;
-    axh.draw2d                 = AuxiliaryXhair_Draw2D;        
+    axh.draw2d                 = AuxiliaryXhair_Draw2D;
 }
 
 void Net_VehicleSetup()
 {
 
     float i;
-    
+
     float hud_id = ReadByte();
-    
+
     // Weapon update?
     if(hud_id > HUD_VEHICLE_LAST)
     {
         weapon2mode = hud_id - HUD_VEHICLE_LAST;
         return;
     }
-    
+
     // hud_id == 0 means we exited a vehicle, so stop alarm sound/s
     if(hud_id == 0)
     {
         sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
-        sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);    
+        sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
         return;
     }
-    
+
     hud_id  = bound(HUD_VEHICLE_FIRST, hud_id, HUD_VEHICLE_LAST);
 
     // Init auxiliary crosshairs
@@ -191,15 +191,15 @@ void Net_VehicleSetup()
             // Raygun-locked
             AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
             AuxiliaryXhair[0].axh_scale   = 0.5;
-            
+
             // Gunner1
             AuxiliaryXhair[1].axh_image   = "gfx/vehicles/axh-target.tga";
             AuxiliaryXhair[1].axh_scale   = 0.75;
-            
+
             // Gunner2
             AuxiliaryXhair[2].axh_image   = "gfx/vehicles/axh-target.tga";
             AuxiliaryXhair[2].axh_scale   = 0.75;
-            break;        
+            break;
         case HUD_BUMBLEBEE_GUN:
             // Plasma cannons
             AuxiliaryXhair[0].axh_image   = "gfx/vehicles/axh-bracket.tga";
@@ -248,12 +248,12 @@ void CSQC_BUMBLE_HUD()
 
     pic2size = draw_getimagesize(bumb_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
     picloc = picsize * 0.5 - pic2size * 0.5;
-    
+
     if(vh_health < 0.25)
         drawpic(hudloc + picloc, bumb_ico, pic2size,  '1 0 0' + '0 1 1' * sin(time * 8),  1, DRAWFLAG_NORMAL);
     else
         drawpic(hudloc + picloc, bumb_ico, pic2size,  '1 1 1' * vh_health  + '1 0 0' * (1 - vh_health),  1, DRAWFLAG_NORMAL);
-    
+
     drawpic(hudloc + picloc, bumb_lgun, pic2size, '1 1 1' * energy   + '1 0 0' * (1 - energy),   1, DRAWFLAG_NORMAL);
     drawpic(hudloc + picloc, bumb_lgun, pic2size, '1 1 1' * energy   + '1 0 0' * (1 - energy),   1, DRAWFLAG_NORMAL);
     drawpic(hudloc + picloc, hud_sh, pic2size,  '1 1 1', shield, DRAWFLAG_NORMAL);
@@ -274,9 +274,9 @@ void CSQC_BUMBLE_HUD()
             alarm1time = time + 2;
             sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE);
         }
-        
+
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-    }        
+    }
     else
     {
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
@@ -284,7 +284,7 @@ void CSQC_BUMBLE_HUD()
         {
             sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm1time = 0;
-        }        
+        }
     }
 
 // Shield bar
@@ -309,15 +309,15 @@ void CSQC_BUMBLE_HUD()
     {
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm2time)
-        {            
+        {
             sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm2time = 0;
         }
     }
-    
+
        ammo1 *= 0.01;
        ammo2 *= 0.01;
-       
+
 // Gunner1 bar
     picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
     picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
@@ -328,11 +328,11 @@ void CSQC_BUMBLE_HUD()
 // Right gunner slot occupied?
        if(!AuxiliaryXhair[1].draw2d)
        {
-               shield = (picsize_x * 0.5) - (0.5 * stringwidth(_("No right gunner!"), FALSE, '1 0 0' * picsize_y + '0 1 0' * picsize_y));                              
+               shield = (picsize_x * 0.5) - (0.5 * stringwidth(_("No right gunner!"), FALSE, '1 0 0' * picsize_y + '0 1 0' * picsize_y));
                drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL);
                drawstring(hudloc + picloc + '1 0 0' * shield, _("No right gunner!"), '1 0 0' * picsize_y + '0 1 0' * picsize_y, '1 0 0' + '0 1 1' * sin(time * 10), 1, DRAWFLAG_NORMAL);
        }
-       
+
 // ..  and icon
     picsize = 1.5 * draw_getimagesize(hud_energy) * autocvar_cl_vehicles_hudscale;
     picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
@@ -340,7 +340,7 @@ void CSQC_BUMBLE_HUD()
         drawpic(hudloc + picloc, hud_energy, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
     else
         drawpic(hudloc + picloc, hud_energy, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
-       
+
 // Gunner2 bar
     picsize = draw_getimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
     picloc = '450 140 0' * autocvar_cl_vehicles_hudscale;
@@ -350,7 +350,7 @@ void CSQC_BUMBLE_HUD()
 // Left gunner slot occupied?
        if(!AuxiliaryXhair[2].draw2d)
        {
-               shield = (picsize_x * 0.5) - (0.5 * stringwidth(_("No left gunner!"), FALSE, '1 0 0' * picsize_y + '0 1 0' * picsize_y));                               
+               shield = (picsize_x * 0.5) - (0.5 * stringwidth(_("No left gunner!"), FALSE, '1 0 0' * picsize_y + '0 1 0' * picsize_y));
                drawfill(hudloc + picloc - '0.2 0.2 0', picsize + '0.4 0.4 0', '0.25 0.25 0.25', 0.75, DRAWFLAG_NORMAL);
                drawstring(hudloc + picloc + '1 0 0' * shield, _("No left gunner!"), '1 0 0' * picsize_y + '0 1 0' * picsize_y, '1 0 0' + '0 1 1' * sin(time * 10), 1, DRAWFLAG_NORMAL);
        }
@@ -372,7 +372,7 @@ void CSQC_BUMBLE_HUD()
         picsize_y *= 0.5;
         drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), waki_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
     }
-    
+
 }
 
 void CSQC_BUMBLE_GUN_HUD()
@@ -399,12 +399,12 @@ void CSQC_BUMBLE_GUN_HUD()
 
     pic2size = draw_getimagesize(bumb_gun_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
     picloc = picsize * 0.5 - pic2size * 0.5;
-    
+
     if(vh_health < 0.25)
         drawpic(hudloc + picloc, bumb_gun_ico, pic2size,  '1 0 0' + '0 1 1' * sin(time * 8),  1, DRAWFLAG_NORMAL);
     else
         drawpic(hudloc + picloc, bumb_gun_ico, pic2size,  '1 1 1' * vh_health  + '1 0 0' * (1 - vh_health),  1, DRAWFLAG_NORMAL);
-    
+
     drawpic(hudloc + picloc, bumb_gun_gun, pic2size, '1 1 1' * energy   + '1 0 0' * (1 - energy),   1, DRAWFLAG_NORMAL);
     drawpic(hudloc + picloc, hud_sh, pic2size,  '1 1 1', shield, DRAWFLAG_NORMAL);
 
@@ -424,9 +424,9 @@ void CSQC_BUMBLE_GUN_HUD()
             alarm1time = time + 2;
             sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE);
         }
-        
+
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-    }        
+    }
     else
     {
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
@@ -434,7 +434,7 @@ void CSQC_BUMBLE_GUN_HUD()
         {
             sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm1time = 0;
-        }        
+        }
     }
 
 // Shield bar
@@ -459,19 +459,19 @@ void CSQC_BUMBLE_GUN_HUD()
     {
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm2time)
-        {            
+        {
             sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm2time = 0;
         }
     }
-    
+
 // Gun bar
     picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
     picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
     drawsetcliparea(hudloc_x + picloc_x, picloc_y, picsize_x * energy, vid_conheight);
     drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
     drawresetcliparea();
-    
+
 // ..  and icon
     picsize = 1.5 * draw_getimagesize(hud_energy) * autocvar_cl_vehicles_hudscale;
     picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
@@ -524,7 +524,7 @@ void CSQC_SPIDER_HUD()
     if(vh_health < 0.25)
         drawpic(hudloc + picloc, spider_ico, pic2size,  '1 0 0' + '0 1 1' * sin(time * 8),  1, DRAWFLAG_NORMAL);
     else
-        drawpic(hudloc + picloc, spider_ico, pic2size,  '1 1 1' * vh_health  + '1 0 0' * (1 - vh_health),  1, DRAWFLAG_NORMAL);    
+        drawpic(hudloc + picloc, spider_ico, pic2size,  '1 1 1' * vh_health  + '1 0 0' * (1 - vh_health),  1, DRAWFLAG_NORMAL);
     drawpic(hudloc + picloc, spider_rkt, pic2size,  '1 1 1' * reload2 + '1 0 0' * (1 - reload2), 1, DRAWFLAG_NORMAL);
     drawpic(hudloc + picloc, spider_mgun, pic2size, '1 1 1' * ammo1   + '1 0 0' * (1 - ammo1),   1, DRAWFLAG_NORMAL);
     drawpic(hudloc + picloc, hud_sh, pic2size,  '1 1 1', shield, DRAWFLAG_NORMAL);
@@ -544,9 +544,9 @@ void CSQC_SPIDER_HUD()
         {
             alarm1time = time + 2;
             sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE);
-        }        
+        }
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-    }        
+    }
     else
     {
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
@@ -554,7 +554,7 @@ void CSQC_SPIDER_HUD()
         {
             sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm1time = 0;
-        }        
+        }
     }
 // Shield bar
     picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
@@ -578,7 +578,7 @@ void CSQC_SPIDER_HUD()
     {
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm2time)
-        {            
+        {
             sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm2time = 0;
         }
@@ -710,9 +710,9 @@ void CSQC_RAPTOR_HUD()
             alarm1time = time + 2;
             sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE);
         }
-        
+
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-    }        
+    }
     else
     {
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
@@ -745,12 +745,12 @@ void CSQC_RAPTOR_HUD()
     {
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm2time)
-        {            
+        {
             sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm2time = 0;
         }
     }
-    
+
 // Gun bar
     picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
     picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
@@ -778,7 +778,7 @@ void CSQC_RAPTOR_HUD()
         drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
     else
         drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 1 1', 1, DRAWFLAG_NORMAL);
-    
+
     if(weapon2mode == RSM_FLARE)
     {
         raptor_xhair =  "gfx/vehicles/axh-bracket.tga";
@@ -786,7 +786,7 @@ void CSQC_RAPTOR_HUD()
     else
     {
         raptor_xhair =  "gfx/vehicles/axh-ring.tga";
-        
+
         // Bombing crosshair
         if(!dropmark)
         {
@@ -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;
@@ -835,7 +835,7 @@ void CSQC_RAPTOR_HUD()
             }
         }
     }
-    
+
        if (scoreboard_showscores)
                HUD_DrawScoreboard();
     else
@@ -902,9 +902,9 @@ void CSQC_WAKIZASHI_HUD()
             alarm1time = time + 2;
             sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTEN_NONE);
         }
-        
+
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
-    }        
+    }
     else
     {
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
@@ -912,9 +912,9 @@ void CSQC_WAKIZASHI_HUD()
         {
             sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm1time = 0;
-        }        
+        }
     }
-        
+
 
 // Shield bar
     picsize = draw_getimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
@@ -938,12 +938,12 @@ void CSQC_WAKIZASHI_HUD()
     {
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm2time)
-        {            
+        {
             sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm2time = 0;
         }
     }
-    
+
 // Gun bar
     picsize = draw_getimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
     picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
@@ -992,7 +992,7 @@ void Vehicles_Precache()
        precache_model("models/vehicles/clusterbomb_fragment.md3");
        precache_model("models/vehicles/rocket01.md3");
        precache_model("models/vehicles/rocket02.md3");
-       
+
        precache_sound ("vehicles/alarm.wav");
        precache_sound ("vehicles/alarm_shield.wav");
 }
@@ -1000,12 +1000,12 @@ void Vehicles_Precache()
 void RaptorCBShellfragDraw()
 {
        if(wasfreed(self))
-               return;   
-               
+               return;
+
        Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
        self.move_avelocity += randomvec() * 15;
        self.renderflags = 0;
-       
+
        if(self.cnt < time)
                self.alpha = bound(0, self.nextthink - time, 1);
 
@@ -1016,7 +1016,7 @@ void RaptorCBShellfragDraw()
 void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
 {
     entity sfrag;
-    
+
     sfrag = spawn();
     setmodel(sfrag, "models/vehicles/clusterbomb_fragment.md3");
     setorigin(sfrag, _org);
index a2ace4f46aa95059399d89a0667c74b44dcd8e5b..a3e856d1438197df091be171493946c75273a1c5 100644 (file)
@@ -96,7 +96,7 @@ void drawhealthbar(vector org, float rot, float h, vector sz, vector hotspot, fl
        o = hotspot;
        ri = '1 0 0';
        up = '0 1 0';
-       
+
        rot = -rot; // rotate by the opposite angle, as our coordinate system is reversed
        o = rotate(o, rot) + org;
        ri = rotate(ri, rot);
@@ -439,10 +439,10 @@ void Draw_WaypointSprite()
                return;
 
        ++waypointsprite_newcount;
-       
+
        float dist;
        dist = vlen(self.origin - view_origin);
-       
+
        float a;
        a = self.alpha * autocvar_hud_panel_fg_alpha;
 
@@ -457,7 +457,7 @@ void Draw_WaypointSprite()
        if(rgb == '0 0 0')
        {
                self.teamradar_color = '1 0 1';
-               print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage)); 
+               print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage));
        }
 
        if(time - floor(time) > 0.5)
@@ -483,10 +483,10 @@ void Draw_WaypointSprite()
        float ang;
 
        o = project_3d_to_2d(self.origin);
-       if(o_z < 0 
-       || o_x < (vid_conwidth * waypointsprite_edgeoffset_left) 
-       || o_y < (vid_conheight * waypointsprite_edgeoffset_top) 
-       || o_x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))  
+       if(o_z < 0
+       || o_x < (vid_conwidth * waypointsprite_edgeoffset_left)
+       || o_y < (vid_conheight * waypointsprite_edgeoffset_top)
+       || o_x > (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right))
        || o_y > (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)))
        {
                // scale it to be just in view
@@ -543,9 +543,9 @@ void Draw_WaypointSprite()
        o_z = 0;
 
        float edgedistance_min, crosshairdistance;
-               edgedistance_min = min((o_y - (vid_conheight * waypointsprite_edgeoffset_top)), 
+               edgedistance_min = min((o_y - (vid_conheight * waypointsprite_edgeoffset_top)),
        (o_x - (vid_conwidth * waypointsprite_edgeoffset_left)),
-       (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o_x, 
+       (vid_conwidth - (vid_conwidth * waypointsprite_edgeoffset_right)) - o_x,
        (vid_conheight - (vid_conheight * waypointsprite_edgeoffset_bottom)) - o_y);
 
        float vidscale;
@@ -585,7 +585,7 @@ void Draw_WaypointSprite()
        }
 
        o = drawspritearrow(o, ang, rgb, a, SPRITE_ARROW_SCALE * t);
-       
+
        string txt;
        if(autocvar_g_waypointsprite_spam && waypointsprite_count >= autocvar_g_waypointsprite_spam)
                txt = _("Spam");
index 5ab3da67cff47e58a34f3731b1d330d256bb3526..d9864f4da7e1c73fc7300ee69bb61b3589cc051c 100644 (file)
@@ -63,7 +63,7 @@ float CampaignFile_Load(float offset, float n)
 
                                campaign_entries = campaign_entries + 1;
 
-                               if(campaign_entries >= n)                               
+                               if(campaign_entries >= n)
                                        break;
                        }
                        lineno = lineno + 1;
index 4ca8b3780c3d4950c4644be777260836d8da4c01..5e8accbd2912ece956d6e9bc36cb1e0092b03afd 100644 (file)
@@ -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);
 }
 
@@ -57,12 +57,12 @@ void GenericCommand_addtolist(float request, float argc)
                case CMD_REQUEST_COMMAND:
                {
                        float i;
-                       
+
                        if(argc >= 2)
                        {
                                string original_cvar = argv(1);
                                string tmp_string = argv(2);
-                               
+
                                if(cvar_string(original_cvar) == "") // cvar was empty
                                {
                                        cvar_set(original_cvar, tmp_string);
@@ -70,17 +70,17 @@ void GenericCommand_addtolist(float request, float argc)
                                else // add it to the end of the list if the list doesn't already have it
                                {
                                        argc = tokenizebyseparator(cvar_string(original_cvar), " ");
-                                       
+
                                        for(i = 0; i < argc; ++i)
                                                if(argv(i) == tmp_string)
                                                        return; // already in list
-                                                       
+
                                        cvar_set(original_cvar, strcat(tmp_string, " ", cvar_string(original_cvar)));
                                }
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2addtolist^7\n");
                case CMD_REQUEST_USAGE:
@@ -162,7 +162,7 @@ void GenericCommand_qc_curl(float request, float argc)
 
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -181,33 +181,33 @@ void GenericCommand_dumpcommands(float request)
                        float fh;
                        string filename = strcat(GetProgramCommandPrefix(), "_dump.txt");
                        fh = fopen(filename, FILE_WRITE);
-                       
+
                        if(fh >= 0)
                        {
                                #ifdef SVQC
                                        CMD_Write("dump of server console commands:\n");
                                        GameCommand_macro_write_aliases(fh);
-                                       
+
                                        CMD_Write("\ndump of networked client only commands:\n");
                                        ClientCommand_macro_write_aliases(fh);
-                                       
+
                                        CMD_Write("\ndump of common commands:\n");
                                        CommonCommand_macro_write_aliases(fh);
 
                                        CMD_Write("\ndump of ban commands:\n");
                                        BanCommand_macro_write_aliases(fh);
                                #endif
-                                                               
+
                                #ifdef CSQC
                                        CMD_Write("dump of client commands:\n");
                                        LocalCommand_macro_write_aliases(fh);
                                #endif
-                               
+
                                CMD_Write("\ndump of generic commands:\n");
                                GenericCommand_macro_write_aliases(fh);
-                               
+
                                print("Completed dump of aliases in ^2data/data/", GetProgramCommandPrefix(), "_dump.txt^7.\n");
-                               
+
                                fclose(fh);
                        }
                        else
@@ -216,7 +216,7 @@ void GenericCommand_dumpcommands(float request)
                        }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -236,7 +236,7 @@ void GenericCommand_dumpnotifs(float request)
                        #ifndef MENUQC
                        float fh, alsoprint = FALSE;
                        string filename = argv(1);
-                       
+
                        if(filename == "")
                        {
                                filename = "notifications.cfg";
@@ -248,7 +248,7 @@ void GenericCommand_dumpnotifs(float request)
                                alsoprint = TRUE;
                        }
                        fh = fopen(filename, FILE_WRITE);
-                       
+
                        if(fh >= 0)
                        {
                                Dump_Notifications(fh, alsoprint);
@@ -264,7 +264,7 @@ void GenericCommand_dumpnotifs(float request)
                        #endif
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -285,7 +285,7 @@ void GenericCommand_maplist(float request, float argc)
                {
                        string tmp_string;
                        float i;
-                       
+
                        switch(argv(1))
                        {
                                case "add": // appends new maps to the maplist
@@ -297,63 +297,63 @@ void GenericCommand_maplist(float request, float argc)
                                                        print("maplist: ERROR: ", argv(2), " does not exist!\n");
                                                        break;
                                                }
-                                               
+
                                                if(cvar_string("g_maplist") == "")
                                                        cvar_set("g_maplist", argv(2));
                                                else
                                                        cvar_set("g_maplist", strcat(argv(2), " ", cvar_string("g_maplist")));
-                                                       
+
                                                return;
                                        }
                                        break; // go to usage
                                }
-                               
+
                                case "cleanup": // scans maplist and only adds back the ones which are really usable
                                {
                                        MapInfo_Enumerate();
                                        MapInfo_FilterGametype(MapInfo_CurrentGametype(), MapInfo_CurrentFeatures(), MapInfo_RequiredFlags(), MapInfo_ForbiddenFlags(), 0);
                                        argc = tokenizebyseparator(cvar_string("g_maplist"), " ");
-                                       
+
                                        tmp_string = "";
                                        for(i = 0; i < argc; ++i)
                                                if(MapInfo_CheckMap(argv(i)))
                                                        tmp_string = strcat(tmp_string, " ", argv(i));
-                                                       
+
                                        tmp_string = substring(tmp_string, 1, strlen(tmp_string) - 1);
                                        cvar_set("g_maplist", tmp_string);
-                                       
+
                                        return;
                                }
-                               
+
                                case "remove": // scans maplist and only adds back whatever maps were not provided in argv(2)
                                {
                                        if(argc == 3)
                                        {
                                                argc = tokenizebyseparator(cvar_string("g_maplist"), " ");
-                                               
+
                                                tmp_string = "";
                                                for(i = 0; i < argc; ++i)
                                                        if(argv(i) != argv(2))
                                                                tmp_string = strcat(tmp_string, " ", argv(i));
-                                                               
+
                                                tmp_string = substring(tmp_string, 1, strlen(tmp_string) - 1);
                                                cvar_set("g_maplist", tmp_string);
-                                               
+
                                                return;
                                        }
                                        break; // go to usage
                                }
-                               
+
                                case "shuffle": // randomly shuffle the maplist
                                {
                                        cvar_set("g_maplist", shufflewords(cvar_string("g_maplist")));
                                        return;
                                }
-                                       
+
                                default: break;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2maplist^7\n");
                case CMD_REQUEST_USAGE:
@@ -376,7 +376,7 @@ void GenericCommand_nextframe(float request, float arguments, string command)
                        queue_to_execute_next_frame(substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)));
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -399,21 +399,21 @@ void GenericCommand_removefromlist(float request, float argc)
                                string original_cvar = argv(1);
                                string removal = argv(2);
                                string tmp_string;
-                               
+
                                argc = tokenizebyseparator(cvar_string(original_cvar), " ");
-                               
+
                                tmp_string = "";
                                for(i = 0; i < argc; ++i)
                                        if(argv(i) != removal)
                                                tmp_string = strcat(tmp_string, " ", argv(i));
-                                               
+
                                tmp_string = substring(tmp_string, 1, strlen(tmp_string) - 1);
                                cvar_set(original_cvar, tmp_string);
-                               
+
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2removefromlist^7\n");
                case CMD_REQUEST_USAGE:
@@ -450,7 +450,7 @@ void GenericCommand_restartnotifs(float request)
                                NOTIF_CENTER_COUNT,
                                NOTIF_MULTI_COUNT,
                                NOTIF_CHOICE_COUNT
-                       ));     
+                       ));
                        Destroy_All_Notifications();
                        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
                        #else
@@ -458,7 +458,7 @@ void GenericCommand_restartnotifs(float request)
                        #endif
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -479,7 +479,7 @@ void GenericCommand_settemp(float request, float argc)
                        {
                                float f = cvar_settemp(argv(1), argv(2));
                                if(f == 1)
-                                       dprint("Creating new settemp tracker for ", argv(1), " and setting it to \"", argv(2), "\" temporarily.\n"); 
+                                       dprint("Creating new settemp tracker for ", argv(1), " and setting it to \"", argv(2), "\" temporarily.\n");
                                else if(f == -1)
                                        dprint("Already had a tracker for ", argv(1), ", updating it to \"", argv(2), "\".\n");
                                // else cvar_settemp itself errors out
@@ -507,15 +507,15 @@ void GenericCommand_settemp_restore(float request, float argc)
                case CMD_REQUEST_COMMAND:
                {
                        float i = cvar_settemp_restore();
-                       
+
                        if(i)
                                dprint("Restored ", ftos(i), " temporary cvar settings to their original values.\n");
                        else
                                dprint("Nothing to restore.\n");
-                       
+
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -543,7 +543,7 @@ void GenericCommand_runtest(float request, float argc)
                                TEST_RunAll();
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -561,10 +561,10 @@ void GenericCommand_(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       
+
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -600,10 +600,10 @@ void GenericCommand_macro_help()
 {
        #define GENERIC_COMMAND(name,function,description) \
                { print("  ^2", name, "^7: ", description, "\n"); }
-               
+
        GENERIC_COMMANDS(0, 0, "")
        #undef GENERIC_COMMAND
-       
+
        return;
 }
 
@@ -611,10 +611,10 @@ float GenericCommand_macro_command(float argc, string command)
 {
        #define GENERIC_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
-               
+
        GENERIC_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef GENERIC_COMMAND
-       
+
        return FALSE;
 }
 
@@ -622,10 +622,10 @@ float GenericCommand_macro_usage(float argc)
 {
        #define GENERIC_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
-               
+
        GENERIC_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef GENERIC_COMMAND
-       
+
        return FALSE;
 }
 
@@ -633,18 +633,18 @@ void GenericCommand_macro_write_aliases(float fh)
 {
        #define GENERIC_COMMAND(name,function,description) \
                { CMD_Write_Alias("qc_cmd_svmenu", name, description); }
-       
+
        GENERIC_COMMANDS(0, 0, "")
        #undef GENERIC_COMMAND
-       
+
        return;
 }
-       
+
 
 // ===========================================
 //  Main Common Function For Generic Commands
 // ===========================================
-// Commands spread out among all programs (menu, client, and server) 
+// Commands spread out among all programs (menu, client, and server)
 
 float GenericCommand(string command)
 {
@@ -655,9 +655,9 @@ float GenericCommand(string command)
 
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
-       // argv:   0    - 1      - 2     - 3 
+       // argv:   0    - 1      - 2     - 3
        // cmd     vote - master - login - password
-       
+
        if(GenericCommand_macro_command(argc, command)) // continue as usual and scan for normal commands
        {
                return TRUE; // handled by one of the above GenericCommand_* functions
@@ -713,7 +713,7 @@ float GenericCommand(string command)
                // test case for terencehill's color codes
                s = strdecolorize(substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
                s2 = "";
-               
+
                n = strlen(s);
                j = ((6 * max(1, floor(strlen(s)/32 + random() * 2 - 1))) / n) * (1 - 2 * (random() > 0.5));
                f = random() * 6;
index 7ee3d50649b4b533b0e742c512659d167823a376..a61986a8fb14f0739dfa7bb242ec726e55ae2dee 100644 (file)
@@ -4,12 +4,12 @@
 // =========================================================
 
 // Used by other game command systems for common commands,
-// and it returns true if handled, false if not. 
+// and it returns true if handled, false if not.
 // Note: It tokenizes its input, so be careful!
 float GenericCommand(string command);
 
 // Returns command prefix specific for whatever program it is compiled in
-string GetProgramCommandPrefix(void); 
+string GetProgramCommandPrefix(void);
 
 // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
 #define CMD_Write(s) fputs(fh, s)
index 374d07df17ac8e3ec0b28e5177332ccb3763ef66..223d3264d35fba3bd6cbf9b9ee901e71a7fc3a98 100644 (file)
@@ -3,7 +3,7 @@
 //  Last updated: December 28th, 2011
 // ========================================
 
-string rpn_pop() 
+string rpn_pop()
 {
        if(rpn_sp > 0) {
                --rpn_sp;
@@ -14,7 +14,7 @@ string rpn_pop()
                return "";
        }
 }
-void rpn_push(string s) 
+void rpn_push(string s)
 {
        if(rpn_sp < MAX_RPN_STACK) {
                rpn_stack[rpn_sp] = s;
@@ -24,7 +24,7 @@ void rpn_push(string s)
                rpn_error = TRUE;
        }
 }
-string rpn_get() 
+string rpn_get()
 {
        if(rpn_sp > 0) {
                return rpn_stack[rpn_sp - 1];
@@ -34,7 +34,7 @@ string rpn_get()
                return "";
        }
 }
-void rpn_set(string s) 
+void rpn_set(string s)
 {
        if(rpn_sp > 0) {
                rpn_stack[rpn_sp - 1] = s;
@@ -58,14 +58,14 @@ void GenericCommand_rpn(float request, float argc, string command)
                        float i, j, f, f2, f3, rpnpos;
                        //vector rgb;
                        string s, s2, rpncmd;
-                       
+
                        if(!rpn_db)
                        {
                                rpn_db = db_create();
                                db_put(rpn_db, "stack.pointer", "0");
                                db_put(rpn_db, "stack.pos", "-1");
                        }
-                       
+
                        if(argc >= 2)
                        {
                                rpn_sp = 0;
@@ -287,7 +287,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                        print("rpn: database underflow\n");
                                                }
                                        } else if(rpncmd == "dbget") {
-                                               
+
                                                i = stof(db_get(rpn_db, "stack.pointer"));
                                                if(i)
                                                {
@@ -321,13 +321,13 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                {
                                                        j = stof(db_get(rpn_db, "stack.pointer"));
                                                        i = stof(db_get(rpn_db, "stack.pos"));
-                                                       
+
                                                        if(i < 0)
                                                        {
                                                                i = 0;
                                                                db_put(rpn_db, "stack.pos", "0");
                                                        }
-                                                       
+
                                                        db_put(rpn_db, "stack.pointer", ftos(j+1));
                                                        for(--j; j >= i; --j)
                                                        {
@@ -404,7 +404,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                                i = 0;
                                                        else
                                                                i = stof(s);
-                                                       
+
                                                        j = stof(db_get(rpn_db, "stack.pointer"));
                                                        if(i < 0 || i >= j)
                                                        {
@@ -426,7 +426,7 @@ void GenericCommand_rpn(float request, float argc, string command)
                                                // tokens f..f2 represent s2
                                                // UNION: add all tokens to s that are in s2 but not in s
                                                s = "";
-                                               for(i = 0; i < f; ++i)  
+                                               for(i = 0; i < f; ++i)
                                                        s = strcat(s, " ", argv(i));
                                                for(i = f; i < f2; ++i) {
                                                        for(j = 0; j < f; ++j)
@@ -555,7 +555,7 @@ void GenericCommand_rpn(float request, float argc, string command)
 
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
index b3dafaaf7ba7293813715bb1d1ae0aa673af8f14..55d16953f6a04d4a5e4f9bc8c289b5981654704e 100644 (file)
@@ -327,7 +327,6 @@ const float ATTEN_MAX = 3.984375;
 const float PROJECTILE_ELECTRO = 1;
 const float PROJECTILE_ROCKET = 2;
 const float PROJECTILE_TAG = 3;
-const float PROJECTILE_BULLET = 4;
 const float PROJECTILE_CRYLINK = 5;
 const float PROJECTILE_ELECTRO_BEAM = 6;
 const float PROJECTILE_GRENADE = 7;
@@ -342,11 +341,9 @@ const float PROJECTILE_PORTO_BLUE = 15;
 const float PROJECTILE_HOOKBOMB = 16;
 const float PROJECTILE_HAGAR = 17;
 const float PROJECTILE_HAGAR_BOUNCING = 18;
-const float PROJECTILE_BULLET_GLOWING = 19;
 const float PROJECTILE_CRYLINK_BOUNCING = 20;
 const float PROJECTILE_FIREBALL = 21;
 const float PROJECTILE_FIREMINE = 22;
-const float PROJECTILE_BULLET_GLOWING_TRACER = 23;
 
 const float PROJECTILE_RAPTORCANNON = 24;
 const float PROJECTILE_RAPTORBOMB = 25;
index a74f74e980f467acfe601edf823aab0c60b3ee80..2559bf3acd9ff8e822163d961f61c3e8fbd81d3b 100644 (file)
@@ -50,7 +50,7 @@
                ZCTX(_("CI_SEC^%d seconds")), /* second */ \
                ZCTX(_("CI_THI^%d seconds")), /* third */ \
                ZCTX(_("CI_MUL^%d seconds"))) /* multi */
-               
+
 string count_ordinal(float interval)
 {
        // This function is designed primarily for the English language, it's impossible
@@ -72,7 +72,7 @@ string count_ordinal(float interval)
                }
        }
        else { return sprintf(_("%dth"), interval); }
-       
+
        return "";
 }
 
@@ -88,7 +88,7 @@ string count_fill(float interval, string zeroth, string first, string second, st
        //   1 second
        //   2 seconds
        //   3 seconds
-       //   etc... minutes, hours, days, etc. 
+       //   etc... minutes, hours, days, etc.
 
        switch(floor(interval))
        {
@@ -111,28 +111,28 @@ string process_time(float outputtype, float seconds)
 {
        float tmp_hours = 0, tmp_minutes = 0, tmp_seconds = 0;
        float tmp_years = 0, tmp_weeks = 0, tmp_days = 0;
-       
+
        tmp_seconds = floor(seconds);
 
        if(tmp_seconds)
        {
                tmp_minutes = floor(tmp_seconds / 60);
-               
+
                if(tmp_minutes)
                {
                        tmp_seconds -= (tmp_minutes * 60);
                        tmp_hours = floor(tmp_minutes / 60);
-                       
+
                        if(tmp_hours)
                        {
                                tmp_minutes -= (tmp_hours * 60);
                                tmp_days = floor(tmp_hours / 24);
-                               
+
                                if(tmp_days)
                                {
                                        tmp_hours -= (tmp_days * 24);
                                        tmp_weeks = floor(tmp_days / 7);
-                                       
+
                                        if(tmp_weeks)
                                        {
                                                tmp_days -= (tmp_weeks * 7);
index a9ed986deef9e774a4a3c38b0eaaf50a30dfce82..141bc673f7fd27b07b857ebc2072c0c4630b7b72 100644 (file)
@@ -34,6 +34,9 @@
                CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, glowmod_x, 255, 0, 255) \
                CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, glowmod_y, 255, 0, 255) \
                CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, glowmod_z, 255, 0, 255) \
+               CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, colormod_x, 255, 0, 255) \
+               CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, colormod_y, 255, 0, 255) \
+               CSQCMODEL_PROPERTY_SCALED(256, float, ReadByte, WriteByte, colormod_z, 255, 0, 255) \
        CSQCMODEL_ENDIF \
        CSQCMODEL_IF(isplayer) \
                CSQCMODEL_PROPERTY(128, float, ReadByte, WriteByte, anim_state) \
@@ -45,7 +48,8 @@
                CSQCMODEL_PROPERTY(512, float, ReadChar, WriteChar, anim_upper_action) \
                CSQCMODEL_PROPERTY(512, float, ReadApproxPastTime, WriteApproxPastTime, anim_upper_time) \
                CSQCMODEL_PROPERTY(1024, float, ReadAngle, WriteAngle, v_angle_x) \
-       CSQCMODEL_ENDIF
+       CSQCMODEL_ENDIF \
+       CSQCMODEL_PROPERTY_SCALED(4096, float, ReadByte, WriteByte, scale, 16, 0, 99999999)
 // TODO get rid of colormod/glowmod here, find good solution for nex charge glowmod hack; also get rid of some useless properties on non-players that only exist for CopyBody
 
 // add hook function calls here
index cc7154d4b6a8713de9236413ecdb01adcf2d0db1..4f96f7500eb96fe1faa8a584bdfdbd34de932cf3 100644 (file)
@@ -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); }
index aa906d68418999f3c01518d5ba2546bd2e66c6c5..21263719b32d035697b8d12cb13fe4926cde81c0 100644 (file)
@@ -84,7 +84,7 @@ float MapInfo_Cache_Retrieve(string map)
 
 // GLOB HANDLING (for all BSP files)
 float _MapInfo_globopen;
-float _MapInfo_globcount; 
+float _MapInfo_globcount;
 float _MapInfo_globhandle;
 string _MapInfo_GlobItem(float i)
 {
@@ -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();
@@ -164,7 +164,7 @@ float MapInfo_FilterGametype(float pGametype, float pFeatures, float pFlagsRequi
        }
        MapInfo_count = j + 1;
        MapInfo_ClearTemps();
-       
+
        // sometimes the glob isn't sorted nicely, so fix it here...
        heapsort(MapInfo_count, _MapInfo_FilterList_swap, _MapInfo_FilterList_cmp, world);
 
@@ -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, "}"))
@@ -370,8 +370,6 @@ float _MapInfo_Generate(string pFilename) // 0: failure, 1: ok ent, 2: ok bsp
                        MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_FREEZETAG;
                        MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CA;
                }
-               if(                     diameter < 4096)
-                       MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_ARENA;
                if(spawnpoints >= 12 && diameter > 5120)
                        MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_KEYHUNT;
        }
@@ -416,7 +414,6 @@ string _MapInfo_GetDefault(float t)
                case MAPINFO_TYPE_DOMINATION:      return "200 20 0";
                case MAPINFO_TYPE_CTF:             return "300 20 10 0";
                case MAPINFO_TYPE_LMS:             return "9 20 0";
-               case MAPINFO_TYPE_ARENA:           return "10 20 0";
                case MAPINFO_TYPE_CA:              return "10 20 0";
                case MAPINFO_TYPE_KEYHUNT:         return "1000 20 3 0";
                case MAPINFO_TYPE_ASSAULT:         return "20 0";
@@ -442,7 +439,7 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
 
        if(load_default)
                _MapInfo_Map_ApplyGametype(_MapInfo_GetDefault(pThisType), pWantedType, pThisType, FALSE);
-       
+
        if(pWantedType == MAPINFO_TYPE_ASSAULT || pWantedType == MAPINFO_TYPE_ONSLAUGHT || pWantedType == MAPINFO_TYPE_RACE || pWantedType == MAPINFO_TYPE_CTS) // these modes don't use fraglimit
        {
                cvar_set("fraglimit", "0");
@@ -509,7 +506,7 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
                s = cdr(s);
        }
        */
-       
+
        // rc = timelimit timelimit_qualification laps laps_teamplay
        if(pWantedType == MAPINFO_TYPE_RACE)
        {
@@ -694,7 +691,7 @@ float MapInfo_Type_FromString(string t)
 string MapInfo_Type_ToString(float t)
 {
        entity e;
-       if(t == MAPINFO_TYPE_ALL)     
+       if(t == MAPINFO_TYPE_ALL)
                return "all";
        for(e = MapInfo_Type_first; e; e = e.enemy)
                if(t == e.items)
@@ -735,12 +732,12 @@ void _MapInfo_Parse_Settemp(string pFilename, string acl, float type, string s,
        o = strstrofs(s, "\"", 0);
        if(o >= 0)
                s = substring(s, 0, o);
-       
+
        //   remove // comments
        o = strstrofs(s, "//", 0);
        if(o >= 0)
                s = substring(s, 0, o);
-       
+
        //   remove trailing spaces
        while(substring(s, -1, 1) == " ")
                s = substring(s, 0, -2);
@@ -756,7 +753,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 +781,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 +943,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 +1075,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 +1085,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 +1118,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);
        }
@@ -1251,7 +1248,7 @@ void MapInfo_LoadMap(string s, float reinit)
        //      print("EMERGENCY: can't play the selected map in the given game mode. Falling back to DM.\n");
        //      MapInfo_SwitchGameType(MAPINFO_TYPE_DEATHMATCH);
        //}
-       
+
        cvar_settemp_restore();
        if(reinit)
                localcmd(strcat("\nmap ", s, "\n"));
@@ -1369,11 +1366,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;
index 40fea4fc284f5eba57bda906a25b91d929b726e3..eb93b8de817df90c268d3d4fa51b589bb68a6f18 100644 (file)
@@ -39,9 +39,6 @@ REGISTER_GAMETYPE(_("Deathmatch"),dm,g_dm,DEATHMATCH,"timelimit=20 pointlimit=30
 REGISTER_GAMETYPE(_("Last Man Standing"),lms,g_lms,LMS,"timelimit=20 lives=9 leadlimit=0");
 #define g_lms IS_GAMETYPE(LMS)
 
-REGISTER_GAMETYPE(_("Arena"),arena,g_arena,ARENA,"timelimit=20 pointlimit=10 leadlimit=0");
-#define g_arena IS_GAMETYPE(ARENA)
-
 REGISTER_GAMETYPE(_("Race"),rc,g_race,RACE,"timelimit=20 qualifying_timelimit=5 laplimit=7 teamlaplimit=15 leadlimit=0");
 #define g_race IS_GAMETYPE(RACE)
 
index 625e091dcc68994ca9a3e5bdd8f4a327f3a1cff9..caaae8b4967bfa70c214d998ab05efc5aeacb94b 100644 (file)
@@ -5,10 +5,10 @@ void sv_notice_join_think()
     float argc = tokenizebyseparator(autocvar_sv_join_notices, "|");
     if(argc > 0)
     {
-        float i; 
-        for(i = argc - 1; i >= 0; --i)    
+        float i;
+        for(i = argc - 1; i >= 0; --i)
             sv_notice_to(self.owner, argv(i), autocvar_sv_join_notices_time, FALSE);
-    }    
+    }
     remove(self);
 }
 
@@ -21,7 +21,7 @@ void sv_notice_join()
     entity n = spawn();
     n.owner = self;
     n.think = sv_notice_join_think;
-    n.nextthink = time + 1;    
+    n.nextthink = time + 1;
 }
 
 void sv_notice_to(entity _to, string _notice, float _howlong, float _modal)
@@ -39,7 +39,7 @@ void sv_notice_toall(string _notice, float _howlong, float _modal)
     entity _head;
     FOR_EACH_REALCLIENT(_head)
         sv_notice_to(_head, _notice, _howlong, _modal);
-    
+
 }
 
 #endif // SVQC
@@ -65,52 +65,52 @@ float cl_notice_run()
     entity _notes;
     string _notice;
     float m = FALSE;
-    
+
     _notes = findchain(classname, "sv_notice");
     if(!_notes)
         return FALSE;
     #define M1 30
     #define M2 10
-    
+
     vector v1, v2 = '0 0 0', v3;
     v1 = '1 1 0' * M1;
     v2_x = vid_conwidth - (2 * M1);
     v2_y = vid_conheight - (2 * M1);
-    
+
     drawfill(v1, v2, '0 0 0', 0.5, DRAWFLAG_NORMAL);
     v1 = '1 1 0' * (M1 + M2);
     v2_x = vid_conwidth - (2 * (M1 + M2));
     v2_y = vid_conheight - (2 * (M1 + M2));
     drawfill(v1, v2, '0.5 0.5 0.5', 0.5, DRAWFLAG_NORMAL);
     v3 = v1 + '10 10 0';
-    
+
     #define OUT(s,z) drawcolorcodedstring(v3, s, '1 1 0' * z, 1, DRAWFLAG_NORMAL); v3_y += z + 4
-    
+
     OUT(_("^1Server notices:"), 32);
-    
+
     //drawcolorcodedstring(v1 + '5 5 0', "^1Server notices:", '32 32 0', 1, DRAWFLAG_NORMAL);
     while(_notes)
     {
-   
+
         _notice = sprintf(_("^7%s (^3%d sec left)"), _notes.netname , rint(_notes.alpha - time));
         OUT(_notice, 16);
 
-        if(_notes.skin) 
+        if(_notes.skin)
             m = TRUE;
-        
+
         if(_notes.alpha <= time)
         {
             _notes.think = SUB_Remove;
             _notes.nextthink = time;
         }
-        
-        _notes = _notes.chain;        
+
+        _notes = _notes.chain;
     }
-    
+
     #undef OUT
     #undef M1
     #undef M2
-    
+
     return m;
 }
 
index 09c049681819bc62d57ed5b813393b120141af90..8c297513e72e4f97ac85a42ffa24a5043498ea93 100644 (file)
@@ -88,38 +88,38 @@ string Notification_CheckArgs(
                                { checkargs = sprintf("%sNo client provided!", checkargs); }
                        break;
                }
-               
+
                case NOTIF_ALL_EXCEPT:
                {
                        if(IS_NOT_A_CLIENT(client))
                                { checkargs = sprintf("%sException can't be a non-client!", checkargs); }
                        break;
                }
-               
+
                case NOTIF_ALL:
                {
                        if(client)
                                { checkargs = sprintf("%sEntity provided when world was required!", checkargs); }
                        break;
                }
-               
+
                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); }
                        break;
                }
-               
+
                default: { checkargs = sprintf("%sImproper broadcast: %d!", checkargs, broadcast); break; }
        }
        return checkargs;
@@ -225,12 +225,12 @@ void Destroy_All_Notifications(void)
 {
        entity notif;
        float i;
-       
+
        #define DESTROY_LOOP(type,count) \
                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); \
                }
 
@@ -414,7 +414,7 @@ string Process_Notif_Args(
                                }
                                break;
                        }
-                       case 3: // durcnt 
+                       case 3: // durcnt
                        {
                                if(sel_num == NOTIF_MAX_DURCNT)
                                {
@@ -483,7 +483,7 @@ void Create_Notification_Entity(
        float strnum,
        float flnum,
        /* MSG_ANNCE */
-       float channel, 
+       float channel,
        string snd,
        float vol,
        float position,
@@ -561,7 +561,7 @@ void Create_Notification_Entity(
        notif.nent_type = typeid;
        notif.nent_id = nameid;
        notif.nent_name = strzone(namestring);
-       
+
        string typestring = Get_Notif_TypeName(typeid);
 
        // Other pre-notif-setup requisites
@@ -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 != "")
                                {
@@ -609,7 +609,7 @@ void Create_Notification_Entity(
 
                        break;
                }
-               
+
                case MSG_INFO:
                case MSG_CENTER:
                {
@@ -668,7 +668,7 @@ void Create_Notification_Entity(
                                {
                                        notif.nent_hudargs = strzone(
                                                Process_Notif_Args(2, hudargs, typestring, namestring));
-                                               
+
                                        if(icon != "") { notif.nent_icon = strzone(icon); }
                                        else
                                        {
@@ -700,7 +700,7 @@ void Create_Notification_Entity(
                                {
                                        notif.nent_durcnt = strzone(
                                                Process_Notif_Args(3, durcnt, typestring, namestring));
-                                               
+
                                        if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
                                        else
                                        {
@@ -714,7 +714,7 @@ void Create_Notification_Entity(
                                                ));
                                                notif_error = TRUE;
                                        }
-                               } 
+                               }
                                else if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
                                #endif
 
@@ -740,7 +740,7 @@ void Create_Notification_Entity(
                                        else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL") }
                                }
                                else if(normal != "") { SET_NOTIF_STRING(normal, "NORMAL") }
-                               
+
                                #undef SET_NOTIF_STRING
 
                                // Check to make sure a string was chosen
@@ -780,29 +780,29 @@ void Create_Notification_Entity(
                        {
                                // announcements don't actually need any arguments, so lets not even count them.
                                if(anncename != NO_MSG) { notif.nent_msgannce = msg_annce_notifs[anncename - 1]; }
-                               
+
                                float infoname_stringcount = 0, infoname_floatcount = 0;
                                float centername_stringcount = 0, centername_floatcount = 0;
-                               
+
                                if(infoname != NO_MSG)
                                {
                                        notif.nent_msginfo = msg_info_notifs[infoname - 1];
                                        infoname_stringcount = notif.nent_msginfo.nent_stringcount;
                                        infoname_floatcount = notif.nent_msginfo.nent_floatcount;
                                }
-                               
+
                                if(centername != NO_MSG)
                                {
                                        notif.nent_msgcenter = msg_center_notifs[centername - 1];
                                        centername_stringcount = notif.nent_msgcenter.nent_stringcount;
                                        centername_floatcount = notif.nent_msgcenter.nent_floatcount;
                                }
-                               
+
                                // set the requirements of THIS notification to the totals of its subcalls
                                notif.nent_stringcount = max(infoname_stringcount, centername_stringcount);
                                notif.nent_floatcount = max(infoname_floatcount, centername_floatcount);
                        }
-                       
+
                        break;
                }
 
@@ -848,7 +848,7 @@ void Create_Notification_Entity(
                                                notif.nent_optionb = msg_multi_notifs[optionb - 1];
                                                break;
                                        }
-                                       case MSG_CHOICE: // should we REALLY allow nested options?... 
+                                       case MSG_CHOICE: // should we REALLY allow nested options?...
                                        {
                                                notif.nent_optiona = msg_choice_notifs[optiona - 1];
                                                notif.nent_optionb = msg_choice_notifs[optionb - 1];
@@ -873,7 +873,7 @@ void Create_Notification_Entity(
                                notif.nent_challow_var = challow_var; // 0: never allowed, 1: allowed in warmup, 2: always allowed
                                notif.nent_stringcount = max(notif.nent_optiona.nent_stringcount, notif.nent_optionb.nent_stringcount);
                                notif.nent_floatcount = max(notif.nent_optiona.nent_floatcount, notif.nent_optionb.nent_floatcount);
-                               
+
                                /*#ifdef NOTIFICATIONS_DEBUG
                                Debug_Notification(sprintf(
                                        "Create_Notification_Entity(...): MSG_CHOICE: %s\n%s\n%s\n",
@@ -897,7 +897,7 @@ void Create_Notification_Entity(
                        }
                        break;
                }
-               
+
                default:
                {
                        print(sprintf(
@@ -913,7 +913,7 @@ void Create_Notification_Entity(
                }
        }
 
-       // now check to see if any errors happened 
+       // now check to see if any errors happened
        if(notif_error)
        {
                notif.nent_enabled = FALSE; // disable the notification so it can't cause trouble
@@ -1004,8 +1004,8 @@ 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,