]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Start of uncrusticracy script, and kill trailing whitespace in all sources.
authorRudolf Polzer <divverent@xonotic.org>
Mon, 4 Nov 2013 19:30:42 +0000 (20:30 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Mon, 4 Nov 2013 19:30:42 +0000 (20:30 +0100)
186 files changed:
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/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/counting.qh
qcsrc/common/mapinfo.qc
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/dpdefs/csprogsdefs.qc
qcsrc/dpdefs/dpextensions.qc
qcsrc/dpdefs/menudefs.qc
qcsrc/menu/item/container.c
qcsrc/menu/item/dialog.c
qcsrc/menu/item/inputbox.c
qcsrc/menu/item/nexposee.c
qcsrc/menu/item/tab.c
qcsrc/menu/menu.qc
qcsrc/menu/oo/interface.h
qcsrc/menu/xonotic/checkbox_slider_invalid.c
qcsrc/menu/xonotic/colorpicker.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/gametypelist.c
qcsrc/menu/xonotic/mainwindow.c
qcsrc/menu/xonotic/playerlist.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/menu/xonotic/skinlist.c
qcsrc/menu/xonotic/util.qc
qcsrc/menu/xonotic/weaponslist.c
qcsrc/server-testcase/framework.qc
qcsrc/server/antilag.qc
qcsrc/server/bot/aim.qc
qcsrc/server/bot/navigation.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_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/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.qh
qcsrc/server/mutators/gamemode_arena.qc
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_pinata.qc
qcsrc/server/mutators/mutator_random_gravity.qc
qcsrc/server/mutators/mutator_vampire.qc
qcsrc/server/pathlib/debug.qc
qcsrc/server/pathlib/path_waypoint.qc
qcsrc/server/playerstats.qc
qcsrc/server/race.qc
qcsrc/server/scores.qc
qcsrc/server/secret.qc
qcsrc/server/spawnpoints.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/t_plats.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_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/waypointsprites.qc
qcsrc/uncrusticracy.sh [new file with mode: 0644]
qcsrc/uncrustify.cfg
qcsrc/warpzonelib/server.qc

index e433202562019c496e22e33eb22a318ff6a0f2df..a06eb5e6584e3ac96f48c489b762ee748ce9a127 100644 (file)
@@ -81,7 +81,7 @@ void CSQC_Init(void)
        //registercommand("hud_configure");
        //registercommand("hud_save");
        //registercommand("menu_action");
        //registercommand("hud_configure");
        //registercommand("hud_save");
        //registercommand("menu_action");
-       
+
        ConsoleCommand_macro_init();
 
        registercvar("hud_usecsqc", "1");
        ConsoleCommand_macro_init();
 
        registercvar("hud_usecsqc", "1");
@@ -125,13 +125,13 @@ void CSQC_Init(void)
        turrets_precache();
        Tuba_Precache();
        CSQCPlayer_Precache();
        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"); }
        }
        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;
        get_mi_min_max_texcoords(1); // try the CLEVER way first
        minimapname = strcat("gfx/", mi_shortname, "_radar.tga");
        shortmapname = mi_shortname;
@@ -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();
        spn_origin_x = ReadShort();
        spn_origin_y = ReadShort();
        spn_origin_z = ReadShort();
-       
+
        if(is_new)
        {
                self.origin = spn_origin;
        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"); }
                                }
                        }
                        else { self.cnt = particleeffectnum("spawn_point_neutral"); }
-                       
+
                        self.draw = Spawn_Draw;
                }
        }
                        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();
        // 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();
        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)))
        {
        // local spawn actions
        if(is_new && (!entnum || (entnum == player_localentnum)))
        {
@@ -737,7 +737,7 @@ void Ent_ReadSpawnEvent(float is_new)
                        button_zoom = FALSE;
                }
        }
                        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));
 }
 
        //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_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_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;
                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;
index 486d763daa608f70e4eccb96b1a7121cd8d0c974..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);
        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; }
        }
                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);
                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
        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;
                        }
                }
                                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);
                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
                //print(ftos(avgspeed), " avgspeed, ", ftos(curspeed), " curspeed, ", ftos(velocityzoom), " return\n"); // for debugging
        }
        else
@@ -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();
        }
                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
        // 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
                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)
        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;
                }
 
                        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); }
                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.
                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
                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);
        {
                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);
                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);
        {
                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;
        }
 
                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
                                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 (!autocvar_crosshair_enabled) // main toggle for crosshair rendering
                                return;
                {
                        if (!autocvar_crosshair_enabled) // main toggle for crosshair rendering
                                return;
-                               
+
                        string wcross_style;
                        float wcross_alpha, wcross_resolution;
                        wcross_style = autocvar_crosshair;
                        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(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;
                                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;
                                }
 
                                        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(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;
                                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;
                                }
 
                                        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
                                        {
                                        // 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;
                                                        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;
                                                        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;
                                                }
 
                                                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";
                                        }
                                                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;
                                        {
                                                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";
                                        }
 
                                                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;
                                        {
                                                ring_value = bound(0, weapon_clipload / weapon_clipsize, 1);
                                                ring_scale = autocvar_crosshair_ring_reload_size;
@@ -1435,7 +1435,7 @@ void CSQC_UpdateView(float w, float h)
                                                {
                                                        wcross_ring_prev = ((ring_image) ? TRUE : FALSE);
                                                }
                                                {
                                                        wcross_ring_prev = ((ring_image) ? TRUE : FALSE);
                                                }
-                                               
+
                                                if(wcross_ring_prev)
                                                {
                                                        if(f < 1)
                                                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;
                                {
                                        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);
                                        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;
                                        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(autocvar__hud_configure)
                HUD_Panel_Mouse();
-    
+
     if(hud && !intermission)
     if(hud && !intermission)
-    {        
+    {
         if(hud == HUD_SPIDERBOT)
             CSQC_SPIDER_HUD();
         else if(hud == HUD_WAKIZASHI)
         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();
     }
         else if(hud == HUD_BUMBLEBEE_GUN)
             CSQC_BUMBLE_GUN_HUD();
     }
-       
+
        cl_notice_run();
        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);
        // 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 24be944d288ecb15fe1ef02f8b2f3eb3741317e6..35077496911a9ea8f8f56664068d3cd06437e3f0 100644 (file)
@@ -1,6 +1,6 @@
 float announcer_1min;
 float announcer_5min;
 float announcer_1min;
 float announcer_5min;
-void Announcer_Countdown() 
+void Announcer_Countdown()
 {
        float starttime = getstatf(STAT_GAMESTARTTIME);
        float roundstarttime = getstatf(STAT_ROUNDSTARTTIME);
 {
        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
        {
 
        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;
        }
                remove(self);
                return;
        }
@@ -50,19 +50,19 @@ void Announcer_Countdown()
  * and STAT_FRAGLIMIT to be auto-sent)
  */
  float previous_game_starttime;
  * 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;
 
 {
        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 + 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 (!e)
                {
                        entity e = find(world, classname, "announcer_countdown");
                        if (!e)
@@ -74,35 +74,35 @@ void Announcer_Gamestart()
                        e.nextthink = startTime - floor(startTime - time); //synchronize nextthink to startTime
                }
        }
                        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
        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;
 {
        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)
                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
 
        // 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)
                {
        {
                // 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;
                }
                                || (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
                                || (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
@@ -120,11 +120,11 @@ void Announcer_Time()
        {
                if (announcer_1min)
                {
        {
                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;
                }
                                || (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
                        || (warmup_stage && autocvar_g_warmup_limit > 0 && warmup_timeleft < 60))
                {
                        // if we're in warmup mode, check whether there's a warmup timelimit
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;
 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;
 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
        //   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(t < 0)
                return 0;
-       
+
        if(a)
                if(t <= a)
                        return t / a;
        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(!r)
                return 0;
-       
+
        if(t > r)
                return 0;
        if(t > r)
                return 0;
-       
+
        releaseval = s * (1 - t / r);
 
        if(t < -d)
        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(!s)
                return 0;
-       
+
        // if amp > s, we may be in the attack or in the prolonged decay curve
        releasetime = (1 - amp / s) * r;
 
        // 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(e.bgmscript == "")
                return 1;
-       
+
        if(autocvar_bgmvolume <= 0)
                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");
                        blurtest_radius = stof(argv(2));
                        blurtest_power = stof(argv(3));
                        print("Enabled blurtest\n");
-                       return; 
+                       return;
                }
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                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);
                        float fh;
                        string filename = strcat(MapInfo_Map_bspname, "_scrshot_ent.txt");
                        fh = fopen(filename, FILE_WRITE);
-                       
+
                        if(fh >= 0)
                        {
                                fputs(fh, "{\n");
                        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");
                                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");
                                print("Completed screenshot entity dump in ^2data/data/", MapInfo_Map_bspname, "_scrshot_ent.txt^7.\n");
-                               
+
                                fclose(fh);
                        }
                        else
                                fclose(fh);
                        }
                        else
@@ -136,7 +136,7 @@ void LocalCommand_create_scrshot_ent(float request)
                        }
                        return;
                }
                        }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -155,7 +155,7 @@ void LocalCommand_debugmodel(float request, float argc)
                {
                        string modelname = argv(1);
                        entity debugmodel_entity;
                {
                        string modelname = argv(1);
                        entity debugmodel_entity;
-                       
+
                        debugmodel_entity = spawn();
                        precache_model(modelname);
                        setmodel(debugmodel_entity, modelname);
                        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";
                        debugmodel_entity.angles = view_angles;
                        debugmodel_entity.draw = DrawDebugModel;
                        debugmodel_entity.classname = "debugmodel";
-                       
-                       return; 
+
+                       return;
                }
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -185,18 +185,18 @@ void LocalCommand_handlevote(float request, float argc)
                {
                        float vote_selection;
                        string vote_string;
                {
                        float vote_selection;
                        string vote_string;
-                       
+
                        if(InterpretBoolean(argv(1)))
                        {
                        if(InterpretBoolean(argv(1)))
                        {
-                               vote_selection = 2; 
+                               vote_selection = 2;
                                vote_string = "yes";
                        }
                        else
                        {
                                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
                        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")); }
                                        uid2name_dialog = 0;
                                }
                                else { localcmd(strcat("cmd vote ", vote_string, "\n")); }
-                               
+
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2handlevote^7\n");
                case CMD_REQUEST_USAGE:
                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;
                                }
                                        cvar_set("_hud_configure", ftos(!autocvar__hud_configure));
                                        return;
                                }
-                               
+
                                case "save":
                                {
                                        if(argv(2))
                                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.
                                        }
                                }
                                                break; // go to usage, we're missing the paramater needed here.
                                        }
                                }
-                               
+
                                case "scoreboard_columns_set":
                                {
                                case "scoreboard_columns_set":
                                {
-                                       Cmd_HUD_SetFields(argc); 
+                                       Cmd_HUD_SetFields(argc);
                                        return;
                                }
 
                                        return;
                                }
 
@@ -262,7 +262,7 @@ void LocalCommand_hud(float request, float argc)
                                        Cmd_HUD_Help();
                                        return;
                                }
                                        Cmd_HUD_Help();
                                        return;
                                }
-                               
+
                                case "radar":
                                {
                                        if(argv(2))
                                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:
                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));
                        if(argv(1))
                        {
                                centerprint_hud(argv(1));
-                               return; 
+                               return;
                        }
                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2localprint^7\n");
                case CMD_REQUEST_USAGE:
                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);
                        if(argv(1))
                        {
                                Cmd_MapVote_MapDownload(argc);
-                               return; 
+                               return;
                        }
                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2mv_download^7\n");
                case CMD_REQUEST_USAGE:
                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);
                                // 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);
                                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);
                                localcmd("cmd sentcvar ", thiscvar, " \"", s, "\"\n");
                                strunzone(thiscvar);
-                               return; 
+                               return;
                        }
                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2sendcvar^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2sendcvar^7\n");
                case CMD_REQUEST_USAGE:
@@ -379,10 +379,10 @@ void LocalCommand_(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
        {
                case CMD_REQUEST_COMMAND:
                {
-                       
-                       return; 
+
+                       return;
                }
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                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 */
        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"); } }
 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
        CLIENT_COMMANDS(0, 0)
        #undef CLIENT_COMMAND
-       
+
        return;
 }
 
        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; } }
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
-               
+
        CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc)
        #undef CLIENT_COMMAND
        CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc)
        #undef CLIENT_COMMAND
-       
+
        return FALSE;
 }
 
        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; } }
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
-               
+
        CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc)
        #undef CLIENT_COMMAND
        CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc)
        #undef CLIENT_COMMAND
-       
+
        return FALSE;
 }
 
        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); } }
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(strtolower(description) != "") { CMD_Write_Alias("qc_cmd_cl", name, description); } }
-               
+
        CLIENT_COMMANDS(0, 0)
        #undef CLIENT_COMMAND
        CLIENT_COMMANDS(0, 0)
        #undef CLIENT_COMMAND
-       
+
        return;
 }
 
        return;
 }
 
@@ -468,24 +468,24 @@ void GameCommand(string command)
 
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
 
        // 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
 
        // 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("\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");
                        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;
                        return;
-               } 
+               }
                else if(GenericCommand_macro_usage(argc)) // Instead of trying to call a command, we're going to see detailed information about it
                {
                        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;
                }
                {
                        return;
                }
-       } 
-       else if(GenericCommand(command)) 
+       }
+       else if(GenericCommand(command))
        {
                return; // handled by common/command/generic.qc
        }
        {
                return; // handled by common/command/generic.qc
        }
@@ -503,10 +503,10 @@ void GameCommand(string command)
        {
                return; // handled by one of the above LocalCommand_* functions
        }
        {
                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");
        // 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;
 }
 
        return;
 }
 
@@ -523,7 +523,7 @@ void GameCommand(string command)
        CONSOLE_COMMAND("+showaccuracy", { scoreboard_showaccuracy = TRUE; }) \
        CONSOLE_COMMAND("-showaccuracy", { scoreboard_showaccuracy = FALSE; }) \
        /* nothing */
        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; }) \
 #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
 
        CONSOLE_COMMANDS_NORMAL
        #undef CONSOLE_COMMAND
-       
+
        // then init movement commands
        #ifndef CAMERATEST
        if(isdemo())
        // then init movement commands
        #ifndef CAMERATEST
        if(isdemo())
@@ -565,7 +565,7 @@ void ConsoleCommand_macro_init()
        #ifndef CAMERATEST
        }
        #endif
        #ifndef CAMERATEST
        }
        #endif
-       
+
        return;
 }
 
        return;
 }
 
@@ -573,10 +573,10 @@ float ConsoleCommand_macro_normal(float argc)
 {
        #define CONSOLE_COMMAND(name,execution) \
                { if(name == strtolower(argv(0))) { { execution } return TRUE; } }
 {
        #define CONSOLE_COMMAND(name,execution) \
                { if(name == strtolower(argv(0))) { { execution } return TRUE; } }
-               
+
        CONSOLE_COMMANDS_NORMAL
        #undef CONSOLE_COMMAND
        CONSOLE_COMMANDS_NORMAL
        #undef CONSOLE_COMMAND
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -590,7 +590,7 @@ float ConsoleCommand_macro_movement(float argc)
                CONSOLE_COMMANDS_MOVEMENT
                #undef CONSOLE_COMMAND
        }
                CONSOLE_COMMANDS_MOVEMENT
                #undef CONSOLE_COMMAND
        }
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -612,7 +612,7 @@ float CSQC_ConsoleCommand(string command)
        {
                return TRUE;
        }
        {
                return TRUE;
        }
-       
+
        // Return value should be 1 if CSQC handled the command, otherwise return 0 to have the engine handle it.
 
        return FALSE;
        // 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                                = 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;
 
 // Server Autosent Stat Constants
 const float            STAT_HEALTH                                             = 0;
index 03c7eedd77ab7be6a36f349c7c21c762676a946d..848c632773404b03f3e2b2f5cdea611483e78a17 100644 (file)
@@ -93,7 +93,7 @@ string forceplayermodels_goodmodel;
 float forceplayermodels_goodmodelindex;
 
 .vector glowmod;
 float forceplayermodels_goodmodelindex;
 
 .vector glowmod;
-.vector old_glowmod; 
+.vector old_glowmod;
 
 void CSQCPlayer_ModelAppearance_PreUpdate(void)
 {
 
 void CSQCPlayer_ModelAppearance_PreUpdate(void)
 {
@@ -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;
                        // 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);
                        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;
        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
        if(eff & EF_BRIGHTFIELD)
                self.traileffect = particleeffectnum("TR_NEXUIZPLASMA");
        // ignoring EF_MUZZLEFLASH
index 9f5e32e9569a8d59da70dda7b6030975b5186ddb..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);
        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)
        // 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)
@@ -143,7 +143,7 @@ void Ent_DamageInfo(float isNew)
        }
        else
                forcemul = 1;
        }
        else
                forcemul = 1;
-       
+
        for(self = findradius(w_org, rad + MAX_DAMAGEEXTRARADIUS); self; self = self.chain)
        {
                // attached ents suck
        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;
        }
 
        self = oldself;
-       
+
        if(DEATH_ISVEHICLE(w_deathtype))
        {
                traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
        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));
                        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
                setorigin(self, w_org + w_backoff * 2); // for sound() calls
-               
+
                switch(w_deathtype)
                {
                        case DEATH_VH_CRUSH:
                                break;
                switch(w_deathtype)
                {
                        case DEATH_VH_CRUSH:
                                break;
-                               
+
                        // spiderbot
                        case DEATH_VH_SPID_MINIGUN:
                                string _snd;
                        // 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;
                                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);
                        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;
                                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);
                        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;
                }
        }
                                break;
                }
        }
-       
-       
+
+
        if(DEATH_ISTURRET(w_deathtype))
        {
                string _snd;
        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));
                        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
                setorigin(self, w_org + w_backoff * 2); // for sound() calls
-               
+
                switch(w_deathtype)
                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_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_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:
                         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;
                                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_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_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);
                         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,14 +326,14 @@ void Ent_DamageInfo(float isNew)
 
                         case DEATH_TURRET_PHASER:
                                break;
 
                         case DEATH_TURRET_PHASER:
                                break;
-                               
+
                         case DEATH_TURRET_TESLA:
                                te_smallflash(self.origin);
                                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(!hitplayer || rad) // don't show ground impacts for hitscan weapons if a player was hit
        // TODO spawn particle effects and sounds based on w_deathtype
        if(!DEATH_ISSPECIAL(w_deathtype))
        if(!hitplayer || rad) // don't show ground impacts for hitscan weapons if a player was hit
index 8c4081674795c03ce808a3c616f4b8bfc0c5da88..835d14a1ee6f3b6d9336ae96ffdbef27ac6c6cc6 100644 (file)
@@ -176,7 +176,7 @@ void Ent_GibSplash(float isNew)
        {
                if(cl_gentle_gibs == 2)
                        gentle_prefix = "";
        {
                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)
                        gentle_prefix = "happy_";
        }
        else if(autocvar_cl_particlegibs)
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.
 {
        // I want to draw a quad...
        // from and to are MIDPOINTS.
-       
+
        vector axis, thickdir, A, B, C, D;
        float length_tex;
 
        vector axis, thickdir, A, B, C, D;
        float length_tex;
 
index 293ad379e1d9bd3550a3cc20d7895196a1e754b4..80803df45065361b37fbb5ec73ece797e633e7d5 100644 (file)
@@ -738,8 +738,8 @@ void HUD_Weapons(void)
                        continue;
 
                // figure out the drawing position of 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
                        + eY * row * weapon_size_y);
 
                // draw background behind currently selected weapon
@@ -1543,7 +1543,7 @@ void HUD_HealthArmor(void)
                                        {
                                                float BLINK_FACTOR = 0.15;
                                                float BLINK_BASE = 0.85;
                                        {
                                                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);
                                        }
                                }
                                                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;
        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;
        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;
                        }
                        {
                                break;
                        }
-                       
+
                        attacker = notify_attackers[j];
                        victim = notify_victims[j];
                        icon = notify_icon[j];
                        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_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
                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:
                switch(hud_panel_radar_maximized_zoommode)
                {
                        default:
@@ -1885,7 +1885,7 @@ void HUD_Radar(void)
                                f = 1;
                                break;
                }
                                f = 1;
                                break;
                }
-               
+
                switch(hud_panel_radar_maximized_rotation)
                {
                        case 0:
                switch(hud_panel_radar_maximized_rotation)
                {
                        case 0:
@@ -1914,7 +1914,7 @@ void HUD_Radar(void)
                                f = 1;
                                break;
                }
                                f = 1;
                                break;
                }
-               
+
                switch(hud_panel_radar_rotation)
                {
                        case 0:
                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;
                        score = tm.(teamscores[ts_primary]);
                        if(autocvar__hud_configure)
                                score = 123;
-                       
+
                        if (score > max_fragcount)
                                max_fragcount = score;
 
                        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;
        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
        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
 
 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
 // 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_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 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;
        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;
        }
        if(kaball != kaball_prevstatus)
        {
                kaball_statuschange_time = time;
                kaball_prevstatus = kaball;
        }
-       
+
        vector kaball_pos, kaball_size;
        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;
        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;
        }
                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);
        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_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);
 }
        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);
 }
@@ -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;
                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.
                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;
 
        vector fontsize;
        fontsize = '0.20 0.20 0' * mySize_y;
-       
+
        float a;
        a = panel_fg_alpha;
 
        float a;
        a = panel_fg_alpha;
 
@@ -3795,7 +3795,7 @@ void HUD_InfoMessages(void)
                        }
                }
        }
                        }
                }
        }
-       else 
+       else
        {
                s = _("^7Press ^3ESC ^7to show HUD options.");
                drawInfoMessage(s)
        {
                s = _("^7Press ^3ESC ^7to show HUD options.");
                drawInfoMessage(s)
@@ -3871,7 +3871,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;
        }
                        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 );
        vector vel = (csqcplayer ? csqcplayer.velocity : pmove_vel);
 
        float max_speed = floor( autocvar_hud_panel_physics_speed_max * conversion_factor + 0.5 );
@@ -3894,9 +3894,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 = (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);
                acceleration = acceleration * (1 / max(0.0001, f)) * (0.0254 / 9.80665);
-               
+
                acc_prevspeed = vel;
                acc_prevtime = time;
 
                acc_prevspeed = vel;
                acc_prevtime = time;
 
@@ -4229,9 +4229,9 @@ void HUD_CenterPrint (void)
                if (scoreboard_bottom >= 0.96 * vid_conheight)
                        return;
                vector target_pos;
                if (scoreboard_bottom >= 0.96 * vid_conheight)
                        return;
                vector target_pos;
-               
+
                target_pos = eY * scoreboard_bottom + eX * 0.5 * (vid_conwidth - panel_size_x);
                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);
                if(target_pos_y > panel_pos_y)
                {
                        panel_pos = panel_pos + (target_pos - panel_pos) * sqrt(scoreboard_fade_alpha);
@@ -4288,7 +4288,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)
                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 +4297,21 @@ void HUD_CenterPrint (void)
                        a = (centerprint_expire_time[j] - time) / max(0.0001, autocvar_hud_panel_centerprint_fade_out);
                else
                        a = 0;
                        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
                // 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
                }
                // 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
                // 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';
                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
                if (centerprint_countdown_num[j])
                        n = tokenizebyseparator(strreplace("^COUNT", count_seconds(centerprint_countdown_num[j]), centerprint_messages[j]), "\n");
                else
@@ -4354,15 +4354,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));
                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';
                        if (pos_y < panel_pos_y) // check if the next message can be shown
                        {
                                drawfontscale = '1 1 0';
@@ -4374,7 +4374,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));
                        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';
                        if(pos_y > panel_pos_y + panel_size_y - fontsize_y) // check if the next message can be shown
                        {
                                drawfontscale = '1 1 0';
index be53f450f8bfa8e7481bac044b83ce3bdba5e64c..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_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");
                                        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;
        }
        // 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)
        // let's save them into the cvar by some strcat trickery
        string s = "";
        for(i = 0; i < HUD_PANEL_NUM; ++i)
@@ -1090,7 +1090,7 @@ void HUD_Panel_Mouse()
        if (!autocvar_hud_cursormode)
        {
                mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed;
        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);
        }
                mousepos_x = bound(0, mousepos_x, vid_conwidth);
                mousepos_y = bound(0, mousepos_y, vid_conheight);
        }
index 796db00d8f81b35eb384395ac0f3e9283d5d7b6b..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;
        vector rgb;
        string label;
        float text_size;
-       
+
        isize -= hud_fontsize_y; // respect the text when calculating the image size
 
        rgb = MapVote_RGB(id, count);
        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;
        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);
        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 -= 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;
 
        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;
        vector rgb;
        float text_size;
        string label;
-       
+
        rgb = MapVote_RGB(id, count);
 
        pos_y = pos_y + hud_fontsize_y;
        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);
        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);
 }
        pos_x -= text_size*0.5;
        drawstring(pos, label, hud_fontsize, rgb, 1, DRAWFLAG_NORMAL);
 }
@@ -179,7 +179,7 @@ void MapVote_Draw()
        if (!autocvar_hud_cursormode)
        {
                mv_mousepos = mv_mousepos + getmousepos();
        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);
        }
                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;
        }
                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;
        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;
        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.netname = pk3;
        pak.message = pic;
        pak.sv_entnum = id;
-       
+
        pak.chain = mv_pk3list;
        mv_pk3list = pak;
        pak.chain = mv_pk3list;
        mv_pk3list = pak;
-       
+
        if(pk3 != "")
        {
                localcmd(strcat("\ncurl --pak ", pk3, "; wait; cl_cmd mv_download ", ftos(id), "\n"));
        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();
                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!
        // 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;
        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);
                        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));
                        mv_maps[i] = map;
                        mv_pk3[i] = pk3;
                        map = strzone(strcat(ssdirs[j], "/", map));
index 7f1b893a7c5c28691d5a8ce127ea0bd9ed1d0a8b..9cfc5d0ea9f4cbd912decb0e1698f4bb53e6fae6 100644 (file)
@@ -576,11 +576,11 @@ vector getplayerorigin(float pl)
 float getplayerisdead(float pl)
 {
        entity e;
 float getplayerisdead(float pl)
 {
        entity e;
-       
+
        e = CSQCModel_server2csqc(pl + 1);
        if(e)
                return e.csqcmodel_isdead;
        e = CSQCModel_server2csqc(pl + 1);
        if(e)
                return e.csqcmodel_isdead;
-       
+
        return FALSE;
 }
 
        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;
        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);
        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;
                _Movetype_PushEntity(move, TRUE);
                if(wasfreed(self))
                        return;
-       
+
                if(trace_startsolid)
                {
                        _Movetype_UnstickEntity();
                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;
        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);
        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;
        //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..e00e25e6e4125226bde9bd5da5f5cd0ad4d924f4 100644 (file)
@@ -111,7 +111,7 @@ void Projectile_Draw()
                        case PROJECTILE_NADE_PINK:
                        case PROJECTILE_NADE_BURN:
                        case PROJECTILE_NADE:
                        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
                                break;
                        case PROJECTILE_HOOKBOMB:
                                rot = '1000 0 0'; // forward
@@ -324,7 +324,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_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;
                        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 +467,7 @@ void Ent_Projectile()
                                break;
             case PROJECTILE_WAKIROCKET:
                 loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTEN_NORM);
                                break;
             case PROJECTILE_WAKIROCKET:
                 loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTEN_NORM);
-                               break;            
+                               break;
             /*
             case PROJECTILE_WAKICANNON:
                                break;
             /*
             case PROJECTILE_WAKICANNON:
                                break;
@@ -523,7 +523,7 @@ void Projectile_Precache()
        precache_model("models/rocket.md3");
        precache_model("models/tagrocket.md3");
        precache_model("models/tracer.mdl");
        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");
        precache_model("models/weapons/v_ok_grenade.md3");
 
        precache_sound("weapons/electro_fly.wav");
index 7c79d5c430d33bd32f48d1fc6a42866304936ee6..b037d03d20cb35a4431315f87bc6ade863153b8b 100644 (file)
@@ -586,7 +586,7 @@ string HUD_GetField(entity pl, float field)
                        } else
                                str = sprintf("%.1f", num/denom);
                        return str;
                        } else
                                str = sprintf("%.1f", num/denom);
                        return str;
-                       
+
                case SP_SUM:
                        f = pl.(scores[SP_KILLS]);
                        f -= pl.(scores[SP_DEATHS]);
                case SP_SUM:
                        f = pl.(scores[SP_KILLS]);
                        f -= pl.(scores[SP_DEATHS]);
@@ -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;
        drawstring(pos, value, hud_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
        pos_x = px;
        pos_y+= hud_fontsize_y;
-       
+
        return pos;
 }
 
        return pos;
 }
 
@@ -1104,8 +1104,8 @@ vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) {
        //  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 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;
        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);
        // 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;
        // update position
        pos_y += 1.25 * hud_fontsize_y;
        return pos;
@@ -1316,7 +1316,7 @@ void HUD_DrawScoreboard()
                        pos = HUD_DrawScoreboardAccuracyStats(pos, rgb, bg_size);
        }
 
                        pos = HUD_DrawScoreboardAccuracyStats(pos, rgb, bg_size);
        }
 
-               
+
        if(teamplay)
                pos = HUD_DrawMapStats(pos, Team_ColorRGB(myteam), bg_size);
        else
        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, _(" 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
                        {
                                        (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])));
                                        (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, _(" 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
                        {
                                        (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])));
                                        (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)
                        // 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)
                        str = sprintf(_("^1Respawning in ^3%s^1..."),
                                (autocvar_scoreboard_respawntime_decimals ?
                                        count_seconds_decs(respawn_time - time, autocvar_scoreboard_respawntime_decimals)
index a7824a9b75bdcf10647c543d72d8a4fbb62f2c7d..c581fba428fe42ff44f203da50c94f7f612e8eb1 100644 (file)
@@ -13,7 +13,7 @@ void Draw_ShowNames(entity ent)
 {
        if(!autocvar_hud_shownames)
                return;
 {
        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
 #ifdef COMPAT_XON050_ENGINE
        if((ent.sv_entnum == player_localentnum) || (ent.sv_entnum == spectatee_status)) // ent is me or person i'm spectating
 #else
@@ -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;
        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)
                {
                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;
                // handle tag fading
                float overlap = FALSE, onscreen, crosshairdistance;
                vector o, eo;
-               
+
                o = project_3d_to_2d(ent.origin);
                o = project_3d_to_2d(ent.origin);
-               
+
                if(autocvar_hud_shownames_antioverlap)
                {
                        // fade tag out if another tag that is closer to you overlaps
                if(autocvar_hud_shownames_antioverlap)
                {
                        // fade tag out if another tag that is closer to you overlaps
@@ -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) );
 
                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(autocvar_hud_shownames_crosshairdistance)
                {
                        if(autocvar_hud_shownames_crosshairdistance > crosshairdistance)
                                ent.pointtime = 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.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
                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.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
                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
                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;
 
                if(!ent.alpha)
                        return;
-               
+
                float dist;
                dist = vlen(ent.origin - view_origin);
 
                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;
                setorigin(e, getplayerorigin(i));
                if(e.origin == GETPLAYERORIGIN_ERROR)
                        continue;
-                       
+
                e.csqcmodel_isdead = getplayerisdead(i);
 
                Draw_ShowNames(e);
                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)
 }
 
 void turret_precache(float _tid)
-{    
+{
     if (!turret_is_precache[TID_COMMON])
     {
         precache_sound ("weapons/rocket_impact.wav");
     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");
     {
         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:
             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");
             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;
             precache_model ("models/turrets/walker_body.md3");
             precache_sound ("weapons/uzi_fire.wav");
             break;
-    }    
+    }
     turret_is_precache[_tid] = TRUE;
 }
 
     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;
             tid2info_min = '-70 -70 0';
             tid2info_max = '70 70 95';
             break;
-    }    
+    }
 }
 
 void turret_remove()
 }
 
 void turret_remove()
-{    
+{
     remove(self.tur_head);
     //remove(self.enemy);
     remove(self.tur_head);
     //remove(self.enemy);
-    self.tur_head = world;    
+    self.tur_head = world;
 }
 
 .vector glowmod;
 void turret_changeteam()
 }
 
 .vector glowmod;
 void turret_changeteam()
-{      
+{
        switch(self.team - 1)
        {
         case NUM_TEAM_1: // Red
        switch(self.team - 1)
        {
         case NUM_TEAM_1: // Red
@@ -183,46 +183,46 @@ void turret_changeteam()
             self.teamradar_color = '1 0 1';
             break;
        }
             self.teamradar_color = '1 0 1';
             break;
        }
-       
+
        if(self.team)
         self.colormap = 1024 + (self.team - 1) * 17;
        if(self.team)
         self.colormap = 1024 + (self.team - 1) * 17;
-       
+
        self.tur_head.colormap = self.colormap;
        self.tur_head.glowmod = self.glowmod;
        self.tur_head.colormap = self.colormap;
        self.tur_head.glowmod = self.glowmod;
-       
+
 }
 
 void turret_head_draw()
 }
 
 void turret_head_draw()
-{    
+{
     self.drawmask = MASK_NORMAL;
 }
 
 void turret_draw()
     self.drawmask = MASK_NORMAL;
 }
 
 void turret_draw()
-{        
+{
     float dt;
 
     dt = time - self.move_time;
     self.move_time = time;
     if(dt <= 0)
         return;
     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();
     self.tur_head.angles += dt * self.tur_head.move_avelocity;
 
     if (self.health < 127)
     {
         dt = random();
-        
+
         if(dt < 0.03)
         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 < 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)
     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(self.netname == "")
            return;
-       
+
        if(!autocvar_g_waypointsprite_turrets)
                return;
        if(!autocvar_g_waypointsprite_turrets)
                return;
-               
+
     if(autocvar_cl_hidewaypoints)
     if(autocvar_cl_hidewaypoints)
-        return; 
+        return;
 
        float dist = vlen(self.origin - view_origin);
 
        float dist = vlen(self.origin - view_origin);
-    float t = (GetPlayerColor(player_localnum) + 1);   
+    float t = (GetPlayerColor(player_localnum) + 1);
 
        vector o;
        string txt;
 
        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(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)
         || 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:
             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";
                         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;
             }
         }
        }
                     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;
 
        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);
 
        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)
        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';
        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;
        }
 
        txt = self.netname;
@@ -299,18 +299,18 @@ void turret_draw2d()
                txt = _("Spam");
        else
                txt = spritelookuptext(spriteimage);
                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);
        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);
        }
                else
                        a *= spritelookupblinkvalue(spriteimage);
        }
-       
+
        if(autocvar_g_waypointsprite_uppercase)
                txt = strtoupper(txt);
 
        if(autocvar_g_waypointsprite_uppercase)
                txt = strtoupper(txt);
 
@@ -322,23 +322,23 @@ void turret_draw2d()
 
        if(a <= 0)
            return;
 
        if(a <= 0)
            return;
-               
+
        rgb = fixrgbexcess(rgb);
 
        o = project_3d_to_2d(self.origin + '0 0 64');
        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;
        || 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)),
        (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);
        (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)));
        }
 
                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,
     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()
 }
 
 void turret_walker_draw()
-{        
+{
     float dt;
     float dt;
-            
+
     dt = time - self.move_time;
     self.move_time = time;
     if(dt <= 0)
         return;
     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;
     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)
     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()
 }
 
 void turret_ewheel_draw()
-{        
+{
     float dt;
     float dt;
-            
+
     dt = time - self.move_time;
     self.move_time = time;
     if(dt <= 0)
         return;
     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;
     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)
     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()
 }
 
 void(entity e, entity tagentity, string tagname) setattachment = #443;
 void turret_construct()
-{    
+{
     if(self.tur_head == world)
         self.tur_head = spawn();
     if(self.tur_head == world)
         self.tur_head = spawn();
-    
+
     turret_tid2info(self.turret_type);
     self.netname = tid2info_name;
 
     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');
     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");
     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;
     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.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.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;
     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;
     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:
         switch(self.turret_type)
         {
             case TID_EWHEEL:
@@ -476,8 +476,8 @@ void turret_construct()
             case TID_WALKER:
                 self.draw               = turret_walker_draw;
                 break;
             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);
 void turret_gib_draw()
 {
     Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
-    
+
     self.drawmask = MASK_NORMAL;
     self.drawmask = MASK_NORMAL;
-       
+
        if(self.cnt)
        {
            if(time >= self.nextthink)
        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)
        {
         self.alpha = bound(0, self.nextthink - time, 1);
         if(self.alpha < ALPHA_MIN_VISIBLE)
-            remove(self);          
+            remove(self);
        }
 }
 
 void turret_gibboom()
 {
     float i;
        }
 }
 
 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);
 
     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;
 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;
     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 = 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;
     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);
     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.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";
        gib.move_avelocity  = prandomvec() * 32;
        gib.move_time       = time;
        gib.damageforcescale = 1;
        gib.classname = "turret_gib";
-       
+
        return gib;
 }
 
 void turret_die()
        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);
     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
         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)
             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);
                 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.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");
 }
     setmodel(self, "null");
     setmodel(self.tur_head, "null");
 }
@@ -600,63 +600,63 @@ void ent_turret()
     sf = ReadByte();
 
        if(sf & TNSF_SETUP)
     sf = ReadByte();
 
        if(sf & TNSF_SETUP)
-       {           
+       {
            self.turret_type = ReadByte();
            self.turret_type = ReadByte();
-                   
+
            self.origin_x = ReadCoord();
            self.origin_y = ReadCoord();
            self.origin_z = ReadCoord();
            setorigin(self, self.origin);
            self.origin_x = ReadCoord();
            self.origin_y = ReadCoord();
            self.origin_z = ReadCoord();
            setorigin(self, self.origin);
-           
+
            self.angles_x = ReadAngle();
            self.angles_y = ReadAngle();
            self.angles_x = ReadAngle();
            self.angles_y = ReadAngle();
-           
+
            turret_precache(self.turret_type);
            turret_construct();
            self.colormap = 1024;
            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;
     }
            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();
     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;
     }
         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();
     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_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);
     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.velocity_x = ReadShort();
         self.velocity_y = ReadShort();
         self.velocity_z = ReadShort();
-        
+
         self.move_angles_y = ReadShort();
         self.move_angles_y = ReadShort();
-            
+
         self.move_time     = time;
         self.move_velocity = self.velocity;
         self.move_origin   = self.origin;
     }
         self.move_time     = time;
         self.move_velocity = self.velocity;
         self.move_origin   = self.origin;
     }
-        
+
     if(sf & TNSF_ANIM)
     {
         self.frame1time = ReadCoord();
     if(sf & TNSF_ANIM)
     {
         self.frame1time = ReadCoord();
@@ -668,18 +668,18 @@ void ent_turret()
         float _tmp;
         _tmp = ReadByte();
         if(_tmp != self.team)
         float _tmp;
         _tmp = ReadByte();
         if(_tmp != self.team)
-        {            
-            self.team = _tmp;                
+        {
+            self.team = _tmp;
             turret_changeteam();
         }
             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;
         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;
 }
     //self.enemy.health = self.health / 255;
 }
index 6efc2f953a4fc839f315e581571d80e5676380eb..d8727e1760b4a05941246d7a96a5c0dcf13fb8de 100644 (file)
@@ -103,7 +103,7 @@ void Net_AuXair2(float bIsNew)
         axh.alpha                      = 1;
                AuxiliaryXhair[axh_id] = axh;
     }
         axh.alpha                      = 1;
                AuxiliaryXhair[axh_id] = axh;
     }
-    
+
        axh.move_origin_x       = ReadCoord();
        axh.move_origin_y       = ReadCoord();
        axh.move_origin_z       = ReadCoord();
        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.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;
 }
 
 void Net_VehicleSetup()
 {
 
     float i;
-    
+
     float hud_id = ReadByte();
     float hud_id = ReadByte();
-    
+
     // Weapon update?
     if(hud_id > HUD_VEHICLE_LAST)
     {
         weapon2mode = hud_id - HUD_VEHICLE_LAST;
         return;
     }
     // 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);
     // 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;
     }
         return;
     }
-    
+
     hud_id  = bound(HUD_VEHICLE_FIRST, hud_id, HUD_VEHICLE_LAST);
 
     // Init auxiliary crosshairs
     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;
             // 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;
             // 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;
             // 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";
         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;
 
     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);
     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);
     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);
         }
             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);
         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);
     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;
         {
             sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm1time = 0;
-        }        
+        }
     }
 
 // Shield bar
     }
 
 // 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)
     {
         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;
         }
     }
             sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm2time = 0;
         }
     }
-    
+
        ammo1 *= 0.01;
        ammo2 *= 0.01;
        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;
 // 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)
        {
 // 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);
        }
                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;
 // ..  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);
         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;
 // 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)
        {
 // 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);
        }
                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);
     }
         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()
 }
 
 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;
 
     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);
     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);
 
     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);
         }
             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);
         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);
     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;
         {
             sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTEN_NONE);
             alarm1time = 0;
-        }        
+        }
     }
 
 // Shield bar
     }
 
 // 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)
     {
         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;
         }
     }
             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();
 // 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;
 // ..  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
     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);
     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);
         {
             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);
         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);
     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;
         {
             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;
     }
 // 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)
     {
         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;
         }
             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);
         }
             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);
         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);
     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)
     {
         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;
         }
     }
             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;
 // 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);
         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";
     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";
     else
     {
         raptor_xhair =  "gfx/vehicles/axh-ring.tga";
-        
+
         // Bombing crosshair
         if(!dropmark)
         {
         // Bombing crosshair
         if(!dropmark)
         {
@@ -835,7 +835,7 @@ void CSQC_RAPTOR_HUD()
             }
         }
     }
             }
         }
     }
-    
+
        if (scoreboard_showscores)
                HUD_DrawScoreboard();
     else
        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);
         }
             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);
         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);
     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;
         {
             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;
 
 // 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)
     {
         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;
         }
     }
             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;
 // 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_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");
 }
        precache_sound ("vehicles/alarm.wav");
        precache_sound ("vehicles/alarm_shield.wav");
 }
@@ -1000,12 +1000,12 @@ void Vehicles_Precache()
 void RaptorCBShellfragDraw()
 {
        if(wasfreed(self))
 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;
        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);
 
        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;
 void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
 {
     entity sfrag;
-    
+
     sfrag = spawn();
     setmodel(sfrag, "models/vehicles/clusterbomb_fragment.md3");
     setorigin(sfrag, _org);
     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';
        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);
        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;
                return;
 
        ++waypointsprite_newcount;
-       
+
        float dist;
        dist = vlen(self.origin - view_origin);
        float dist;
        dist = vlen(self.origin - view_origin);
-       
+
        float a;
        a = self.alpha * autocvar_hud_panel_fg_alpha;
 
        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';
        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)
        }
 
        if(time - floor(time) > 0.5)
@@ -483,10 +483,10 @@ void Draw_WaypointSprite()
        float ang;
 
        o = project_3d_to_2d(self.origin);
        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
        || 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;
        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)),
        (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;
        (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);
        }
 
        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");
        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;
 
 
                                campaign_entries = campaign_entries + 1;
 
-                               if(campaign_entries >= n)                               
+                               if(campaign_entries >= n)
                                        break;
                        }
                        lineno = lineno + 1;
                                        break;
                        }
                        lineno = lineno + 1;
index d119bd25be1d10eebe07350b5cf7170a94afcafd..5e8accbd2912ece956d6e9bc36cb1e0092b03afd 100644 (file)
@@ -57,12 +57,12 @@ void GenericCommand_addtolist(float request, float argc)
                case CMD_REQUEST_COMMAND:
                {
                        float i;
                case CMD_REQUEST_COMMAND:
                {
                        float i;
-                       
+
                        if(argc >= 2)
                        {
                                string original_cvar = argv(1);
                                string tmp_string = argv(2);
                        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);
                                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), " ");
                                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
                                        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;
                        }
                }
                                        cvar_set(original_cvar, strcat(tmp_string, " ", cvar_string(original_cvar)));
                                }
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2addtolist^7\n");
                case CMD_REQUEST_USAGE:
                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;
                }
 
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                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);
                        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);
                        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 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
                                        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
                                #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);
                                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");
                                print("Completed dump of aliases in ^2data/data/", GetProgramCommandPrefix(), "_dump.txt^7.\n");
-                               
+
                                fclose(fh);
                        }
                        else
                                fclose(fh);
                        }
                        else
@@ -216,7 +216,7 @@ void GenericCommand_dumpcommands(float request)
                        }
                        return;
                }
                        }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -236,7 +236,7 @@ void GenericCommand_dumpnotifs(float request)
                        #ifndef MENUQC
                        float fh, alsoprint = FALSE;
                        string filename = argv(1);
                        #ifndef MENUQC
                        float fh, alsoprint = FALSE;
                        string filename = argv(1);
-                       
+
                        if(filename == "")
                        {
                                filename = "notifications.cfg";
                        if(filename == "")
                        {
                                filename = "notifications.cfg";
@@ -248,7 +248,7 @@ void GenericCommand_dumpnotifs(float request)
                                alsoprint = TRUE;
                        }
                        fh = fopen(filename, FILE_WRITE);
                                alsoprint = TRUE;
                        }
                        fh = fopen(filename, FILE_WRITE);
-                       
+
                        if(fh >= 0)
                        {
                                Dump_Notifications(fh, alsoprint);
                        if(fh >= 0)
                        {
                                Dump_Notifications(fh, alsoprint);
@@ -264,7 +264,7 @@ void GenericCommand_dumpnotifs(float request)
                        #endif
                        return;
                }
                        #endif
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -285,7 +285,7 @@ void GenericCommand_maplist(float request, float argc)
                {
                        string tmp_string;
                        float i;
                {
                        string tmp_string;
                        float i;
-                       
+
                        switch(argv(1))
                        {
                                case "add": // appends new maps to the maplist
                        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;
                                                }
                                                        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")));
                                                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
                                }
                                                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"), " ");
                                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 = "";
                                        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);
                                        tmp_string = substring(tmp_string, 1, strlen(tmp_string) - 1);
                                        cvar_set("g_maplist", tmp_string);
-                                       
+
                                        return;
                                }
                                        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"), " ");
                                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 = "";
                                                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);
                                                tmp_string = substring(tmp_string, 1, strlen(tmp_string) - 1);
                                                cvar_set("g_maplist", tmp_string);
-                                               
+
                                                return;
                                        }
                                        break; // go to usage
                                }
                                                return;
                                        }
                                        break; // go to usage
                                }
-                               
+
                                case "shuffle": // randomly shuffle the maplist
                                {
                                        cvar_set("g_maplist", shufflewords(cvar_string("g_maplist")));
                                        return;
                                }
                                case "shuffle": // randomly shuffle the maplist
                                {
                                        cvar_set("g_maplist", shufflewords(cvar_string("g_maplist")));
                                        return;
                                }
-                                       
+
                                default: break;
                        }
                }
                                default: break;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2maplist^7\n");
                case CMD_REQUEST_USAGE:
                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;
                }
                        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:
                {
                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;
                                string original_cvar = argv(1);
                                string removal = argv(2);
                                string tmp_string;
-                               
+
                                argc = tokenizebyseparator(cvar_string(original_cvar), " ");
                                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 = "";
                                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);
                                tmp_string = substring(tmp_string, 1, strlen(tmp_string) - 1);
                                cvar_set(original_cvar, tmp_string);
-                               
+
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2removefromlist^7\n");
                case CMD_REQUEST_USAGE:
                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
                                NOTIF_CENTER_COUNT,
                                NOTIF_MULTI_COUNT,
                                NOTIF_CHOICE_COUNT
-                       ));     
+                       ));
                        Destroy_All_Notifications();
                        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
                        #else
                        Destroy_All_Notifications();
                        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
                        #else
@@ -458,7 +458,7 @@ void GenericCommand_restartnotifs(float request)
                        #endif
                        return;
                }
                        #endif
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                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)
                        {
                                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
                                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();
                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");
                        if(i)
                                dprint("Restored ", ftos(i), " temporary cvar settings to their original values.\n");
                        else
                                dprint("Nothing to restore.\n");
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -543,7 +543,7 @@ void GenericCommand_runtest(float request, float argc)
                                TEST_RunAll();
                        return;
                }
                                TEST_RunAll();
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -561,10 +561,10 @@ void GenericCommand_(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
        {
                case CMD_REQUEST_COMMAND:
                {
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                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"); }
 {
        #define GENERIC_COMMAND(name,function,description) \
                { print("  ^2", name, "^7: ", description, "\n"); }
-               
+
        GENERIC_COMMANDS(0, 0, "")
        #undef GENERIC_COMMAND
        GENERIC_COMMANDS(0, 0, "")
        #undef GENERIC_COMMAND
-       
+
        return;
 }
 
        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; } }
 {
        #define GENERIC_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
-               
+
        GENERIC_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef GENERIC_COMMAND
        GENERIC_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef GENERIC_COMMAND
-       
+
        return FALSE;
 }
 
        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; } }
 {
        #define GENERIC_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
-               
+
        GENERIC_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef GENERIC_COMMAND
        GENERIC_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef GENERIC_COMMAND
-       
+
        return FALSE;
 }
 
        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); }
 {
        #define GENERIC_COMMAND(name,function,description) \
                { CMD_Write_Alias("qc_cmd_svmenu", name, description); }
-       
+
        GENERIC_COMMANDS(0, 0, "")
        #undef GENERIC_COMMAND
        GENERIC_COMMANDS(0, 0, "")
        #undef GENERIC_COMMAND
-       
+
        return;
 }
        return;
 }
-       
+
 
 // ===========================================
 //  Main Common Function For Generic Commands
 // ===========================================
 
 // ===========================================
 //  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)
 {
 
 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
 
        // 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
        // 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
        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 = "";
                // 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;
                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,
 // =========================================================
 
 // 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
 // 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)
 
 // 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
 // ========================================
 
 //  Last updated: December 28th, 2011
 // ========================================
 
-string rpn_pop() 
+string rpn_pop()
 {
        if(rpn_sp > 0) {
                --rpn_sp;
 {
        if(rpn_sp > 0) {
                --rpn_sp;
@@ -14,7 +14,7 @@ string rpn_pop()
                return "";
        }
 }
                return "";
        }
 }
-void rpn_push(string s) 
+void rpn_push(string s)
 {
        if(rpn_sp < MAX_RPN_STACK) {
                rpn_stack[rpn_sp] = s;
 {
        if(rpn_sp < MAX_RPN_STACK) {
                rpn_stack[rpn_sp] = s;
@@ -24,7 +24,7 @@ void rpn_push(string s)
                rpn_error = TRUE;
        }
 }
                rpn_error = TRUE;
        }
 }
-string rpn_get() 
+string rpn_get()
 {
        if(rpn_sp > 0) {
                return rpn_stack[rpn_sp - 1];
 {
        if(rpn_sp > 0) {
                return rpn_stack[rpn_sp - 1];
@@ -34,7 +34,7 @@ string rpn_get()
                return "";
        }
 }
                return "";
        }
 }
-void rpn_set(string s) 
+void rpn_set(string s)
 {
        if(rpn_sp > 0) {
                rpn_stack[rpn_sp - 1] = 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;
                        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(!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;
                        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") {
                                                        print("rpn: database underflow\n");
                                                }
                                        } else if(rpncmd == "dbget") {
-                                               
+
                                                i = stof(db_get(rpn_db, "stack.pointer"));
                                                if(i)
                                                {
                                                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"));
                                                {
                                                        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");
                                                        }
                                                        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)
                                                        {
                                                        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);
                                                                i = 0;
                                                        else
                                                                i = stof(s);
-                                                       
+
                                                        j = stof(db_get(rpn_db, "stack.pointer"));
                                                        if(i < 0 || i >= j)
                                                        {
                                                        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 = "";
                                                // 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)
                                                        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;
                }
 
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
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 */
                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
 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); }
                }
        }
        else { return sprintf(_("%dth"), interval); }
-       
+
        return "";
 }
 
        return "";
 }
 
@@ -88,7 +88,7 @@ string count_fill(float interval, string zeroth, string first, string second, st
        //   1 second
        //   2 seconds
        //   3 seconds
        //   1 second
        //   2 seconds
        //   3 seconds
-       //   etc... minutes, hours, days, etc. 
+       //   etc... minutes, hours, days, etc.
 
        switch(floor(interval))
        {
 
        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;
 {
        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);
        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_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_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_days)
                                {
                                        tmp_hours -= (tmp_days * 24);
                                        tmp_weeks = floor(tmp_days / 7);
-                                       
+
                                        if(tmp_weeks)
                                        {
                                                tmp_days -= (tmp_weeks * 7);
                                        if(tmp_weeks)
                                        {
                                                tmp_days -= (tmp_weeks * 7);
index 78c3b750d83b6008357bfe942108d5c5b34cdd96..322c7ba5190e7e520367a337cdf779d5bfdf2edf 100644 (file)
@@ -84,7 +84,7 @@ float MapInfo_Cache_Retrieve(string map)
 
 // GLOB HANDLING (for all BSP files)
 float _MapInfo_globopen;
 
 // GLOB HANDLING (for all BSP files)
 float _MapInfo_globopen;
-float _MapInfo_globcount; 
+float _MapInfo_globcount;
 float _MapInfo_globhandle;
 string _MapInfo_GlobItem(float i)
 {
 float _MapInfo_globhandle;
 string _MapInfo_GlobItem(float i)
 {
@@ -164,7 +164,7 @@ float MapInfo_FilterGametype(float pGametype, float pFeatures, float pFlagsRequi
        }
        MapInfo_count = j + 1;
        MapInfo_ClearTemps();
        }
        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);
 
        // sometimes the glob isn't sorted nicely, so fix it here...
        heapsort(MapInfo_count, _MapInfo_FilterList_swap, _MapInfo_FilterList_cmp, world);
 
@@ -442,7 +442,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(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");
        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 +509,7 @@ void _MapInfo_Map_ApplyGametype(string s, float pWantedType, float pThisType, fl
                s = cdr(s);
        }
        */
                s = cdr(s);
        }
        */
-       
+
        // rc = timelimit timelimit_qualification laps laps_teamplay
        if(pWantedType == MAPINFO_TYPE_RACE)
        {
        // rc = timelimit timelimit_qualification laps laps_teamplay
        if(pWantedType == MAPINFO_TYPE_RACE)
        {
@@ -694,7 +694,7 @@ float MapInfo_Type_FromString(string t)
 string MapInfo_Type_ToString(float t)
 {
        entity e;
 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)
                return "all";
        for(e = MapInfo_Type_first; e; e = e.enemy)
                if(t == e.items)
@@ -735,12 +735,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);
        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 // 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);
        //   remove trailing spaces
        while(substring(s, -1, 1) == " ")
                s = substring(s, 0, -2);
@@ -1251,7 +1251,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);
        //}
        //      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"));
        cvar_settemp_restore();
        if(reinit)
                localcmd(strcat("\nmap ", s, "\n"));
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 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);
             sv_notice_to(self.owner, argv(i), autocvar_sv_join_notices_time, FALSE);
-    }    
+    }
     remove(self);
 }
 
     remove(self);
 }
 
@@ -21,7 +21,7 @@ void sv_notice_join()
     entity n = spawn();
     n.owner = self;
     n.think = sv_notice_join_think;
     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)
 }
 
 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);
     entity _head;
     FOR_EACH_REALCLIENT(_head)
         sv_notice_to(_head, _notice, _howlong, _modal);
-    
+
 }
 
 #endif // SVQC
 }
 
 #endif // SVQC
@@ -65,52 +65,52 @@ float cl_notice_run()
     entity _notes;
     string _notice;
     float m = FALSE;
     entity _notes;
     string _notice;
     float m = FALSE;
-    
+
     _notes = findchain(classname, "sv_notice");
     if(!_notes)
         return FALSE;
     #define M1 30
     #define M2 10
     _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);
     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';
     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
     #define OUT(s,z) drawcolorcodedstring(v3, s, '1 1 0' * z, 1, DRAWFLAG_NORMAL); v3_y += z + 4
-    
+
     OUT(_("^1Server notices:"), 32);
     OUT(_("^1Server notices:"), 32);
-    
+
     //drawcolorcodedstring(v1 + '5 5 0', "^1Server notices:", '32 32 0', 1, DRAWFLAG_NORMAL);
     while(_notes)
     {
     //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);
 
         _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;
             m = TRUE;
-        
+
         if(_notes.alpha <= time)
         {
             _notes.think = SUB_Remove;
             _notes.nextthink = time;
         }
         if(_notes.alpha <= time)
         {
             _notes.think = SUB_Remove;
             _notes.nextthink = time;
         }
-        
-        _notes = _notes.chain;        
+
+        _notes = _notes.chain;
     }
     }
-    
+
     #undef OUT
     #undef M1
     #undef M2
     #undef OUT
     #undef M1
     #undef M2
-    
+
     return m;
 }
 
     return m;
 }
 
index 8c675fb12fe504112bae39107918604891e089a7..8c297513e72e4f97ac85a42ffa24a5043498ea93 100644 (file)
@@ -88,21 +88,21 @@ string Notification_CheckArgs(
                                { checkargs = sprintf("%sNo client provided!", checkargs); }
                        break;
                }
                                { 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_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_ALL:
                {
                        if(client)
                                { checkargs = sprintf("%sEntity provided when world was required!", checkargs); }
                        break;
                }
-               
+
                case NOTIF_TEAM:
                {
                        if (!teamplay)
                case NOTIF_TEAM:
                {
                        if (!teamplay)
@@ -110,7 +110,7 @@ string Notification_CheckArgs(
                        //else if (!client.team) { checkargs = sprintf("%sNo team provided!", checkargs); }
                        break;
                }
                        //else if (!client.team) { checkargs = sprintf("%sNo team provided!", checkargs); }
                        break;
                }
-               
+
                case NOTIF_TEAM_EXCEPT:
                {
                        if (!teamplay)
                case NOTIF_TEAM_EXCEPT:
                {
                        if (!teamplay)
@@ -119,7 +119,7 @@ string Notification_CheckArgs(
                                { checkargs = sprintf("%sException can't be a non-client!", checkargs); }
                        break;
                }
                                { checkargs = sprintf("%sException can't be a non-client!", checkargs); }
                        break;
                }
-               
+
                default: { checkargs = sprintf("%sImproper broadcast: %d!", checkargs, broadcast); break; }
        }
        return checkargs;
                default: { checkargs = sprintf("%sImproper broadcast: %d!", checkargs, broadcast); break; }
        }
        return checkargs;
@@ -225,7 +225,7 @@ void Destroy_All_Notifications(void)
 {
        entity notif;
        float i;
 {
        entity notif;
        float i;
-       
+
        #define DESTROY_LOOP(type,count) \
                for(i = 1; i <= count; ++i) \
                { \
        #define DESTROY_LOOP(type,count) \
                for(i = 1; i <= count; ++i) \
                { \
@@ -414,7 +414,7 @@ string Process_Notif_Args(
                                }
                                break;
                        }
                                }
                                break;
                        }
-                       case 3: // durcnt 
+                       case 3: // durcnt
                        {
                                if(sel_num == NOTIF_MAX_DURCNT)
                                {
                        {
                                if(sel_num == NOTIF_MAX_DURCNT)
                                {
@@ -483,7 +483,7 @@ void Create_Notification_Entity(
        float strnum,
        float flnum,
        /* MSG_ANNCE */
        float strnum,
        float flnum,
        /* MSG_ANNCE */
-       float channel, 
+       float channel,
        string snd,
        float vol,
        float position,
        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);
        notif.nent_type = typeid;
        notif.nent_id = nameid;
        notif.nent_name = strzone(namestring);
-       
+
        string typestring = Get_Notif_TypeName(typeid);
 
        // Other pre-notif-setup requisites
        string typestring = Get_Notif_TypeName(typeid);
 
        // Other pre-notif-setup requisites
@@ -609,7 +609,7 @@ void Create_Notification_Entity(
 
                        break;
                }
 
                        break;
                }
-               
+
                case MSG_INFO:
                case MSG_CENTER:
                {
                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));
                                {
                                        notif.nent_hudargs = strzone(
                                                Process_Notif_Args(2, hudargs, typestring, namestring));
-                                               
+
                                        if(icon != "") { notif.nent_icon = strzone(icon); }
                                        else
                                        {
                                        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));
                                {
                                        notif.nent_durcnt = strzone(
                                                Process_Notif_Args(3, durcnt, typestring, namestring));
-                                               
+
                                        if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
                                        else
                                        {
                                        if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
                                        else
                                        {
@@ -714,7 +714,7 @@ void Create_Notification_Entity(
                                                ));
                                                notif_error = TRUE;
                                        }
                                                ));
                                                notif_error = TRUE;
                                        }
-                               } 
+                               }
                                else if(cpid != NO_MSG) { notif.nent_cpid = cpid; }
                                #endif
 
                                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") }
                                        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
                                #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]; }
                        {
                                // 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;
                                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(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;
                                }
                                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);
                        }
                                // 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;
                }
 
                        break;
                }
 
@@ -848,7 +848,7 @@ void Create_Notification_Entity(
                                                notif.nent_optionb = msg_multi_notifs[optionb - 1];
                                                break;
                                        }
                                                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];
                                        {
                                                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);
                                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",
                                /*#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;
                }
                        }
                        break;
                }
-               
+
                default:
                {
                        print(sprintf(
                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
        if(notif_error)
        {
                notif.nent_enabled = FALSE; // disable the notification so it can't cause trouble
@@ -1005,7 +1005,7 @@ void Dump_Notifications(float fh, float alsoprint)
        {
                e = Get_Notif_Ent(MSG_ANNCE, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
        {
                e = Get_Notif_Ent(MSG_ANNCE, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
-               
+
                NOTIF_WRITE_ENTITY(
                        "Notification control cvar: 0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled)"
                );
                NOTIF_WRITE_ENTITY(
                        "Notification control cvar: 0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled)"
                );
@@ -1016,7 +1016,7 @@ void Dump_Notifications(float fh, float alsoprint)
        {
                e = Get_Notif_Ent(MSG_INFO, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
        {
                e = Get_Notif_Ent(MSG_INFO, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
-               
+
                NOTIF_WRITE_ENTITY(
                        "Notification control cvar: 0 = off, 1 = print to console, "
                        "2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
                NOTIF_WRITE_ENTITY(
                        "Notification control cvar: 0 = off, 1 = print to console, "
                        "2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)"
@@ -1028,7 +1028,7 @@ void Dump_Notifications(float fh, float alsoprint)
        {
                e = Get_Notif_Ent(MSG_CENTER, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
        {
                e = Get_Notif_Ent(MSG_CENTER, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
-               
+
                NOTIF_WRITE_ENTITY(
                        "Notification control cvar: 0 = off, 1 = centerprint"
                );
                NOTIF_WRITE_ENTITY(
                        "Notification control cvar: 0 = off, 1 = centerprint"
                );
@@ -1039,7 +1039,7 @@ void Dump_Notifications(float fh, float alsoprint)
        {
                e = Get_Notif_Ent(MSG_MULTI, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
        {
                e = Get_Notif_Ent(MSG_MULTI, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
-               
+
                NOTIF_WRITE_ENTITY(
                        "Notification control cvar: 0 = off, 1 = trigger subcalls"
                );
                NOTIF_WRITE_ENTITY(
                        "Notification control cvar: 0 = off, 1 = trigger subcalls"
                );
@@ -1050,7 +1050,7 @@ void Dump_Notifications(float fh, float alsoprint)
        {
                e = Get_Notif_Ent(MSG_CHOICE, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
        {
                e = Get_Notif_Ent(MSG_CHOICE, i);
                if (!e) { backtrace("Dump_Notifications(): Missing notification entity!\n"); return; }
-               
+
                NOTIF_WRITE_ENTITY_CHOICE(
                        "Notification control cvar: 0 = off, 1 = trigger option A subcall, 2 = trigger option B subcall",
                        "Notification control cvar: 0 = off, 1 = allowed in warmup mode, 2 = always allowed"
                NOTIF_WRITE_ENTITY_CHOICE(
                        "Notification control cvar: 0 = off, 1 = trigger option A subcall, 2 = trigger option B subcall",
                        "Notification control cvar: 0 = off, 1 = allowed in warmup mode, 2 = always allowed"
@@ -1059,84 +1059,84 @@ void Dump_Notifications(float fh, float alsoprint)
 
        // edit these to match whichever cvars are used for specific notification options
        NOTIF_WRITE("\n// HARD CODED notification variables:\n");
 
        // edit these to match whichever cvars are used for specific notification options
        NOTIF_WRITE("\n// HARD CODED notification variables:\n");
-       
+
        NOTIF_WRITE_HARDCODED(
                "allow_chatboxprint", "1",
                "Allow notifications to be printed to chat box by setting notification cvar to 2 "
                "(You can also set this cvar to 2 to force ALL notifications to be printed to the chatbox)"
        );
        NOTIF_WRITE_HARDCODED(
                "allow_chatboxprint", "1",
                "Allow notifications to be printed to chat box by setting notification cvar to 2 "
                "(You can also set this cvar to 2 to force ALL notifications to be printed to the chatbox)"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "debug", "0",
                "Print extra debug information on all notification function calls "
                "(Requires -DNOTIFICATIONS_DEBUG flag to be enabled on QCSRC compilation)... "
                "0 = disabled, 1 = dprint, 2 = print"
        );
        NOTIF_WRITE_HARDCODED(
                "debug", "0",
                "Print extra debug information on all notification function calls "
                "(Requires -DNOTIFICATIONS_DEBUG flag to be enabled on QCSRC compilation)... "
                "0 = disabled, 1 = dprint, 2 = print"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "errors_are_fatal", "1",
                "If a notification fails upon initialization, cause a Host_Error to stop the program"
        );
        NOTIF_WRITE_HARDCODED(
                "errors_are_fatal", "1",
                "If a notification fails upon initialization, cause a Host_Error to stop the program"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "item_centerprinttime", "1.5",
                "How long to show item information centerprint messages (like 'You got the Electro' or such)"
        );
        NOTIF_WRITE_HARDCODED(
                "item_centerprinttime", "1.5",
                "How long to show item information centerprint messages (like 'You got the Electro' or such)"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "lifetime_mapload", "10",
                "Amount of time that notification entities last immediately at mapload (in seconds) "
                "to help prevent notifications from being lost on early init (like gamestart countdown)"
        );
        NOTIF_WRITE_HARDCODED(
                "lifetime_mapload", "10",
                "Amount of time that notification entities last immediately at mapload (in seconds) "
                "to help prevent notifications from being lost on early init (like gamestart countdown)"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "lifetime_runtime", "0.5",
                "Amount of time that notification entities last on the server during runtime (In seconds)"
        );
        NOTIF_WRITE_HARDCODED(
                "lifetime_runtime", "0.5",
                "Amount of time that notification entities last on the server during runtime (In seconds)"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "server_allows_location", "1",
                "Server side cvar for allowing death messages to show location information too"
        );
        NOTIF_WRITE_HARDCODED(
                "server_allows_location", "1",
                "Server side cvar for allowing death messages to show location information too"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "show_location", "0",
                "Append location information to MSG_INFO death/kill messages"
        );
        NOTIF_WRITE_HARDCODED(
                "show_location", "0",
                "Append location information to MSG_INFO death/kill messages"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "show_location_string", "",
                "Replacement string piped into sprintf, "
                "so you can do different messages like this: ' at the %s' or ' (near %s)'"
        );
        NOTIF_WRITE_HARDCODED(
                "show_location_string", "",
                "Replacement string piped into sprintf, "
                "so you can do different messages like this: ' at the %s' or ' (near %s)'"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "show_sprees", "1",
                "Print information about sprees in death/kill messages"
        );
        NOTIF_WRITE_HARDCODED(
                "show_sprees", "1",
                "Print information about sprees in death/kill messages"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "show_sprees_center", "1",
                "Show spree information in MSG_CENTER messages... "
                "0 = off, 1 = target (but only for first victim) and attacker"
        );
        NOTIF_WRITE_HARDCODED(
                "show_sprees_center", "1",
                "Show spree information in MSG_CENTER messages... "
                "0 = off, 1 = target (but only for first victim) and attacker"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "show_sprees_center_specialonly", "1",
                "Don't show spree information in MSG_CENTER messages if it isn't an achievement"
        );
        NOTIF_WRITE_HARDCODED(
                "show_sprees_center_specialonly", "1",
                "Don't show spree information in MSG_CENTER messages if it isn't an achievement"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "show_sprees_info", "3",
                "Show spree information in MSG_INFO messages... "
                "0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker"
        );
        NOTIF_WRITE_HARDCODED(
                "show_sprees_info", "3",
                "Show spree information in MSG_INFO messages... "
                "0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "show_sprees_info_newline", "1",
                "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
        );
        NOTIF_WRITE_HARDCODED(
                "show_sprees_info_newline", "1",
                "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself"
        );
-       
+
        NOTIF_WRITE_HARDCODED(
                "show_sprees_info_specialonly", "1",
                "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
        NOTIF_WRITE_HARDCODED(
                "show_sprees_info_specialonly", "1",
                "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement"
@@ -1160,7 +1160,7 @@ void Dump_Notifications(float fh, float alsoprint)
                NOTIF_MULTI_COUNT,
                NOTIF_CHOICE_COUNT
        ));
                NOTIF_MULTI_COUNT,
                NOTIF_CHOICE_COUNT
        ));
-       
+
        return;
        #undef NOTIF_WRITE_HARDCODED
        #undef NOTIF_WRITE_ENTITY
        return;
        #undef NOTIF_WRITE_HARDCODED
        #undef NOTIF_WRITE_ENTITY
@@ -1184,7 +1184,7 @@ void Debug_Notification(string input)
 #endif
 
 string Local_Notification_sprintf(
 #endif
 
 string Local_Notification_sprintf(
-       string input, string args, 
+       string input, string args,
        string s1, string s2, string s3, string s4,
        float f1, float f2, float f3, float f4)
 {
        string s1, string s2, string s3, string s4,
        float f1, float f2, float f3, float f4)
 {
@@ -1197,7 +1197,7 @@ string Local_Notification_sprintf(
                sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
        ));
        #endif
                sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
        ));
        #endif
-       
+
        string selected;
        float sel_num;
        for(sel_num = 0; sel_num < NOTIF_MAX_ARGS; ++sel_num) { arg_slot[sel_num] = ""; }
        string selected;
        float sel_num;
        for(sel_num = 0; sel_num < NOTIF_MAX_ARGS; ++sel_num) { arg_slot[sel_num] = ""; }
@@ -1269,7 +1269,7 @@ void Local_Notification_sound(
                        soundposition
                ));
                #endif
                        soundposition
                ));
                #endif
-               
+
                sound(
                        world,
                        soundchannel,
                sound(
                        world,
                        soundchannel,
@@ -1281,7 +1281,7 @@ void Local_Notification_sound(
                        soundvolume,
                        soundposition
                );
                        soundvolume,
                        soundposition
                );
-               
+
                if(prev_soundfile) { strunzone(prev_soundfile); }
                prev_soundfile = strzone(soundfile);
                prev_soundtime = time;
                if(prev_soundfile) { strunzone(prev_soundfile); }
                prev_soundfile = strzone(soundfile);
                prev_soundtime = time;
@@ -1419,7 +1419,7 @@ void Local_Notification(float net_type, float net_name, ...count)
                #endif
                return;
        }
                #endif
                return;
        }
-       
+
        // check supplied type and name for errors
        string checkargs = Notification_CheckArgs_TypeName(net_type, net_name);
        if(checkargs != "")
        // check supplied type and name for errors
        string checkargs = Notification_CheckArgs_TypeName(net_type, net_name);
        if(checkargs != "")
@@ -1481,13 +1481,13 @@ void Local_Notification(float net_type, float net_name, ...count)
                sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
        ));
        #endif
                sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
        ));
        #endif
-       
+
        if((notif.nent_stringcount + notif.nent_floatcount) > count)
        {
                backtrace(sprintf(
                        strcat(
                                "Not enough arguments for Local_Notification(%s, %s, ...)! ",
        if((notif.nent_stringcount + notif.nent_floatcount) > count)
        {
                backtrace(sprintf(
                        strcat(
                                "Not enough arguments for Local_Notification(%s, %s, ...)! ",
-                               "stringcount(%d) + floatcount(%d) > count(%d)\n", 
+                               "stringcount(%d) + floatcount(%d) > count(%d)\n",
                                "Check the definition and function call for accuracy...?\n"
                        ),
                        Get_Notif_TypeName(net_type),
                                "Check the definition and function call for accuracy...?\n"
                        ),
                        Get_Notif_TypeName(net_type),
@@ -1514,7 +1514,7 @@ void Local_Notification(float net_type, float net_name, ...count)
                ));
                return;
        }
                ));
                return;
        }
-       
+
        switch(net_type)
        {
                case MSG_ANNCE:
        switch(net_type)
        {
                case MSG_ANNCE:
@@ -1531,35 +1531,35 @@ void Local_Notification(float net_type, float net_name, ...count)
                        #endif
                        break;
                }
                        #endif
                        break;
                }
-               
+
                case MSG_INFO:
                {
                        print(
                                Local_Notification_sprintf(
                                        notif.nent_string,
                case MSG_INFO:
                {
                        print(
                                Local_Notification_sprintf(
                                        notif.nent_string,
-                                       notif.nent_args, 
+                                       notif.nent_args,
                                        s1, s2, s3, s4,
                                        f1, f2, f3, f4)
                        );
                                        s1, s2, s3, s4,
                                        f1, f2, f3, f4)
                        );
-                       #ifdef CSQC 
+                       #ifdef CSQC
                        if(notif.nent_icon != "")
                        {
                                Local_Notification_HUD_Notify_Push(
                                        notif.nent_icon,
                                        notif.nent_hudargs,
                                        s1, s2, s3, s4);
                        if(notif.nent_icon != "")
                        {
                                Local_Notification_HUD_Notify_Push(
                                        notif.nent_icon,
                                        notif.nent_hudargs,
                                        s1, s2, s3, s4);
-                       } 
-                       #endif 
+                       }
+                       #endif
                        break;
                }
                        break;
                }
-               
+
                #ifdef CSQC
                case MSG_CENTER:
                {
                        Local_Notification_centerprint_generic(
                                Local_Notification_sprintf(
                                        notif.nent_string,
                #ifdef CSQC
                case MSG_CENTER:
                {
                        Local_Notification_centerprint_generic(
                                Local_Notification_sprintf(
                                        notif.nent_string,
-                                       notif.nent_args, 
+                                       notif.nent_args,
                                        s1, s2, s3, s4,
                                        f1, f2, f3, f4),
                                notif.nent_durcnt,
                                        s1, s2, s3, s4,
                                        f1, f2, f3, f4),
                                notif.nent_durcnt,
@@ -1568,7 +1568,7 @@ void Local_Notification(float net_type, float net_name, ...count)
                        break;
                }
                #endif
                        break;
                }
                #endif
-               
+
                case MSG_MULTI:
                {
                        if(notif.nent_msginfo)
                case MSG_MULTI:
                {
                        if(notif.nent_msginfo)
@@ -1576,9 +1576,9 @@ void Local_Notification(float net_type, float net_name, ...count)
                        {
                                Local_Notification_WOVA(
                                        MSG_INFO,
                        {
                                Local_Notification_WOVA(
                                        MSG_INFO,
-                                       notif.nent_msginfo.nent_id, 
-                                       notif.nent_msginfo.nent_stringcount, 
-                                       notif.nent_msginfo.nent_floatcount, 
+                                       notif.nent_msginfo.nent_id,
+                                       notif.nent_msginfo.nent_stringcount,
+                                       notif.nent_msginfo.nent_floatcount,
                                        s1, s2, s3, s4,
                                        f1, f2, f3, f4);
                        }
                                        s1, s2, s3, s4,
                                        f1, f2, f3, f4);
                        }
@@ -1588,8 +1588,8 @@ void Local_Notification(float net_type, float net_name, ...count)
                        {
                                Local_Notification_WOVA(
                                        MSG_ANNCE,
                        {
                                Local_Notification_WOVA(
                                        MSG_ANNCE,
-                                       notif.nent_msgannce.nent_id, 
-                                       0, 0, 
+                                       notif.nent_msgannce.nent_id,
+                                       0, 0,
                                        "", "", "", "",
                                        0, 0, 0, 0);
                        }
                                        "", "", "", "",
                                        0, 0, 0, 0);
                        }
@@ -1598,11 +1598,11 @@ void Local_Notification(float net_type, float net_name, ...count)
                        {
                                Local_Notification_WOVA(
                                        MSG_CENTER,
                        {
                                Local_Notification_WOVA(
                                        MSG_CENTER,
-                                       notif.nent_msgcenter.nent_id, 
-                                       notif.nent_msgcenter.nent_stringcount, 
-                                       notif.nent_msgcenter.nent_floatcount, 
+                                       notif.nent_msgcenter.nent_id,
+                                       notif.nent_msgcenter.nent_stringcount,
+                                       notif.nent_msgcenter.nent_floatcount,
                                        s1, s2, s3, s4,
                                        s1, s2, s3, s4,
-                                       f1, f2, f3, f4); 
+                                       f1, f2, f3, f4);
                        }
                        #endif
                        break;
                        }
                        #endif
                        break;
@@ -1611,7 +1611,7 @@ void Local_Notification(float net_type, float net_name, ...count)
                case MSG_CHOICE:
                {
                        entity found_choice;
                case MSG_CHOICE:
                {
                        entity found_choice;
-                       
+
                        if(notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2)))
                        {
                                switch(cvar_string(sprintf("notification_%s", notif.nent_name)))
                        if(notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2)))
                        {
                                switch(cvar_string(sprintf("notification_%s", notif.nent_name)))
@@ -1622,19 +1622,19 @@ void Local_Notification(float net_type, float net_name, ...count)
                                }
                        }
                        else { found_choice = notif.nent_optiona; }
                                }
                        }
                        else { found_choice = notif.nent_optiona; }
-                       
+
                        Local_Notification_WOVA(
                                found_choice.nent_type,
                        Local_Notification_WOVA(
                                found_choice.nent_type,
-                               found_choice.nent_id, 
-                               found_choice.nent_stringcount, 
-                               found_choice.nent_floatcount, 
+                               found_choice.nent_id,
+                               found_choice.nent_stringcount,
+                               found_choice.nent_floatcount,
                                s1, s2, s3, s4,
                                s1, s2, s3, s4,
-                               f1, f2, f3, f4); 
+                               f1, f2, f3, f4);
                }
        }
 }
 
                }
        }
 }
 
-// WOVA = Without Variable Arguments 
+// WOVA = Without Variable Arguments
 void Local_Notification_WOVA(
        float net_type, float net_name,
        float stringcount, float floatcount,
 void Local_Notification_WOVA(
        float net_type, float net_name,
        float stringcount, float floatcount,
@@ -1673,7 +1673,7 @@ void Read_Notification(float is_new)
                        net_name
                ));
                #endif
                        net_name
                ));
                #endif
-               
+
                if(is_new)
                {
                        if(net_name == 0) { reset_centerprint_messages(); }
                if(is_new)
                {
                        if(net_name == 0) { reset_centerprint_messages(); }
@@ -1689,7 +1689,7 @@ void Read_Notification(float is_new)
                                        is_new,
                                        time
                                ));
                                        is_new,
                                        time
                                ));
-                       } 
+                       }
                }
        }
        else
                }
        }
        else
@@ -1715,7 +1715,7 @@ void Read_Notification(float is_new)
                float f2 = ((1 < notif.nent_floatcount) ? ReadLong() : 0);
                float f3 = ((2 < notif.nent_floatcount) ? ReadLong() : 0);
                float f4 = ((3 < notif.nent_floatcount) ? ReadLong() : 0);
                float f2 = ((1 < notif.nent_floatcount) ? ReadLong() : 0);
                float f3 = ((2 < notif.nent_floatcount) ? ReadLong() : 0);
                float f4 = ((3 < notif.nent_floatcount) ? ReadLong() : 0);
-       
+
                if(is_new)
                {
                        Local_Notification_WOVA(
                if(is_new)
                {
                        Local_Notification_WOVA(
@@ -1733,7 +1733,7 @@ void Read_Notification(float is_new)
 void Net_Notification_Remove()
 {
        if (!self) { backtrace(sprintf("Net_Notification_Remove() at %f: Missing self!?\n", time)); return; }
 void Net_Notification_Remove()
 {
        if (!self) { backtrace(sprintf("Net_Notification_Remove() at %f: Missing self!?\n", time)); return; }
-       
+
        #ifdef NOTIFICATIONS_DEBUG
        Debug_Notification(sprintf(
                "Net_Notification_Remove() at %f: %s '%s - %s' notification\n",
        #ifdef NOTIFICATIONS_DEBUG
        Debug_Notification(sprintf(
                "Net_Notification_Remove() at %f: %s '%s - %s' notification\n",
@@ -1743,7 +1743,7 @@ void Net_Notification_Remove()
                self.owner.nent_name
        ));
        #endif
                self.owner.nent_name
        ));
        #endif
-       
+
        float i;
        for(i = 0; i < 4; ++i) { if(self.nent_strings[i]) { strunzone(self.nent_strings[i]); } }
        remove(self);
        float i;
        for(i = 0; i < 4; ++i) { if(self.nent_strings[i]) { strunzone(self.nent_strings[i]); } }
        remove(self);
@@ -1757,7 +1757,7 @@ float Net_Write_Notification(entity client, float sf)
                WriteByte(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);
                WriteByte(MSG_ENTITY, self.nent_net_type);
                WriteShort(MSG_ENTITY, self.nent_net_name);
                WriteByte(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);
                WriteByte(MSG_ENTITY, self.nent_net_type);
                WriteShort(MSG_ENTITY, self.nent_net_name);
-               for(i = 0; i < self.nent_stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); } 
+               for(i = 0; i < self.nent_stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); }
                for(i = 0; i < self.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[i]); }
                return TRUE;
        }
                for(i = 0; i < self.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[i]); }
                return TRUE;
        }
@@ -1777,13 +1777,13 @@ void Kill_Notification(
                net_name
        ));
        #endif
                net_name
        ));
        #endif
-       
+
        string checkargs = Notification_CheckArgs(broadcast, client, 1, 1);
        if(checkargs != "") { backtrace(sprintf("Incorrect usage of Kill_Notification: %s\n", checkargs)); return; }
 
        entity notif, net_notif;
        float killed_cpid = NO_CPID;
        string checkargs = Notification_CheckArgs(broadcast, client, 1, 1);
        if(checkargs != "") { backtrace(sprintf("Incorrect usage of Kill_Notification: %s\n", checkargs)); return; }
 
        entity notif, net_notif;
        float killed_cpid = NO_CPID;
-       
+
        switch(net_type)
        {
                case 0:
        switch(net_type)
        {
                case 0:
@@ -1791,14 +1791,14 @@ void Kill_Notification(
                        killed_cpid = 0; // kill ALL centerprints
                        break;
                }
                        killed_cpid = 0; // kill ALL centerprints
                        break;
                }
-               
+
                case MSG_CENTER:
                {
                        if(net_name)
                        {
                                entity notif = Get_Notif_Ent(net_type, net_name);
                                if (!notif) { backtrace("Kill_Notification: Could not find notification entity!\n"); return; }
                case MSG_CENTER:
                {
                        if(net_name)
                        {
                                entity notif = Get_Notif_Ent(net_type, net_name);
                                if (!notif) { backtrace("Kill_Notification: Could not find notification entity!\n"); return; }
-                               
+
                                if(notif.nent_cpid)
                                        killed_cpid = notif.nent_cpid;
                                else
                                if(notif.nent_cpid)
                                        killed_cpid = notif.nent_cpid;
                                else
@@ -1876,7 +1876,7 @@ void Send_Notification(
                #endif
                return;
        }
                #endif
                return;
        }
-       
+
        // check supplied broadcast, target, type, and name for errors
        string checkargs = Notification_CheckArgs(broadcast, client, net_type, net_name);
        if(checkargs != "")
        // check supplied broadcast, target, type, and name for errors
        string checkargs = Notification_CheckArgs(broadcast, client, net_type, net_name);
        if(checkargs != "")
@@ -1940,7 +1940,7 @@ void Send_Notification(
                backtrace(sprintf(
                        strcat(
                                "Not enough arguments for Send_Notification(%s, ...)! ",
                backtrace(sprintf(
                        strcat(
                                "Not enough arguments for Send_Notification(%s, ...)! ",
-                               "stringcount(%d) + floatcount(%d) > count(%d)\n", 
+                               "stringcount(%d) + floatcount(%d) > count(%d)\n",
                                "Check the definition and function call for accuracy...?\n"
                        ),
                        sprintf(
                                "Check the definition and function call for accuracy...?\n"
                        ),
                        sprintf(
@@ -2019,7 +2019,7 @@ void Send_Notification(
                // It's slow, but it's better than the alternatives:
                //   1. Constantly networking all info and letting client decide
                //   2. Manually handling each separate call on per-usage basis (See old CTF usage of verbose)
                // It's slow, but it's better than the alternatives:
                //   1. Constantly networking all info and letting client decide
                //   2. Manually handling each separate call on per-usage basis (See old CTF usage of verbose)
-               entity found_choice; 
+               entity found_choice;
 
                #define RECURSE_FROM_CHOICE(ent,action) \
                        if(notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) \
 
                #define RECURSE_FROM_CHOICE(ent,action) \
                        if(notif.nent_challow_var && (warmup_stage || (notif.nent_challow_var == 2))) \
@@ -2071,7 +2071,7 @@ void Send_Notification(
                net_notif.nent_net_name = net_name;
                net_notif.nent_stringcount = notif.nent_stringcount;
                net_notif.nent_floatcount = notif.nent_floatcount;
                net_notif.nent_net_name = net_name;
                net_notif.nent_stringcount = notif.nent_stringcount;
                net_notif.nent_floatcount = notif.nent_floatcount;
-               
+
                float i;
                for(i = 0; i < net_notif.nent_stringcount; ++i)
                        { net_notif.nent_strings[i] = strzone(...(i, string)); }
                float i;
                for(i = 0; i < net_notif.nent_stringcount; ++i)
                        { net_notif.nent_strings[i] = strzone(...(i, string)); }
@@ -2085,13 +2085,13 @@ void Send_Notification(
                                (time + autocvar_notification_lifetime_runtime)
                                :
                                autocvar_notification_lifetime_mapload
                                (time + autocvar_notification_lifetime_runtime)
                                :
                                autocvar_notification_lifetime_mapload
-                       ); 
+                       );
 
                Net_LinkEntity(net_notif, FALSE, 0, Net_Write_Notification);
        }
 }
 
 
                Net_LinkEntity(net_notif, FALSE, 0, Net_Write_Notification);
        }
 }
 
-// WOVA = Without Variable Arguments 
+// WOVA = Without Variable Arguments
 void Send_Notification_WOVA(
        float broadcast, entity client,
        float net_type, float net_name,
 void Send_Notification_WOVA(
        float broadcast, entity client,
        float net_type, float net_name,
@@ -2116,7 +2116,7 @@ void Send_Notification_WOVA(
                sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
        ));
        #endif
                sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
        ));
        #endif
-       
+
        #define VARITEM(stringc,floatc,args) \
                if((stringcount == stringc) && (floatcount == floatc)) \
                        { Send_Notification(broadcast, client, net_type, net_name, args); return; }
        #define VARITEM(stringc,floatc,args) \
                if((stringcount == stringc) && (floatcount == floatc)) \
                        { Send_Notification(broadcast, client, net_type, net_name, args); return; }
@@ -2125,7 +2125,7 @@ void Send_Notification_WOVA(
        Send_Notification(broadcast, client, net_type, net_name); // some notifications don't have any arguments at all
 }
 
        Send_Notification(broadcast, client, net_type, net_name); // some notifications don't have any arguments at all
 }
 
-// WOCOVA = Without Counts Or Variable Arguments 
+// WOCOVA = Without Counts Or Variable Arguments
 void Send_Notification_WOCOVA(
        float broadcast, entity client,
        float net_type, float net_name,
 void Send_Notification_WOCOVA(
        float broadcast, entity client,
        float net_type, float net_name,
@@ -2133,7 +2133,7 @@ void Send_Notification_WOCOVA(
        float f1, float f2, float f3, float f4)
 {
        entity notif = Get_Notif_Ent(net_type, net_name);
        float f1, float f2, float f3, float f4)
 {
        entity notif = Get_Notif_Ent(net_type, net_name);
-       
+
        #ifdef NOTIFICATIONS_DEBUG
        Debug_Notification(sprintf(
                "Send_Notification_WOCOVA(%s, %s, %s);\n",
        #ifdef NOTIFICATIONS_DEBUG
        Debug_Notification(sprintf(
                "Send_Notification_WOCOVA(%s, %s, %s);\n",
@@ -2148,7 +2148,7 @@ void Send_Notification_WOCOVA(
                sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
        ));
        #endif
                sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
        ));
        #endif
-       
+
        #define VARITEM(stringc,floatc,args) \
                if((notif.nent_stringcount == stringc) && (notif.nent_floatcount == floatc)) \
                        { Send_Notification(broadcast, client, net_type, net_name, args); return; }
        #define VARITEM(stringc,floatc,args) \
                if((notif.nent_stringcount == stringc) && (notif.nent_floatcount == floatc)) \
                        { Send_Notification(broadcast, client, net_type, net_name, args); return; }
index 84864bb451bd9c654972f5fda7ea0a73b9df93d4..6c602219ba77bd3cc362780df15a4c0c5ac9f382 100644 (file)
@@ -5,7 +5,7 @@
 
 // main types/groups of notifications
 #define MSG_ANNCE 1 // "Global" AND "personal" announcer messages
 
 // main types/groups of notifications
 #define MSG_ANNCE 1 // "Global" AND "personal" announcer messages
-#define MSG_INFO 2 // "Global" information messages 
+#define MSG_INFO 2 // "Global" information messages
 #define MSG_CENTER 3 // "Personal" centerprint messages
 #define MSG_CENTER_CPID 4 // Kill centerprint message
 #define MSG_MULTI 5 // Subcall MSG_INFO and/or MSG_CENTER notifications
 #define MSG_CENTER 3 // "Personal" centerprint messages
 #define MSG_CENTER_CPID 4 // Kill centerprint message
 #define MSG_MULTI 5 // Subcall MSG_INFO and/or MSG_CENTER notifications
@@ -51,7 +51,7 @@ void Create_Notification_Entity(
        float strnum,
        float flnum,
        /* MSG_ANNCE */
        float strnum,
        float flnum,
        /* MSG_ANNCE */
-       float channel, 
+       float channel,
        string snd,
        float vol,
        float position,
        string snd,
        float vol,
        float position,
@@ -188,7 +188,7 @@ void Send_Notification_WOCOVA(
 
  Check out the definitions in util.qc/util.qh/teams.qh for string CCR(...) and
  string TCR(...) to better understand how these code replacements work.
 
  Check out the definitions in util.qc/util.qh/teams.qh for string CCR(...) and
  string TCR(...) to better understand how these code replacements work.
+
  Additionally, you can find all the definitions and explanations for
  the argument values and what they return down below in this file.
 
  Additionally, you can find all the definitions and explanations for
  the argument values and what they return down below in this file.
 
@@ -515,7 +515,7 @@ void Send_Notification_WOCOVA(
        MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_MURDER,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapontuba",             _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Tuba%s%s"), "") \
        MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_SUICIDE,                  2, 1, "s1 s2loc spree_lost", "s1",                 "weapontuba",             _("^BG%s^K1 hurt their own ears with the @!#%%'n Tuba%s%s"), "") \
        MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SNIPE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was sniped by ^BG%s^K1's Machine Gun%s%s"), "") \
        MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_MURDER,                   3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weapontuba",             _("^BG%s%s^K1 died of ^BG%s^K1's great playing on the @!#%%'n Tuba%s%s"), "") \
        MSG_INFO_NOTIF(1, INFO_WEAPON_TUBA_SUICIDE,                  2, 1, "s1 s2loc spree_lost", "s1",                 "weapontuba",             _("^BG%s^K1 hurt their own ears with the @!#%%'n Tuba%s%s"), "") \
        MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SNIPE,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was sniped by ^BG%s^K1's Machine Gun%s%s"), "") \
-       MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SPRAY,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s"), "") 
+       MSG_INFO_NOTIF(1, INFO_WEAPON_UZI_MURDER_SPRAY,              3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1",  "weaponuzi",              _("^BG%s%s^K1 was riddled full of holes by ^BG%s^K1's Machine Gun%s%s"), "")
 
 #define MULTITEAM_CENTER2(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
        MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
 
 #define MULTITEAM_CENTER2(default,prefix,strnum,flnum,args,cpid,durcnt,normal,gentle) \
        MSG_CENTER_NOTIF(default, prefix##RED, strnum, flnum, args, cpid, durcnt, TCR(normal, COL_TEAM_1, strtoupper(NAME_TEAM_1)), TCR(gentle, COL_TEAM_1, strtoupper(NAME_TEAM_1))) \
@@ -857,7 +857,7 @@ var float autocvar_notification_item_centerprinttime = 1.5;
 
 // 0 = no, 1 = yes, 2 = forced on for all MSG_INFO notifs
 // DISABLED IN CODE, BUT ENABLED IN CONFIG FOR COMPATIBILITY WITH OLD CLIENTS
 
 // 0 = no, 1 = yes, 2 = forced on for all MSG_INFO notifs
 // DISABLED IN CODE, BUT ENABLED IN CONFIG FOR COMPATIBILITY WITH OLD CLIENTS
-var float autocvar_notification_allow_chatboxprint = 0; 
+var float autocvar_notification_allow_chatboxprint = 0;
 
 var float autocvar_notification_show_sprees_center = TRUE;
 var float autocvar_notification_show_sprees_center_specialonly = TRUE;
 
 var float autocvar_notification_show_sprees_center = TRUE;
 var float autocvar_notification_show_sprees_center_specialonly = TRUE;
@@ -874,14 +874,14 @@ var float autocvar_notification_show_sprees_center_specialonly = TRUE;
  allows for more dynamic data to be inferred by the local
  notification parser, so that the server does not have to network
  anything too crazy on a per-client/per-situation basis.
  allows for more dynamic data to be inferred by the local
  notification parser, so that the server does not have to network
  anything too crazy on a per-client/per-situation basis.
+
  Pay attention to the CSQC/SVQC relations, some of these are redefined
  in slightly different ways for different programs, this is because the
  server does a more conservative approach to the notifs than the client.
  Pay attention to the CSQC/SVQC relations, some of these are redefined
  in slightly different ways for different programs, this is because the
  server does a more conservative approach to the notifs than the client.
+
  All arguments are swapped into strings, so be sure that your
  sprintf usage matches with proper %s placement.
  All arguments are swapped into strings, so be sure that your
  sprintf usage matches with proper %s placement.
+
  Argument descriptions:
     s1-s4: string arguments to be literally swapped into sprintf
     s2loc: s2 string of locations of deaths or other events
  Argument descriptions:
     s1-s4: string arguments to be literally swapped into sprintf
     s2loc: s2 string of locations of deaths or other events
@@ -1025,13 +1025,13 @@ string notif_arg_missing_teams(float f1, float f2, float f3, float f4)
 string notif_arg_spree_cen(float spree)
 {
        // 0 = off, 1 = target (but only for first victim) and attacker
 string notif_arg_spree_cen(float spree)
 {
        // 0 = off, 1 = target (but only for first victim) and attacker
-       if(autocvar_notification_show_sprees_center) 
+       if(autocvar_notification_show_sprees_center)
        {
                if(spree > 1)
                {
                        #define SPREE_ITEM(counta,countb,center,normal,gentle) \
                                case counta: { return normal_or_gentle(center, sprintf(_("%d score spree! "), spree)); }
        {
                if(spree > 1)
                {
                        #define SPREE_ITEM(counta,countb,center,normal,gentle) \
                                case counta: { return normal_or_gentle(center, sprintf(_("%d score spree! "), spree)); }
-                       
+
                        switch(spree)
                        {
                                KILL_SPREE_LIST
                        switch(spree)
                        {
                                KILL_SPREE_LIST
@@ -1047,7 +1047,7 @@ string notif_arg_spree_cen(float spree)
                                                                ),
                                                                spree);
                                        }
                                                                ),
                                                                spree);
                                        }
-                                       else { return ""; } // don't show spree information if it isn't an achievement 
+                                       else { return ""; } // don't show spree information if it isn't an achievement
                                }
                        }
 
                                }
                        }
 
@@ -1074,7 +1074,7 @@ string notif_arg_spree_inf(float type, string input, string player, float spree)
                {
                        // 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker
                        // this conditional (& 2) is true for 2 and 3
                {
                        // 0 = off, 1 = target only, 2 = attacker only, 3 = target and attacker
                        // this conditional (& 2) is true for 2 and 3
-                       if(autocvar_notification_show_sprees_info & 2) 
+                       if(autocvar_notification_show_sprees_info & 2)
                        {
                                #ifdef CSQC
                                string spree_newline =
                        {
                                #ifdef CSQC
                                string spree_newline =
@@ -1084,12 +1084,12 @@ string notif_arg_spree_inf(float type, string input, string player, float spree)
                                string spree_newline =
                                        (autocvar_notification_show_sprees_info_newline ? "\n" : "");
                                #endif
                                string spree_newline =
                                        (autocvar_notification_show_sprees_info_newline ? "\n" : "");
                                #endif
-                               
+
                                if(spree > 1)
                                {
                                        #define SPREE_ITEM(counta,countb,center,normal,gentle) \
                                                case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }
                                if(spree > 1)
                                {
                                        #define SPREE_ITEM(counta,countb,center,normal,gentle) \
                                                case counta: { return sprintf(CCR(normal_or_gentle(normal, gentle)), player, spree_newline); }
-                                       
+
                                        switch(spree)
                                        {
                                                KILL_SPREE_LIST
                                        switch(spree)
                                        {
                                                KILL_SPREE_LIST
@@ -1108,7 +1108,7 @@ string notif_arg_spree_inf(float type, string input, string player, float spree)
                                                                                spree_newline
                                                                        );
                                                        }
                                                                                spree_newline
                                                                        );
                                                        }
-                                                       else { return ""; } // don't show spree information if it isn't an achievement 
+                                                       else { return ""; } // don't show spree information if it isn't an achievement
                                                }
                                        }
 
                                                }
                                        }
 
@@ -1464,9 +1464,9 @@ void RegisterNotifications_First()
        #else
        #define dedi ""
        #endif
        #else
        #define dedi ""
        #endif
-       
+
        print(sprintf("Beginning notification initialization on %s%s program...\n", dedi, PROGNAME));
        print(sprintf("Beginning notification initialization on %s%s program...\n", dedi, PROGNAME));
-       
+
        // maybe do another implementation of this with checksums? for now, we don't need versioning
        /*if(autocvar_notification_version != NOTIF_VERSION)
        {
        // maybe do another implementation of this with checksums? for now, we don't need versioning
        /*if(autocvar_notification_version != NOTIF_VERSION)
        {
index ade219a2459f9125677760a348a8895afc9712a7..069904290b7d45361bdb7a1828ead5888bc3bca2 100644 (file)
@@ -50,7 +50,7 @@ string Team_ColorCode(float teamid)
        case NUM_TEAM_3: return COL_TEAM_3;
        case NUM_TEAM_4: return COL_TEAM_4;
        }
        case NUM_TEAM_3: return COL_TEAM_3;
        case NUM_TEAM_4: return COL_TEAM_4;
        }
-       
+
        return "^7";
 }
 
        return "^7";
 }
 
@@ -76,7 +76,7 @@ string Team_ColorName(float teamid)
        case NUM_TEAM_3: return NAME_TEAM_3;
        case NUM_TEAM_4: return NAME_TEAM_4;
        }
        case NUM_TEAM_3: return NAME_TEAM_3;
        case NUM_TEAM_4: return NAME_TEAM_4;
        }
-       
+
     return NAME_NEUTRAL;
 }
 
     return NAME_NEUTRAL;
 }
 
@@ -90,7 +90,7 @@ string Static_Team_ColorName(float teamid)
        case NUM_TEAM_3: return STATIC_NAME_TEAM_3;
        case NUM_TEAM_4: return STATIC_NAME_TEAM_4;
        }
        case NUM_TEAM_3: return STATIC_NAME_TEAM_3;
        case NUM_TEAM_4: return STATIC_NAME_TEAM_4;
        }
-       
+
     return NAME_NEUTRAL;
 }
 
     return NAME_NEUTRAL;
 }
 
@@ -104,7 +104,7 @@ float Team_ColorToTeam(string team_color)
        case "pink": return NUM_TEAM_4;
        case "auto": return 0;
        }
        case "pink": return NUM_TEAM_4;
        case "auto": return 0;
        }
-       
+
        return -1;
 }
 
        return -1;
 }
 
@@ -117,7 +117,7 @@ float Team_NumberToTeam(float number)
                case 3: return NUM_TEAM_3;
                case 4: return NUM_TEAM_4;
        }
                case 3: return NUM_TEAM_3;
                case 4: return NUM_TEAM_4;
        }
-       
+
        return -1;
 }
 
        return -1;
 }
 
@@ -130,7 +130,7 @@ float Team_TeamToNumber(float teamid)
                case NUM_TEAM_3: return 3;
                case NUM_TEAM_4: return 4;
        }
                case NUM_TEAM_3: return 3;
                case NUM_TEAM_4: return 4;
        }
-       
+
        return -1;
 }
 
        return -1;
 }
 
index 11dbdaedbfd25370a7fc4571d317b43f6d14eb71..d1503a7b6b8bae9ea53c37c7bce2717ac64931f4 100644 (file)
@@ -148,7 +148,7 @@ void wordwrap_cb(string s, float l, void(string) callback)
 float dist_point_line(vector p, vector l0, vector ldir)
 {
        ldir = normalize(ldir);
 float dist_point_line(vector p, vector l0, vector ldir)
 {
        ldir = normalize(ldir);
-       
+
        // remove the component in line direction
        p = p - (p * ldir) * ldir;
 
        // remove the component in line direction
        p = p - (p * ldir) * ldir;
 
@@ -264,7 +264,7 @@ void db_save(float db, string pFilename)
 {
        float fh, i, n;
        fh = fopen(pFilename, FILE_WRITE);
 {
        float fh, i, n;
        fh = fopen(pFilename, FILE_WRITE);
-       if(fh < 0) 
+       if(fh < 0)
        {
                print(strcat("^1Can't write DB to ", pFilename));
                return;
        {
                print(strcat("^1Can't write DB to ", pFilename));
                return;
@@ -458,7 +458,7 @@ string ScoreString(float pFlags, float pValue)
                valstr = TIME_ENCODED_TOSTRING(pValue);
        else
                valstr = ftos(pValue);
                valstr = TIME_ENCODED_TOSTRING(pValue);
        else
                valstr = ftos(pValue);
-       
+
        return valstr;
 }
 
        return valstr;
 }
 
@@ -664,7 +664,7 @@ string fixPriorityList(string order, float from, float to, float subtract, float
                                neworder = strcat(neworder, ftos(w), " ");
                }
        }
                                neworder = strcat(neworder, ftos(w), " ");
                }
        }
-       
+
        return substring(neworder, 0, strlen(neworder) - 1);
 }
 
        return substring(neworder, 0, strlen(neworder) - 1);
 }
 
@@ -677,7 +677,7 @@ string mapPriorityList(string order, string(string) mapfunc)
        neworder = "";
        for(i = 0; i < n; ++i)
                neworder = strcat(neworder, mapfunc(argv(i)), " ");
        neworder = "";
        for(i = 0; i < n; ++i)
                neworder = strcat(neworder, mapfunc(argv(i)), " ");
-       
+
        return substring(neworder, 0, strlen(neworder) - 1);
 }
 
        return substring(neworder, 0, strlen(neworder) - 1);
 }
 
@@ -702,7 +702,7 @@ string swapInPriorityList(string order, float i, float j)
                }
                return substring(s, 0, strlen(s) - 1);
        }
                }
                return substring(s, 0, strlen(s) - 1);
        }
-       
+
        return order;
 }
 
        return order;
 }
 
@@ -1100,7 +1100,7 @@ vector rgb_to_hsv(vector rgb)
                hsv_y = 0;
        else
                hsv_y = 1 - mi/ma;
                hsv_y = 0;
        else
                hsv_y = 1 - mi/ma;
-       
+
        return hsv;
 }
 
        return hsv;
 }
 
@@ -1118,7 +1118,7 @@ vector rgb_to_hsl(vector rgb)
        ma = max(rgb_x, rgb_y, rgb_z);
 
        hsl_x = rgb_mi_ma_to_hue(rgb, mi, ma);
        ma = max(rgb_x, rgb_y, rgb_z);
 
        hsl_x = rgb_mi_ma_to_hue(rgb, mi, ma);
-       
+
        hsl_z = 0.5 * (mi + ma);
        if(mi == ma)
                hsl_y = 0;
        hsl_z = 0.5 * (mi + ma);
        if(mi == ma)
                hsl_y = 0;
@@ -1126,7 +1126,7 @@ vector rgb_to_hsl(vector rgb)
                hsl_y = (ma - mi) / (2*hsl_z);
        else // if(hsl_z > 0.5)
                hsl_y = (ma - mi) / (2 - 2*hsl_z);
                hsl_y = (ma - mi) / (2*hsl_z);
        else // if(hsl_z > 0.5)
                hsl_y = (ma - mi) / (2 - 2*hsl_z);
-       
+
        return hsl;
 }
 
        return hsl;
 }
 
@@ -1138,7 +1138,7 @@ vector hsl_to_rgb(vector hsl)
                maminusmi = hsl_y * 2 * hsl_z;
        else
                maminusmi = hsl_y * (2 - 2 * hsl_z);
                maminusmi = hsl_y * 2 * hsl_z;
        else
                maminusmi = hsl_y * (2 - 2 * hsl_z);
-       
+
        // hsl_z     = 0.5 * mi + 0.5 * ma
        // maminusmi =     - mi +       ma
        mi = hsl_z - 0.5 * maminusmi;
        // hsl_z     = 0.5 * mi + 0.5 * ma
        // maminusmi =     - mi +       ma
        mi = hsl_z - 0.5 * maminusmi;
@@ -1199,7 +1199,7 @@ float textLengthUpToWidth(string theText, float maxWidth, vector theSize, textLe
                // terminate, as the range still halves each time - but nevertheless, it is
                // guaranteed that it finds ONE valid cutoff place (where "left" is in
                // range, and "right" is outside).
                // terminate, as the range still halves each time - but nevertheless, it is
                // guaranteed that it finds ONE valid cutoff place (where "left" is in
                // range, and "right" is outside).
-               
+
                // terencehill: the following code detects truncated ^xrgb tags (e.g. ^x or ^x4)
                // and decrease left on the basis of the chars detected of the truncated tag
                // Even if the ^xrgb tag is not complete/correct, left is decreased
                // terencehill: the following code detects truncated ^xrgb tags (e.g. ^x or ^x4)
                // and decrease left on the basis of the chars detected of the truncated tag
                // Even if the ^xrgb tag is not complete/correct, left is decreased
@@ -1227,7 +1227,7 @@ float textLengthUpToWidth(string theText, float maxWidth, vector theSize, textLe
                                }
                        }
        }
                                }
                        }
        }
-       
+
        return left;
 }
 
        return left;
 }
 
@@ -1263,7 +1263,7 @@ float textLengthUpToLength(string theText, float maxWidth, textLengthUpToLength_
                // terminate, as the range still halves each time - but nevertheless, it is
                // guaranteed that it finds ONE valid cutoff place (where "left" is in
                // range, and "right" is outside).
                // terminate, as the range still halves each time - but nevertheless, it is
                // guaranteed that it finds ONE valid cutoff place (where "left" is in
                // range, and "right" is outside).
-               
+
                // terencehill: the following code detects truncated ^xrgb tags (e.g. ^x or ^x4)
                // and decrease left on the basis of the chars detected of the truncated tag
                // Even if the ^xrgb tag is not complete/correct, left is decreased
                // terencehill: the following code detects truncated ^xrgb tags (e.g. ^x or ^x4)
                // and decrease left on the basis of the chars detected of the truncated tag
                // Even if the ^xrgb tag is not complete/correct, left is decreased
@@ -1291,7 +1291,7 @@ float textLengthUpToLength(string theText, float maxWidth, textLengthUpToLength_
                                }
                        }
        }
                                }
                        }
        }
-       
+
        return left;
 }
 
        return left;
 }
 
@@ -1338,7 +1338,7 @@ string getWrappedLine(float w, vector theFontSize, textLengthUpToWidth_widthFunc
        string s;
 
        s = getWrappedLine_remaining;
        string s;
 
        s = getWrappedLine_remaining;
-       
+
        if(w <= 0)
        {
                getWrappedLine_remaining = string_null;
        if(w <= 0)
        {
                getWrappedLine_remaining = string_null;
@@ -1384,7 +1384,7 @@ string getWrappedLineLen(float w, textLengthUpToLength_lenFunction_t tw)
        string s;
 
        s = getWrappedLine_remaining;
        string s;
 
        s = getWrappedLine_remaining;
-       
+
        if(w <= 0)
        {
                getWrappedLine_remaining = string_null;
        if(w <= 0)
        {
                getWrappedLine_remaining = string_null;
@@ -2323,12 +2323,12 @@ float InterpretBoolean(string input)
                case "true":
                case "on":
                        return TRUE;
                case "true":
                case "on":
                        return TRUE;
-               
+
                case "no":
                case "false":
                case "off":
                        return FALSE;
                case "no":
                case "false":
                case "off":
                        return FALSE;
-               
+
                default: return stof(input);
        }
 }
                default: return stof(input);
        }
 }
@@ -2459,7 +2459,7 @@ float cubic_speedfunc_is_sane(float startspeedfactor, float endspeedfactor)
        /*
        // if this is the case, the possible zeros of the first derivative are outside
        // 0..1
        /*
        // if this is the case, the possible zeros of the first derivative are outside
        // 0..1
-       We can calculate this condition as condition 
+       We can calculate this condition as condition
        if(se <= 3)
                return TRUE;
        */
        if(se <= 3)
                return TRUE;
        */
@@ -2511,7 +2511,7 @@ float cubic_speedfunc_is_sane(float startspeedfactor, float endspeedfactor)
 
           Therefore: there is an inflection point iff:
           e outside (3 - s)/2 .. 3 - s*2
 
           Therefore: there is an inflection point iff:
           e outside (3 - s)/2 .. 3 - s*2
-          
+
           in other words, if (s,e) in triangle (1,1)(0,3)(0,1.5) or in triangle (1,1)(3,0)(1.5,0)
        */
 }
           in other words, if (s,e) in triangle (1,1)(0,3)(0,1.5) or in triangle (1,1)(3,0)(1.5,0)
        */
 }
@@ -2587,12 +2587,12 @@ void backtrace(string msg)
 string CCR(string input)
 {
        // See the autocvar declarations in util.qh for default values
 string CCR(string input)
 {
        // See the autocvar declarations in util.qh for default values
-       
+
        // foreground/normal colors
        // foreground/normal colors
-       input = strreplace("^F1", strcat("^", autocvar_hud_colorset_foreground_1), input); 
-       input = strreplace("^F2", strcat("^", autocvar_hud_colorset_foreground_2), input); 
-       input = strreplace("^F3", strcat("^", autocvar_hud_colorset_foreground_3), input); 
-       input = strreplace("^F4", strcat("^", autocvar_hud_colorset_foreground_4), input); 
+       input = strreplace("^F1", strcat("^", autocvar_hud_colorset_foreground_1), input);
+       input = strreplace("^F2", strcat("^", autocvar_hud_colorset_foreground_2), input);
+       input = strreplace("^F3", strcat("^", autocvar_hud_colorset_foreground_3), input);
+       input = strreplace("^F4", strcat("^", autocvar_hud_colorset_foreground_4), input);
 
        // "kill" colors
        input = strreplace("^K1", strcat("^", autocvar_hud_colorset_kill_1), input);
 
        // "kill" colors
        input = strreplace("^K1", strcat("^", autocvar_hud_colorset_kill_1), input);
@@ -2651,15 +2651,15 @@ float Announcer_PickNumber(float type, float num)
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_GAMESTART_10;
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_GAMESTART_10;
-                               case 9:  return ANNCE_NUM_GAMESTART_9; 
-                               case 8:  return ANNCE_NUM_GAMESTART_8; 
-                               case 7:  return ANNCE_NUM_GAMESTART_7; 
-                               case 6:  return ANNCE_NUM_GAMESTART_6; 
-                               case 5:  return ANNCE_NUM_GAMESTART_5; 
-                               case 4:  return ANNCE_NUM_GAMESTART_4; 
-                               case 3:  return ANNCE_NUM_GAMESTART_3; 
-                               case 2:  return ANNCE_NUM_GAMESTART_2; 
-                               case 1:  return ANNCE_NUM_GAMESTART_1; 
+                               case 9:  return ANNCE_NUM_GAMESTART_9;
+                               case 8:  return ANNCE_NUM_GAMESTART_8;
+                               case 7:  return ANNCE_NUM_GAMESTART_7;
+                               case 6:  return ANNCE_NUM_GAMESTART_6;
+                               case 5:  return ANNCE_NUM_GAMESTART_5;
+                               case 4:  return ANNCE_NUM_GAMESTART_4;
+                               case 3:  return ANNCE_NUM_GAMESTART_3;
+                               case 2:  return ANNCE_NUM_GAMESTART_2;
+                               case 1:  return ANNCE_NUM_GAMESTART_1;
                        }
                        break;
                }
                        }
                        break;
                }
@@ -2668,15 +2668,15 @@ float Announcer_PickNumber(float type, float num)
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_IDLE_10;
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_IDLE_10;
-                               case 9:  return ANNCE_NUM_IDLE_9; 
-                               case 8:  return ANNCE_NUM_IDLE_8; 
-                               case 7:  return ANNCE_NUM_IDLE_7; 
-                               case 6:  return ANNCE_NUM_IDLE_6; 
-                               case 5:  return ANNCE_NUM_IDLE_5; 
-                               case 4:  return ANNCE_NUM_IDLE_4; 
-                               case 3:  return ANNCE_NUM_IDLE_3; 
-                               case 2:  return ANNCE_NUM_IDLE_2; 
-                               case 1:  return ANNCE_NUM_IDLE_1; 
+                               case 9:  return ANNCE_NUM_IDLE_9;
+                               case 8:  return ANNCE_NUM_IDLE_8;
+                               case 7:  return ANNCE_NUM_IDLE_7;
+                               case 6:  return ANNCE_NUM_IDLE_6;
+                               case 5:  return ANNCE_NUM_IDLE_5;
+                               case 4:  return ANNCE_NUM_IDLE_4;
+                               case 3:  return ANNCE_NUM_IDLE_3;
+                               case 2:  return ANNCE_NUM_IDLE_2;
+                               case 1:  return ANNCE_NUM_IDLE_1;
                        }
                        break;
                }
                        }
                        break;
                }
@@ -2685,15 +2685,15 @@ float Announcer_PickNumber(float type, float num)
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_KILL_10;
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_KILL_10;
-                               case 9:  return ANNCE_NUM_KILL_9; 
-                               case 8:  return ANNCE_NUM_KILL_8; 
-                               case 7:  return ANNCE_NUM_KILL_7; 
-                               case 6:  return ANNCE_NUM_KILL_6; 
-                               case 5:  return ANNCE_NUM_KILL_5; 
-                               case 4:  return ANNCE_NUM_KILL_4; 
-                               case 3:  return ANNCE_NUM_KILL_3; 
-                               case 2:  return ANNCE_NUM_KILL_2; 
-                               case 1:  return ANNCE_NUM_KILL_1; 
+                               case 9:  return ANNCE_NUM_KILL_9;
+                               case 8:  return ANNCE_NUM_KILL_8;
+                               case 7:  return ANNCE_NUM_KILL_7;
+                               case 6:  return ANNCE_NUM_KILL_6;
+                               case 5:  return ANNCE_NUM_KILL_5;
+                               case 4:  return ANNCE_NUM_KILL_4;
+                               case 3:  return ANNCE_NUM_KILL_3;
+                               case 2:  return ANNCE_NUM_KILL_2;
+                               case 1:  return ANNCE_NUM_KILL_1;
                        }
                        break;
                }
                        }
                        break;
                }
@@ -2702,15 +2702,15 @@ float Announcer_PickNumber(float type, float num)
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_RESPAWN_10;
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_RESPAWN_10;
-                               case 9:  return ANNCE_NUM_RESPAWN_9; 
-                               case 8:  return ANNCE_NUM_RESPAWN_8; 
-                               case 7:  return ANNCE_NUM_RESPAWN_7; 
-                               case 6:  return ANNCE_NUM_RESPAWN_6; 
-                               case 5:  return ANNCE_NUM_RESPAWN_5; 
-                               case 4:  return ANNCE_NUM_RESPAWN_4; 
-                               case 3:  return ANNCE_NUM_RESPAWN_3; 
-                               case 2:  return ANNCE_NUM_RESPAWN_2; 
-                               case 1:  return ANNCE_NUM_RESPAWN_1; 
+                               case 9:  return ANNCE_NUM_RESPAWN_9;
+                               case 8:  return ANNCE_NUM_RESPAWN_8;
+                               case 7:  return ANNCE_NUM_RESPAWN_7;
+                               case 6:  return ANNCE_NUM_RESPAWN_6;
+                               case 5:  return ANNCE_NUM_RESPAWN_5;
+                               case 4:  return ANNCE_NUM_RESPAWN_4;
+                               case 3:  return ANNCE_NUM_RESPAWN_3;
+                               case 2:  return ANNCE_NUM_RESPAWN_2;
+                               case 1:  return ANNCE_NUM_RESPAWN_1;
                        }
                        break;
                }
                        }
                        break;
                }
@@ -2719,15 +2719,15 @@ float Announcer_PickNumber(float type, float num)
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_ROUNDSTART_10;
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_ROUNDSTART_10;
-                               case 9:  return ANNCE_NUM_ROUNDSTART_9; 
-                               case 8:  return ANNCE_NUM_ROUNDSTART_8; 
-                               case 7:  return ANNCE_NUM_ROUNDSTART_7; 
-                               case 6:  return ANNCE_NUM_ROUNDSTART_6; 
-                               case 5:  return ANNCE_NUM_ROUNDSTART_5; 
-                               case 4:  return ANNCE_NUM_ROUNDSTART_4; 
-                               case 3:  return ANNCE_NUM_ROUNDSTART_3; 
-                               case 2:  return ANNCE_NUM_ROUNDSTART_2; 
-                               case 1:  return ANNCE_NUM_ROUNDSTART_1; 
+                               case 9:  return ANNCE_NUM_ROUNDSTART_9;
+                               case 8:  return ANNCE_NUM_ROUNDSTART_8;
+                               case 7:  return ANNCE_NUM_ROUNDSTART_7;
+                               case 6:  return ANNCE_NUM_ROUNDSTART_6;
+                               case 5:  return ANNCE_NUM_ROUNDSTART_5;
+                               case 4:  return ANNCE_NUM_ROUNDSTART_4;
+                               case 3:  return ANNCE_NUM_ROUNDSTART_3;
+                               case 2:  return ANNCE_NUM_ROUNDSTART_2;
+                               case 1:  return ANNCE_NUM_ROUNDSTART_1;
                        }
                        break;
                }
                        }
                        break;
                }
@@ -2736,15 +2736,15 @@ float Announcer_PickNumber(float type, float num)
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_10;
                        switch(num)
                        {
                                case 10: return ANNCE_NUM_10;
-                               case 9:  return ANNCE_NUM_9; 
-                               case 8:  return ANNCE_NUM_8; 
-                               case 7:  return ANNCE_NUM_7; 
-                               case 6:  return ANNCE_NUM_6; 
-                               case 5:  return ANNCE_NUM_5; 
-                               case 4:  return ANNCE_NUM_4; 
-                               case 3:  return ANNCE_NUM_3; 
-                               case 2:  return ANNCE_NUM_2; 
-                               case 1:  return ANNCE_NUM_1; 
+                               case 9:  return ANNCE_NUM_9;
+                               case 8:  return ANNCE_NUM_8;
+                               case 7:  return ANNCE_NUM_7;
+                               case 6:  return ANNCE_NUM_6;
+                               case 5:  return ANNCE_NUM_5;
+                               case 4:  return ANNCE_NUM_4;
+                               case 3:  return ANNCE_NUM_3;
+                               case 2:  return ANNCE_NUM_2;
+                               case 1:  return ANNCE_NUM_1;
                        }
                        break;
                }
                        }
                        break;
                }
index 166af391e9574b7d6e5e7f7867bab05ab43c2e7f..66b0edb3dfd64d3a3c312a6884cea413cee93cda 100644 (file)
@@ -101,7 +101,7 @@ void buf_save(float buf, string filename);
 
 // modulo function
 #ifndef MENUQC
 
 // modulo function
 #ifndef MENUQC
-float mod(float a, float b) { return a - (floor(a / b) * b); }   
+float mod(float a, float b) { return a - (floor(a / b) * b); }
 #endif
 
 #define TIME_TO_NTHS(t,n) floor((t) * (n) + 0.4)
 #endif
 
 #define TIME_TO_NTHS(t,n) floor((t) * (n) + 0.4)
index 2c7bc2d925da89fc0c1d971ad86e2ca696cddb2c..1dbb2b68f75d59aed9acca2665191840379bd606 100644 (file)
@@ -244,7 +244,7 @@ void CSQCModel_Read(float isnew)
                self.iflags |= IFLAG_TELEPORTED;
                self.csqcmodel_teleported = 1;
        }
                self.iflags |= IFLAG_TELEPORTED;
                self.csqcmodel_teleported = 1;
        }
-       
+
        CSQCModel_InterpolateAnimation_Note(sf);
        InterpolateOrigin_Note();
        CSQCPlayer_PostUpdate();
        CSQCModel_InterpolateAnimation_Note(sf);
        InterpolateOrigin_Note();
        CSQCPlayer_PostUpdate();
index 324f8082f75bf98f12fa9026a154ed3e91532c55..8f4ec8b414f34fc2a42177f15cda496f59aa1a9b 100644 (file)
@@ -194,7 +194,7 @@ const float VF_DRAWCROSSHAIR        = 21;   //(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   = 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)
 
 const float VF_PERSPECTIVE      = 200;
 
 
 const float VF_PERSPECTIVE      = 200;
 
@@ -291,7 +291,7 @@ const float TE_EXPLOSION2                                   = 12;
        const float TE_EXPLOSIONQUAD                            = 70;
        const float TE_SPIKEQUAD                                        = 58;
        const float TE_SUPERSPIKEQUAD                           = 59;
        const float TE_EXPLOSIONQUAD                            = 70;
        const float TE_SPIKEQUAD                                        = 58;
        const float TE_SUPERSPIKEQUAD                           = 59;
-       
+
 // PFlags for Dynamic Lights
 const float PFLAGS_NOSHADOW                                    = 1;
 const float PFLAGS_CORONA                                      = 2;
 // PFlags for Dynamic Lights
 const float PFLAGS_NOSHADOW                                    = 1;
 const float PFLAGS_CORONA                                      = 2;
@@ -657,11 +657,11 @@ float PARTICLE_BEAM = 3;
 float particle_type; // one of PT_
 float particle_blendmode; // one of PBLEND_ values
 float particle_orientation; // one of PARTICLE_ values
 float particle_type; // one of PT_
 float particle_blendmode; // one of PBLEND_ values
 float particle_orientation; // one of PARTICLE_ values
-vector particle_color1; 
+vector particle_color1;
 vector particle_color2;
 float particle_tex; // number of chunk in particlefont
 float particle_size;
 vector particle_color2;
 float particle_tex; // number of chunk in particlefont
 float particle_size;
-float particle_sizeincrease; 
+float particle_sizeincrease;
 float particle_alpha;
 float particle_alphafade;
 float particle_time;
 float particle_alpha;
 float particle_alphafade;
 float particle_time;
@@ -693,10 +693,10 @@ float(vector org, vector vel) spawnparticle = #527; // returns 0 when failed, 1
 float(vector org, vector vel, float theme) quickparticle = #527; // not reading globals, just theme, returns 0 when failed, 1 when spawned
 float(vector org, vector vel, float delay, float collisiondelay) delayedparticle = #528;
 float(vector org, vector vel, float delay, float collisiondelay, float theme) quickdelayedparticle = #528;
 float(vector org, vector vel, float theme) quickparticle = #527; // not reading globals, just theme, returns 0 when failed, 1 when spawned
 float(vector org, vector vel, float delay, float collisiondelay) delayedparticle = #528;
 float(vector org, vector vel, float delay, float collisiondelay, float theme) quickdelayedparticle = #528;
-// description: this builtin provides an easy and flexible way to spawn particles, 
-// it is not created as replace for DP_SV_POINTPARTICLES but as an addition to it. 
+// description: this builtin provides an easy and flexible way to spawn particles,
+// it is not created as replace for DP_SV_POINTPARTICLES but as an addition to it.
 // With this extension you can create a specific particles like rain particles, or entity particles
 // With this extension you can create a specific particles like rain particles, or entity particles
-// notes: 
+// notes:
 // 1) 0 is default particle template, it could be changed
 // 2) color vectors could have value 0-255 of each component
 // restrictions: max themes could be between 4 and 2048
 // 1) 0 is default particle template, it could be changed
 // 2) color vectors could have value 0-255 of each component
 // restrictions: max themes could be between 4 and 2048
@@ -806,7 +806,7 @@ vector(float entitynum, float fldnum) getentityvec = #504;
 //darkplaces implementation: Blub\0
 //console commands:
 //  loadfont fontname fontmaps size1 size2 ...
 //darkplaces implementation: Blub\0
 //console commands:
 //  loadfont fontname fontmaps size1 size2 ...
-//   A font can simply be gfx/tgafile (freetype fonts doent need extension), 
+//   A font can simply be gfx/tgafile (freetype fonts doent need extension),
 //   or alternatively you can specify multiple fonts and faces
 //   Like this: gfx/vera-sans:2,gfx/fallback:1
 //   to load face 2 of the font gfx/vera-sans and use face 1
 //   or alternatively you can specify multiple fonts and faces
 //   Like this: gfx/vera-sans:2,gfx/fallback:1
 //   to load face 2 of the font gfx/vera-sans and use face 1
@@ -835,7 +835,7 @@ float FONT_USER6 = 14;     // 'user6', userdefined fonts
 float FONT_USER7 = 15;     // 'user7' slot, userdefined fonts
 //builtin definitions:
 float findfont(string s) = #356; // find font by fontname and return it's index
 float FONT_USER7 = 15;     // 'user7' slot, userdefined fonts
 //builtin definitions:
 float findfont(string s) = #356; // find font by fontname and return it's index
-float loadfont(string fontname, string fontmaps, string sizes, float slot, float fix_scale, float fix_voffset) = #357; 
+float loadfont(string fontname, string fontmaps, string sizes, float slot, float fix_scale, float fix_voffset) = #357;
 // loads font immediately so stringwidth() function can be used just after builtin call
 // returns a font slotnum (which is used to set drawfont to)
 // first 3 parms are identical to "loadfont" console command ones
 // loads font immediately so stringwidth() function can be used just after builtin call
 // returns a font slotnum (which is used to set drawfont to)
 // first 3 parms are identical to "loadfont" console command ones
@@ -866,7 +866,7 @@ float stringwidth_menu(string text, float allowColorCodes, vector size) = #468;
 //   r_font_postprocess_shadow_y X  : font outline shadow y shift amount, applied during outlining
 //   r_font_postprocess_shadow_z X  : font outline shadow z shift amount, applied during blurring
 //description: engine support for truetype/freetype fonts
 //   r_font_postprocess_shadow_y X  : font outline shadow y shift amount, applied during outlining
 //   r_font_postprocess_shadow_z X  : font outline shadow z shift amount, applied during blurring
 //description: engine support for truetype/freetype fonts
-//so .AFM+.PFB/.OTF/.TTF files could be stuffed as fontmaps in loadfont() 
+//so .AFM+.PFB/.OTF/.TTF files could be stuffed as fontmaps in loadfont()
 //(console command version will support them as well)
 
 //DP_CSQC_BINDMAPS
 //(console command version will support them as well)
 
 //DP_CSQC_BINDMAPS
@@ -897,7 +897,7 @@ float(string url, float id, string content_type, string delim, float buf, float
 //constant definitions:
 const float VF_MAINVIEW         = 400;
 //use setproperty(VF_MAINVIEW, 1); before calling R_RenderView for the render
 //constant definitions:
 const float VF_MAINVIEW         = 400;
 //use setproperty(VF_MAINVIEW, 1); before calling R_RenderView for the render
-//that shall become the "main" view, which is e.g. used by PRYDON_CLIENTCURSOR 
+//that shall become the "main" view, which is e.g. used by PRYDON_CLIENTCURSOR
 //this flag is set for the first scene, and not cleared by R_ClearScene
 //this flag is automatically cleared by R_RenderView
 //so when not using this extension, the first view rendered is the main view
 //this flag is set for the first scene, and not cleared by R_ClearScene
 //this flag is automatically cleared by R_RenderView
 //so when not using this extension, the first view rendered is the main view
index 39a2f593a1e0e8ec792b5c6f4f8b86115fce7632..ef86a02b3e730948844eaf088f86638e877bb2f4 100644 (file)
@@ -436,7 +436,7 @@ void(entity e, entity tagentity, string tagname) setattachment = #443; // attach
 //darkplaces implementation: Blub\0
 //cvar definitions:
 //   utf8_enable: enable utf8 encoding
 //darkplaces implementation: Blub\0
 //cvar definitions:
 //   utf8_enable: enable utf8 encoding
-//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc., 
+//description: utf8 characters are allowed inside cvars, protocol strings, files, progs strings, etc.,
 //and count as 1 char for string functions like strlen, substring, etc.
 // note: utf8_enable is run-time cvar, could be changed during execution
 // note: beware that str2chr() could return value bigger than 255 once utf8 is enabled
 //and count as 1 char for string functions like strlen, substring, etc.
 // note: utf8_enable is run-time cvar, could be changed during execution
 // note: beware that str2chr() could return value bigger than 255 once utf8 is enabled
@@ -498,7 +498,7 @@ void(entity e, entity tagentity, string tagname) setattachment = #443; // attach
 // description: allows alternative 'static' lightstyle syntax : "=value"
 // examples: "=0.5", "=2.0", "=2.75"
 // could be used to control switchable lights or making styled lights with brightness > 2
 // description: allows alternative 'static' lightstyle syntax : "=value"
 // examples: "=0.5", "=2.0", "=2.75"
 // could be used to control switchable lights or making styled lights with brightness > 2
-// Warning: this extension is experimental. It safely works in CSQC, but SVQC use is limited by the fact 
+// Warning: this extension is experimental. It safely works in CSQC, but SVQC use is limited by the fact
 // that other engines (which do not support this extension) could connect to a game and misunderstand this kind of lightstyle syntax
 
 //DP_LITSPRITES
 // that other engines (which do not support this extension) could connect to a game and misunderstand this kind of lightstyle syntax
 
 //DP_LITSPRITES
@@ -1358,14 +1358,14 @@ float(string sample) soundlength = #534; // returns length of sound sample in se
 //syntax of .dpsubs files: each line in .dpsubs file defines 1 subtitle, there are three tokens:
 //   <start> <end> "string"
 //   start: subtitle start time in seconds
 //syntax of .dpsubs files: each line in .dpsubs file defines 1 subtitle, there are three tokens:
 //   <start> <end> "string"
 //   start: subtitle start time in seconds
-//     end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started, 
+//     end: subtitle time-to-show in seconds, if 0 - subtitle will be showed until next subtitle is started,
 //          if below 0 - show until next subtitles minus this number of seconds
 //    text: subtitle text, color codes (Q3-style and ^xRGB) are allowed
 //example of subtitle file:
 //   3 0       "Vengeance! Vengeance for my eternity of suffering!"
 //   9 0       "Whelp! As if you knew what eternity was!"
 //   13        0       "Grovel before your true master."
 //          if below 0 - show until next subtitles minus this number of seconds
 //    text: subtitle text, color codes (Q3-style and ^xRGB) are allowed
 //example of subtitle file:
 //   3 0       "Vengeance! Vengeance for my eternity of suffering!"
 //   9 0       "Whelp! As if you knew what eternity was!"
 //   13        0       "Grovel before your true master."
-//   17        0       "Never!" 
+//   17        0       "Never!"
 //   18        7       "I'll hack you from crotch to gizzard and feed what's left of you to your brides..."
 
 //DP_SOLIDCORPSE
 //   18        7       "I'll hack you from crotch to gizzard and feed what's left of you to your brides..."
 
 //DP_SOLIDCORPSE
@@ -1732,11 +1732,11 @@ const float FORCETYPE_TORQUE = 3;
 .vector massofs;      // offsets a mass center out of object center, if not set a center of model bounds is used
 .float  friction;     // a friction of object, get multiplied by second objects's friction on contact
 .float  bouncefactor;
 .vector massofs;      // offsets a mass center out of object center, if not set a center of model bounds is used
 .float  friction;     // a friction of object, get multiplied by second objects's friction on contact
 .float  bouncefactor;
-.float  bouncestop; 
+.float  bouncestop;
 .float  jointtype;    // type of joint
 .float  forcetype;    // type of force
 .float  jointtype;    // type of joint
 .float  forcetype;    // type of force
-.float  erp;          // error restitution parameter, makes ODE solver attempt to fix errors in contacts, 
-                      // bringing together 2 joints or fixing object being stuch in other object, 
+.float  erp;          // error restitution parameter, makes ODE solver attempt to fix errors in contacts,
+                      // bringing together 2 joints or fixing object being stuch in other object,
                                  // a value of 0.1 will fix slightly, a value of 1.0 attempts to fix whole error in one frame
                                  // use with care as high values makes system unstable and likely to explode
 //builtin definitions:
                                  // a value of 0.1 will fix slightly, a value of 1.0 attempts to fix whole error in one frame
                                  // use with care as high values makes system unstable and likely to explode
 //builtin definitions:
index 2c21cd181ec367dd0140b2e754505b3b4a3dc6a0..21093868ece7d0b93e290587c1c24637e0657368 100644 (file)
@@ -303,7 +303,7 @@ float       drawstring(vector position, string text, vector scale, vector rgb, float a
 float  drawcolorcodedstring(vector position, string text, vector scale, float alpha, float flag) = #467;
 
 vector drawcolorcodedstring2(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #467;
 float  drawcolorcodedstring(vector position, string text, vector scale, float alpha, float flag) = #467;
 
 vector drawcolorcodedstring2(vector position, string text, vector scale, vector rgb, float alpha, float flag) = #467;
+
 float  drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #456;
 
 float  drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #457;
 float  drawpic(vector position, string pic, vector size, vector rgb, float alpha, float flag) = #456;
 
 float  drawfill(vector position, vector size, vector rgb, float alpha, float flag) = #457;
index b09cb01a96cb4f3e7d4608ab98b54f033e8ba6f6..f14a4ceb7c90c949a41ff322e3d2a3258e5e73ba 100644 (file)
@@ -385,7 +385,7 @@ void Container_moveItemAfter(entity me, entity other, entity dest)
                n.prevSibling = p;
        else
                me.lastChild = p;
                n.prevSibling = p;
        else
                me.lastChild = p;
-       
+
        // now other got removed. Insert it behind dest now.
        other.prevSibling = dest;
        if(dest)
        // now other got removed. Insert it behind dest now.
        other.prevSibling = dest;
        if(dest)
index 4356c26b1f168a5228c1b8e1cfef2b5dc89991dc..383578781544e96b900cca383fc702c377945de8 100644 (file)
@@ -4,7 +4,7 @@
 // - closable is 0
 // - rootDialog is 0
 // - title is ""
 // - closable is 0
 // - rootDialog is 0
 // - title is ""
-// - marginTop is 
+// - marginTop is
 // - intendedHeight ends up to be the tab's actual height, or at least close
 // - titleFontSize is 0
 // - marginTop cancels out as much of titleHeight as needed (that is, it should be actualMarginTop - titleHeight)
 // - intendedHeight ends up to be the tab's actual height, or at least close
 // - titleFontSize is 0
 // - marginTop cancels out as much of titleHeight as needed (that is, it should be actualMarginTop - titleHeight)
index 614f6d557679a465861e400a8e3cb9e1deebee1a..1c1bf5189bc34a48a824a46f132e96e79e2f83cb 100644 (file)
@@ -260,11 +260,11 @@ void InputBox_draw(entity me)
                vector p;
                vector theTempColor;
                float component;
                vector p;
                vector theTempColor;
                float component;
-               
+
                p = me.realOrigin - eX * me.scrollPos;
                theColor = '1 1 1';
                theAlpha = 1;    //theVariableAlpha = 1; // changes when ^ax found
                p = me.realOrigin - eX * me.scrollPos;
                theColor = '1 1 1';
                theAlpha = 1;    //theVariableAlpha = 1; // changes when ^ax found
-               
+
                n = strlen(me.text);
                for(i = 0; i < n; ++i)
                {
                n = strlen(me.text);
                for(i = 0; i < n; ++i)
                {
@@ -300,24 +300,24 @@ void InputBox_draw(entity me)
                                else if(ch2 == "x") // ^x found
                                {
                                        theColor = '1 1 1';
                                else if(ch2 == "x") // ^x found
                                {
                                        theColor = '1 1 1';
-                                       
+
                                        component = HEXDIGIT_TO_DEC(substring(me.text, i+2, 1));
                                        if (component >= 0) // ^xr found
                                        {
                                                theTempColor_x = component/15;
                                        component = HEXDIGIT_TO_DEC(substring(me.text, i+2, 1));
                                        if (component >= 0) // ^xr found
                                        {
                                                theTempColor_x = component/15;
-                                               
+
                                                component = HEXDIGIT_TO_DEC(substring(me.text, i+3, 1));
                                                if (component >= 0) // ^xrg found
                                                {
                                                        theTempColor_y = component/15;
                                                component = HEXDIGIT_TO_DEC(substring(me.text, i+3, 1));
                                                if (component >= 0) // ^xrg found
                                                {
                                                        theTempColor_y = component/15;
-                                                       
+
                                                        component = HEXDIGIT_TO_DEC(substring(me.text, i+4, 1));
                                                        if (component >= 0) // ^xrgb found
                                                        {
                                                                theTempColor_z = component/15;
                                                                theColor = theTempColor;
                                                                w = draw_TextWidth(substring(me.text, i, 5), 0, me.realFontSize);
                                                        component = HEXDIGIT_TO_DEC(substring(me.text, i+4, 1));
                                                        if (component >= 0) // ^xrgb found
                                                        {
                                                                theTempColor_z = component/15;
                                                                theColor = theTempColor;
                                                                w = draw_TextWidth(substring(me.text, i, 5), 0, me.realFontSize);
-                                                               
+
                                                                draw_Fill(p, eX * w + eY * me.realFontSize_y, '1 1 1', 0.5);
                                                                draw_Text(p, substring(me.text, i, 5), me.realFontSize, theColor, 1, 0);    // theVariableAlpha instead of 1 using alpha tags ^ax
                                                                i += 3;
                                                                draw_Fill(p, eX * w + eY * me.realFontSize_y, '1 1 1', 0.5);
                                                                draw_Text(p, substring(me.text, i, 5), me.realFontSize, theColor, 1, 0);    // theVariableAlpha instead of 1 using alpha tags ^ax
                                                                i += 3;
index afe82e8926d7e763a76e0cba7f84ba0da92f4d9c..ca7ab8fc3785c479c27bee31ee099268a80a3659 100644 (file)
@@ -92,7 +92,7 @@ void Nexposee_calc(entity me)
        float scale;
        entity e, e2;
        vector emins, emaxs, e2mins, e2maxs;
        float scale;
        entity e, e2;
        vector emins, emaxs, e2mins, e2maxs;
-       
+
        for(scale = 0.7;; scale *= 0.99)
        {
                Nexposee_Calc_Scale(me, scale);
        for(scale = 0.7;; scale *= 0.99)
        {
                Nexposee_Calc_Scale(me, scale);
index 7f3a2873fab88d4e363f8084b0405e95db2c7a16..8cd72ba9c76a253b73001f2b1a32e3b95d23bf89 100644 (file)
@@ -5,7 +5,7 @@ CLASS(Tab) EXTENDS(Dialog)
        ATTRIB(Tab, rootDialog, float, 0)
        ATTRIB(Tab, title, string, string_null)
        ATTRIB(Tab, titleFontSize, float, 0) // pixels
        ATTRIB(Tab, rootDialog, float, 0)
        ATTRIB(Tab, title, string, string_null)
        ATTRIB(Tab, titleFontSize, float, 0) // pixels
-       
+
        // still to be customized
        ATTRIB(Tab, intendedWidth, float, 0)
        ATTRIB(Tab, rows, float, 3)
        // still to be customized
        ATTRIB(Tab, intendedWidth, float, 0)
        ATTRIB(Tab, rows, float, 3)
index fd6327244129205170b4e87456190b1917142264..d5eff6e4935d89f7309b8e3856e0bfece0f1c13b 100644 (file)
@@ -441,7 +441,7 @@ float m_allocatetooltipbox(vector pos)
        v = pos + avoidplus;
        if(m_testtooltipbox(v))
                return TRUE;
        v = pos + avoidplus;
        if(m_testtooltipbox(v))
                return TRUE;
-       
+
        // bottom center
        v_x = pos_x - menuTooltipSize_x * 0.5;
        if(m_testtooltipbox(v))
        // bottom center
        v_x = pos_x - menuTooltipSize_x * 0.5;
        if(m_testtooltipbox(v))
@@ -461,12 +461,12 @@ float m_allocatetooltipbox(vector pos)
        v_x = pos_x - menuTooltipSize_x * 0.5;
        if(m_testtooltipbox(v))
                return TRUE;
        v_x = pos_x - menuTooltipSize_x * 0.5;
        if(m_testtooltipbox(v))
                return TRUE;
-       
+
        // top right
        v_x = pos_x + avoidplus_x;
        if(m_testtooltipbox(v))
                return TRUE;
        // top right
        v_x = pos_x + avoidplus_x;
        if(m_testtooltipbox(v))
                return TRUE;
-       
+
        return FALSE;
 }
 entity m_findtooltipitem(entity root, vector pos)
        return FALSE;
 }
 entity m_findtooltipitem(entity root, vector pos)
@@ -990,7 +990,7 @@ void m_goto(string itemname)
                for(e = NULL; (e = find(e, name, itemname)); )
                        if(e.classname != "vtbl")
                                break;
                for(e = NULL; (e = find(e, name, itemname)); )
                        if(e.classname != "vtbl")
                                break;
-                               
+
                if((e) && (!e.requiresConnection || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))))
                {
                        m_hide();
                if((e) && (!e.requiresConnection || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))))
                {
                        m_hide();
index 85bc6c2afa9fe6678c7f239de9343c649f7a4ad9..1e122066c526349335a42505038e2f5bb64af766 100644 (file)
@@ -17,7 +17,7 @@
 #endif
 
 #define CLASS(cname)                       entity spawn##cname(); entity cname##_vtbl;
 #endif
 
 #define CLASS(cname)                       entity spawn##cname(); entity cname##_vtbl;
-#define EXTENDS(base)                
+#define EXTENDS(base)
 #define METHOD(cname,name,prototype)       prototype cname##_##name; .prototype name;
 #define ATTRIB(cname,name,type,val)        .type name;
 #define ATTRIBARRAY(cname,name,type,cnt)   .type name[cnt];
 #define METHOD(cname,name,prototype)       prototype cname##_##name; .prototype name;
 #define ATTRIB(cname,name,type,val)        .type name;
 #define ATTRIBARRAY(cname,name,type,cnt)   .type name[cnt];
index c5500394bd46d550a14b615c6a798e00f2356016..e3043184a44f35cd2676375466fff57ec9c91014 100644 (file)
@@ -38,7 +38,7 @@ void XonoticSliderCheckBox_configureXonoticSliderCheckBox(entity me, float theOf
        if(theControlledSlider.value == median(theControlledSlider.valueMin, theControlledSlider.value, theControlledSlider.valueMax))
                me.savedValue = theControlledSlider.value;
        else
        if(theControlledSlider.value == median(theControlledSlider.valueMin, theControlledSlider.value, theControlledSlider.valueMax))
                me.savedValue = theControlledSlider.value;
        else
-               me.savedValue = theControlledSlider.valueMin; 
+               me.savedValue = theControlledSlider.valueMin;
        me.controlledSlider = theControlledSlider;
        me.configureCheckBox(me, theText, me.fontSize, me.image);
        me.tooltip = theControlledSlider.tooltip;
        me.controlledSlider = theControlledSlider;
        me.configureCheckBox(me, theText, me.fontSize, me.image);
        me.tooltip = theControlledSlider.tooltip;
index eb9590827da99ce9c835a1e559f29d1758734d63..eca6df5f358f44c9210f7c1cb20eb88bfcb3d8c5 100644 (file)
@@ -141,7 +141,7 @@ void XonoticColorpicker_draw(entity me)
        // for this to work, C/(1-B) must be in 0..1
        // B must be < 1
        // C must be < 1-B
        // for this to work, C/(1-B) must be in 0..1
        // B must be < 1
        // C must be < 1-B
-       
+
        B = bound(0, B, 1);
        C = bound(0, C, 1-B);
 
        B = bound(0, B, 1);
        C = bound(0, C, 1-B);
 
index 2703b233c310a94f910895b5ee34566fca2fb14b..7fe3a600f2e57d49338a1f7b3ac358fa9f09590e 100644 (file)
@@ -121,7 +121,7 @@ void XonoticCrosshairButton_draw(entity me)
        {
                if(cvar("crosshair_dot_color_custom") && (cvar_string("crosshair_dot_color") != "0"))
                        rgb = stov(cvar_string("crosshair_dot_color"));
        {
                if(cvar("crosshair_dot_color_custom") && (cvar_string("crosshair_dot_color") != "0"))
                        rgb = stov(cvar_string("crosshair_dot_color"));
-                       
+
                draw_Picture('0.5 0.5 0' - 0.5 * sz * cvar("crosshair_dot_size"), me.src4, sz * cvar("crosshair_dot_size"), rgb, a * cvar("crosshair_dot_alpha"));
        }
 }
                draw_Picture('0.5 0.5 0' - 0.5 * sz * cvar("crosshair_dot_size"), me.src4, sz * cvar("crosshair_dot_size"), rgb, a * cvar("crosshair_dot_alpha"));
        }
 }
index 52f1a1f26e7890d18da2c2a4257749815605e9d9..722917f553c8e7876f03ee0a0b4b0799f1bd4890 100644 (file)
@@ -65,7 +65,7 @@ void XonoticCvarList_setSelected(entity me, float i)
        SUPER(XonoticCvarList).setSelected(me, i);
        if(me.nItems == 0)
                return;
        SUPER(XonoticCvarList).setSelected(me, i);
        if(me.nItems == 0)
                return;
-       
+
        if(me.cvarName)
                strunzone(me.cvarName);
        if(me.cvarDescription)
        if(me.cvarName)
                strunzone(me.cvarName);
        if(me.cvarDescription)
@@ -137,7 +137,7 @@ void XonoticCvarList_drawListBoxItem(entity me, float i, vector absSize, float i
 
        if(isSelected)
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
 
        if(isSelected)
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-       
+
        k = bufstr_get(me.handle, i);
 
        v = cvar_string(k);
        k = bufstr_get(me.handle, i);
 
        v = cvar_string(k);
index 2daed8bcbca504b33ea1993b954680304b5915c9..ee8cf6a4f613c3e3db2ac8df019cfdcf3b5ac22e 100644 (file)
@@ -5,13 +5,13 @@ CLASS(XonoticDemoList) EXTENDS(XonoticListBox)
        METHOD(XonoticDemoList, resizeNotify, void(entity, vector, vector, vector, vector))
        METHOD(XonoticDemoList, drawListBoxItem, void(entity, float, vector, float))
        METHOD(XonoticDemoList, getDemos, void(entity))
        METHOD(XonoticDemoList, resizeNotify, void(entity, vector, vector, vector, vector))
        METHOD(XonoticDemoList, drawListBoxItem, void(entity, float, vector, float))
        METHOD(XonoticDemoList, getDemos, void(entity))
-       METHOD(XonoticDemoList, startDemo, void(entity))        
+       METHOD(XonoticDemoList, startDemo, void(entity))
        METHOD(XonoticDemoList, demoName, string(entity, float))
        METHOD(XonoticDemoList, clickListBoxItem, void(entity, float, vector))
        METHOD(XonoticDemoList, keyDown, float(entity, float, float, float))
        METHOD(XonoticDemoList, destroy, void(entity))
        METHOD(XonoticDemoList, showNotify, void(entity))
        METHOD(XonoticDemoList, demoName, string(entity, float))
        METHOD(XonoticDemoList, clickListBoxItem, void(entity, float, vector))
        METHOD(XonoticDemoList, keyDown, float(entity, float, float, float))
        METHOD(XonoticDemoList, destroy, void(entity))
        METHOD(XonoticDemoList, showNotify, void(entity))
-       
+
        ATTRIB(XonoticDemoList, listDemo, float, -1)
        ATTRIB(XonoticDemoList, realFontSize, vector, '0 0 0')
        ATTRIB(XonoticDemoList, columnNameOrigin, float, 0)
        ATTRIB(XonoticDemoList, listDemo, float, -1)
        ATTRIB(XonoticDemoList, realFontSize, vector, '0 0 0')
        ATTRIB(XonoticDemoList, columnNameOrigin, float, 0)
@@ -19,10 +19,10 @@ CLASS(XonoticDemoList) EXTENDS(XonoticListBox)
        ATTRIB(XonoticDemoList, realUpperMargin, float, 0)
        ATTRIB(XonoticDemoList, origin, vector, '0 0 0')
        ATTRIB(XonoticDemoList, itemAbsSize, vector, '0 0 0')
        ATTRIB(XonoticDemoList, realUpperMargin, float, 0)
        ATTRIB(XonoticDemoList, origin, vector, '0 0 0')
        ATTRIB(XonoticDemoList, itemAbsSize, vector, '0 0 0')
-       
+
        ATTRIB(XonoticDemoList, lastClickedDemo, float, -1)
        ATTRIB(XonoticDemoList, lastClickedTime, float, 0)
        ATTRIB(XonoticDemoList, lastClickedDemo, float, -1)
        ATTRIB(XonoticDemoList, lastClickedTime, float, 0)
-       ATTRIB(XonoticDemoList, filterString, string, string_null)      
+       ATTRIB(XonoticDemoList, filterString, string, string_null)
 ENDCLASS(XonoticDemoList)
 
 entity makeXonoticDemoList();
 ENDCLASS(XonoticDemoList)
 
 entity makeXonoticDemoList();
@@ -44,7 +44,7 @@ entity makeXonoticDemoList()
 void XonoticDemoList_configureXonoticDemoList(entity me)
 {
        me.configureXonoticListBox(me);
 void XonoticDemoList_configureXonoticDemoList(entity me)
 {
        me.configureXonoticListBox(me);
-       me.getDemos(me);        
+       me.getDemos(me);
 }
 
 string XonoticDemoList_demoName(entity me, float i )
 }
 
 string XonoticDemoList_demoName(entity me, float i )
@@ -59,23 +59,23 @@ string XonoticDemoList_demoName(entity me, float i )
 void XonoticDemoList_getDemos(entity me)
 {
        string s;
 void XonoticDemoList_getDemos(entity me)
 {
        string s;
-       
+
        if(me.filterString)
        if(me.filterString)
-               //subdirectory in filterString allowed  
-               s=strcat("demos/*", me.filterString, "*.dem");          
+               //subdirectory in filterString allowed
+               s=strcat("demos/*", me.filterString, "*.dem");
        else
                s="demos/*.dem";
        else
                s="demos/*.dem";
-       
-       //dprint("Search demos with the pattern ", s, "\n");    
+
+       //dprint("Search demos with the pattern ", s, "\n");
        if(me.listDemo >= 0)
                search_end(me.listDemo);
        if(me.listDemo >= 0)
                search_end(me.listDemo);
-               
+
        me.listDemo = search_begin(s, FALSE, TRUE);
 
        if(me.listDemo < 0)
                me.nItems=0;
        else
        me.listDemo = search_begin(s, FALSE, TRUE);
 
        if(me.listDemo < 0)
                me.nItems=0;
        else
-               me.nItems=search_getsize(me.listDemo);                          
+               me.nItems=search_getsize(me.listDemo);
 }
 
 void XonoticDemoList_destroy(entity me)
 }
 
 void XonoticDemoList_destroy(entity me)
@@ -101,10 +101,10 @@ void XonoticDemoList_drawListBoxItem(entity me, float i, vector absSize, float i
        string s;
        if(isSelected)
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
        string s;
        if(isSelected)
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-               
+
        s = me.demoName(me,i);
        s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
        s = me.demoName(me,i);
        s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
-       draw_Text(me.realUpperMargin * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);           
+       draw_Text(me.realUpperMargin * eY + (me.columnNameOrigin + 0.00 * (me.columnNameSize - draw_TextWidth(s, 0, me.realFontSize))) * eX, s, me.realFontSize, '1 1 1', SKINALPHA_TEXT, 0);
 }
 
 void XonoticDemoList_showNotify(entity me)
 }
 
 void XonoticDemoList_showNotify(entity me)
@@ -113,15 +113,15 @@ void XonoticDemoList_showNotify(entity me)
 }
 
 void DemoList_Filter_Change(entity box, entity me)
 }
 
 void DemoList_Filter_Change(entity box, entity me)
-{      
+{
        if(me.filterString)
                strunzone(me.filterString);
        if(me.filterString)
                strunzone(me.filterString);
-       
+
        if(box.text != "")
                me.filterString = strzone(box.text);
        else
                me.filterString = string_null;
        if(box.text != "")
                me.filterString = strzone(box.text);
        else
                me.filterString = string_null;
-               
+
        me.getDemos(me);
 }
 
        me.getDemos(me);
 }
 
@@ -129,7 +129,7 @@ void XonoticDemoList_startDemo(entity me)
 {
        string s;
        s = me.demoName(me,me.selectedItem);
 {
        string s;
        s = me.demoName(me,me.selectedItem);
-       localcmd("playdemo \"demos/", s, ".dem\" \nwait \ntogglemenu\n");       
+       localcmd("playdemo \"demos/", s, ".dem\" \nwait \ntogglemenu\n");
 }
 
 void StartDemo_Click(entity btn, entity me)
 }
 
 void StartDemo_Click(entity btn, entity me)
@@ -141,7 +141,7 @@ void TimeDemo_Click(entity btn, entity me)
 {
        string s;
        s = me.demoName(me,me.selectedItem);
 {
        string s;
        s = me.demoName(me,me.selectedItem);
-       localcmd("timedemo \"demos/", s, ".dem\" \nwait \ntogglemenu\n");       
+       localcmd("timedemo \"demos/", s, ".dem\" \nwait \ntogglemenu\n");
 }
 
 void XonoticDemoList_clickListBoxItem(entity me, float i, vector where)
 }
 
 void XonoticDemoList_clickListBoxItem(entity me, float i, vector where)
index 39a7d2c701aa34db6e9733632dfdbdef5fdb662b..01ce7ba4347edba58ea9fc77a97f5d4d11dd2c86 100644 (file)
@@ -19,13 +19,13 @@ float CheckFirstRunButton(entity me)
 {
        if(cvar_string("_cl_name") != "Player")
                return 1;
 {
        if(cvar_string("_cl_name") != "Player")
                return 1;
-               
+
        if(cvar_string("_menu_prvm_language") != prvm_language)
                return 1; // OK will then reopen the dialog in another language
        if(cvar_string("_menu_prvm_language") != prvm_language)
                return 1; // OK will then reopen the dialog in another language
-               
+
        if(cvar_string("cl_allow_uid2name") != "-1")
        if(cvar_string("cl_allow_uid2name") != "-1")
-               return 1; 
-               
+               return 1;
+
        return 0;
 }
 
        return 0;
 }
 
@@ -62,7 +62,7 @@ void XonoticFirstRunDialog_fill(entity me)
        me.TR(me);
        me.TR(me);
        me.TR(me);
        me.TR(me);
        me.TR(me);
        me.TR(me);
-       
+
        me.gotoRC(me, 3, 4); me.setFirstColumn(me, me.currentColumn);
        me.TR(me);
                me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Text language:")));
        me.gotoRC(me, 3, 4); me.setFirstColumn(me, me.currentColumn);
        me.TR(me);
                me.TD(me, 1, 2, e = makeXonoticTextLabel(0, _("Text language:")));
@@ -75,7 +75,7 @@ void XonoticFirstRunDialog_fill(entity me)
 
        me.gotoRC(me, me.rows - 4, 0);
        me.TD(me, 1, me.columns, e = makeXonoticTextLabel(0.5, _("Allow player statistics to use your nickname at stats.xonotic.org?")));
 
        me.gotoRC(me, me.rows - 4, 0);
        me.TD(me, 1, me.columns, e = makeXonoticTextLabel(0.5, _("Allow player statistics to use your nickname at stats.xonotic.org?")));
-       
+
        me.gotoRC(me, me.rows - 3, 0);
        me.TDempty(me, 1.5);
        me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_allow_uid2name", "1", ZCTX(_("ALWU2N^Yes"))));
        me.gotoRC(me, me.rows - 3, 0);
        me.TDempty(me, 1.5);
        me.TD(me, 1, 1, e = makeXonoticRadioButton(1, "cl_allow_uid2name", "1", ZCTX(_("ALWU2N^Yes"))));
index 25eddc8a13316208327bc1c3654cc3060cf58ef5..09e6c5339f91ed6eca68a5463b9dc93abee12e59 100644 (file)
@@ -78,7 +78,7 @@ void XonoticHUDExitDialog_fill(entity me)
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
                me.TD(me, 2, 2.6, e = makeXonoticColorpickerString("hud_dock_color", "hud_dock_color"));
        me.TR(me);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Color:")));
                me.TD(me, 2, 2.6, e = makeXonoticColorpickerString("hud_dock_color", "hud_dock_color"));
        me.TR(me);
-       me.TR(me);      
+       me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
                        me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock_alpha"));
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Alpha:")));
                        me.TD(me, 1, 2.6, e = makeXonoticTextSlider("hud_dock_alpha"));
index 3fc6f31fe322e47bd208a0bdc1384754498defa7..60f52e1fa47ac649da8f0bb457f5eff79fe4e9d6 100644 (file)
@@ -5,7 +5,7 @@ CLASS(XonoticServerCreateTab) EXTENDS(XonoticTab)
        ATTRIB(XonoticServerCreateTab, title, string, _("Create"))
        ATTRIB(XonoticServerCreateTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticServerCreateTab, rows, float, 22)
        ATTRIB(XonoticServerCreateTab, title, string, _("Create"))
        ATTRIB(XonoticServerCreateTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticServerCreateTab, rows, float, 22)
-       ATTRIB(XonoticServerCreateTab, columns, float, 6.2) // added extra .2 for center space 
+       ATTRIB(XonoticServerCreateTab, columns, float, 6.2) // added extra .2 for center space
 
        ATTRIB(XonoticServerCreateTab, mapListBox, entity, NULL)
        ATTRIB(XonoticServerCreateTab, sliderFraglimit, entity, NULL)
 
        ATTRIB(XonoticServerCreateTab, mapListBox, entity, NULL)
        ATTRIB(XonoticServerCreateTab, sliderFraglimit, entity, NULL)
index 84115f1ed651fcaac7852871657b170b478eb9e4..da85975de98f5d0596c4fa9ea08b2bc02b90a7d4 100644 (file)
@@ -5,7 +5,7 @@ CLASS(XonoticDemoBrowserTab) EXTENDS(XonoticTab)
        ATTRIB(XonoticDemoBrowserTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticDemoBrowserTab, rows, float, 22)
        ATTRIB(XonoticDemoBrowserTab, columns, float, 4)
        ATTRIB(XonoticDemoBrowserTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticDemoBrowserTab, rows, float, 22)
        ATTRIB(XonoticDemoBrowserTab, columns, float, 4)
-       ATTRIB(XonoticDemoBrowserTab, name, string, "DemoBrowser")      
+       ATTRIB(XonoticDemoBrowserTab, name, string, "DemoBrowser")
 ENDCLASS(XonoticDemoBrowserTab)
 entity makeXonoticDemoBrowserTab();
 #endif
 ENDCLASS(XonoticDemoBrowserTab)
 entity makeXonoticDemoBrowserTab();
 #endif
@@ -32,10 +32,10 @@ void XonoticDemoBrowserTab_fill(entity me)
                        e.onChange = DemoList_Filter_Change;
                        e.onChangeEntity = dlist;
                        dlist.controlledTextbox = e;
                        e.onChange = DemoList_Filter_Change;
                        e.onChangeEntity = dlist;
                        dlist.controlledTextbox = e;
-                       
+
        me.TR(me);
                me.TD(me, me.rows - 4, me.columns, dlist);
        me.TR(me);
                me.TD(me, me.rows - 4, me.columns, dlist);
-               
+
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Timedemo"), '0 0 0'));
                        e.onClick = TimeDemo_Click;
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Timedemo"), '0 0 0'));
                        e.onClick = TimeDemo_Click;
index 0b9bed4df9b5a02f103a435fab26a8cdc37349ab..5ecb77dd795d17d192f9179e8b96a0b37f4a950d 100644 (file)
@@ -55,43 +55,43 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        if(me.currentServerName)
                strunzone(me.currentServerName);
        me.currentServerName = string_null;
        if(me.currentServerName)
                strunzone(me.currentServerName);
        me.currentServerName = string_null;
-       
+
        if(me.currentServerCName)
                strunzone(me.currentServerCName);
        me.currentServerCName = string_null;
        if(me.currentServerCName)
                strunzone(me.currentServerCName);
        me.currentServerCName = string_null;
-       
+
        if(me.currentServerType)
                strunzone(me.currentServerType);
        me.currentServerType = string_null;
        if(me.currentServerType)
                strunzone(me.currentServerType);
        me.currentServerType = string_null;
-       
+
        if(me.currentServerMap)
                strunzone(me.currentServerMap);
        me.currentServerMap = string_null;
        if(me.currentServerMap)
                strunzone(me.currentServerMap);
        me.currentServerMap = string_null;
-       
+
        if(me.currentServerPlayers)
                strunzone(me.currentServerPlayers);
        me.currentServerPlayers = string_null;
        if(me.currentServerPlayers)
                strunzone(me.currentServerPlayers);
        me.currentServerPlayers = string_null;
-       
+
        if(me.currentServerNumPlayers)
                strunzone(me.currentServerNumPlayers);
        me.currentServerNumPlayers = string_null;
        if(me.currentServerNumPlayers)
                strunzone(me.currentServerNumPlayers);
        me.currentServerNumPlayers = string_null;
-       
+
        if(me.currentServerNumBots)
                strunzone(me.currentServerNumBots);
        me.currentServerNumBots = string_null;
        if(me.currentServerNumBots)
                strunzone(me.currentServerNumBots);
        me.currentServerNumBots = string_null;
-       
+
        if(me.currentServerNumFreeSlots)
                strunzone(me.currentServerNumFreeSlots);
        me.currentServerNumFreeSlots = string_null;
        if(me.currentServerNumFreeSlots)
                strunzone(me.currentServerNumFreeSlots);
        me.currentServerNumFreeSlots = string_null;
-       
+
        if(me.currentServerMod)
                strunzone(me.currentServerMod);
        me.currentServerMod = string_null;
        if(me.currentServerMod)
                strunzone(me.currentServerMod);
        me.currentServerMod = string_null;
-       
+
        if(me.currentServerVersion)
                strunzone(me.currentServerVersion);
        me.currentServerVersion = string_null;
        if(me.currentServerVersion)
                strunzone(me.currentServerVersion);
        me.currentServerVersion = string_null;
-       
+
        // not zoned!
        //if(me.currentServerEncrypt)
        //      strunzone(me.currentServerEncrypt);
        // not zoned!
        //if(me.currentServerEncrypt)
        //      strunzone(me.currentServerEncrypt);
@@ -99,11 +99,11 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        if(me.currentServerPure)
                strunzone(me.currentServerPure);
        me.currentServerPure = string_null;
        if(me.currentServerPure)
                strunzone(me.currentServerPure);
        me.currentServerPure = string_null;
-       
+
        if(me.currentServerKey)
                strunzone(me.currentServerKey);
        me.currentServerKey = string_null;
        if(me.currentServerKey)
                strunzone(me.currentServerKey);
        me.currentServerKey = string_null;
-       
+
        if(me.currentServerID)
                strunzone(me.currentServerID);
        me.currentServerID = string_null;
        if(me.currentServerID)
                strunzone(me.currentServerID);
        me.currentServerID = string_null;
@@ -158,7 +158,7 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
 
        j = MapInfo_Type_FromString(typestr); // try and get the real name of the game type
        if(j) { typestr = MapInfo_Type_ToText(j); } // only set it if we actually found it
 
        j = MapInfo_Type_FromString(typestr); // try and get the real name of the game type
        if(j) { typestr = MapInfo_Type_ToText(j); } // only set it if we actually found it
-       
+
        me.currentServerType = strzone(typestr);
        me.typeLabel.setText(me.typeLabel, me.currentServerType);
 
        me.currentServerType = strzone(typestr);
        me.typeLabel.setText(me.typeLabel, me.currentServerType);
 
@@ -177,7 +177,7 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
        s = ftos(numb);
        me.currentServerNumBots = strzone(s);
        me.numBotsLabel.setText(me.numBotsLabel, me.currentServerNumBots);
        s = ftos(numb);
        me.currentServerNumBots = strzone(s);
        me.numBotsLabel.setText(me.numBotsLabel, me.currentServerNumBots);
-       
+
        if(freeslots < 0) { freeslots = maxp - numh - numb; }
        s = ftos(freeslots);
        me.currentServerNumFreeSlots = strzone(s);
        if(freeslots < 0) { freeslots = maxp - numh - numb; }
        s = ftos(freeslots);
        me.currentServerNumFreeSlots = strzone(s);
@@ -230,7 +230,7 @@ void XonoticServerInfoDialog_loadServerInfo(entity me, float i)
                        break;
        }
        me.encryptLabel.setText(me.encryptLabel, me.currentServerEncrypt);
                        break;
        }
        me.encryptLabel.setText(me.encryptLabel, me.currentServerEncrypt);
-       
+
        s = crypto_getidfp(me.currentServerCName);
        if (!s) { s = _("N/A"); }
        me.currentServerID = strzone(s);
        s = crypto_getidfp(me.currentServerCName);
        if (!s) { s = _("N/A"); }
        me.currentServerID = strzone(s);
@@ -257,7 +257,7 @@ void XonoticServerInfoDialog_fill(entity me)
                e.colorL = SKINCOLOR_SERVERINFO_IP;
                e.allowCut = 1;
                me.cnameLabel = e;
                e.colorL = SKINCOLOR_SERVERINFO_IP;
                e.allowCut = 1;
                me.cnameLabel = e;
-               
+
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Gametype:")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Gametype:")));
@@ -284,7 +284,7 @@ void XonoticServerInfoDialog_fill(entity me)
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, ""));
                e.allowCut = 1;
                me.pureLabel = e;
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, ""));
                e.allowCut = 1;
                me.pureLabel = e;
-               
+
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Players:")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Players:")));
@@ -301,7 +301,7 @@ void XonoticServerInfoDialog_fill(entity me)
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, ""));
                e.allowCut = 1;
                me.numFreeSlotsLabel = e;
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, ""));
                e.allowCut = 1;
                me.numFreeSlotsLabel = e;
-               
+
        me.gotoRC(me, me.rows - 5, 0);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Encryption:")));
                me.TD(me, 1, 5.4, e = makeXonoticTextLabel(0, ""));
        me.gotoRC(me, me.rows - 5, 0);
                me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Encryption:")));
                me.TD(me, 1, 5.4, e = makeXonoticTextLabel(0, ""));
index 482a60510e88cdd2f52d6cc68c9e8d49c6f4ad63..f4bd359ece79d350a1034427607a470a7dd374db 100644 (file)
@@ -5,7 +5,7 @@ CLASS(XonoticPlayerSettingsTab) EXTENDS(XonoticTab)
        ATTRIB(XonoticPlayerSettingsTab, title, string, _("Player Setup"))
        ATTRIB(XonoticPlayerSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticPlayerSettingsTab, rows, float, 22)
        ATTRIB(XonoticPlayerSettingsTab, title, string, _("Player Setup"))
        ATTRIB(XonoticPlayerSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticPlayerSettingsTab, rows, float, 22)
-       ATTRIB(XonoticPlayerSettingsTab, columns, float, 6.2) // added extra .2 for center space 
+       ATTRIB(XonoticPlayerSettingsTab, columns, float, 6.2) // added extra .2 for center space
        ATTRIB(XonoticPlayerSettingsTab, playerNameLabel, entity, NULL)
        ATTRIB(XonoticPlayerSettingsTab, playerNameLabelAlpha, float, 0)
 ENDCLASS(XonoticPlayerSettingsTab)
        ATTRIB(XonoticPlayerSettingsTab, playerNameLabel, entity, NULL)
        ATTRIB(XonoticPlayerSettingsTab, playerNameLabelAlpha, float, 0)
 ENDCLASS(XonoticPlayerSettingsTab)
@@ -166,7 +166,7 @@ void XonoticPlayerSettingsTab_fill(entity me)
                        e.onClickEntity = main.weaponsDialog;
                // I don't really think this is useful as is, and especially it doesn't look very clean...
                // In the future, if ALL of these buttons had some information, then it would be justified/clean
                        e.onClickEntity = main.weaponsDialog;
                // I don't really think this is useful as is, and especially it doesn't look very clean...
                // In the future, if ALL of these buttons had some information, then it would be justified/clean
-               //me.TD(me, 1, 1, e0 = makeXonoticTextLabel(0, string_null)); 
+               //me.TD(me, 1, 1, e0 = makeXonoticTextLabel(0, string_null));
                //      e0.textEntity = main.weaponsDialog;
                //      e0.allowCut = 1;
        me.TR(me);
                //      e0.textEntity = main.weaponsDialog;
                //      e0.allowCut = 1;
        me.TR(me);
@@ -174,7 +174,7 @@ void XonoticPlayerSettingsTab_fill(entity me)
                me.TD(me, 1, 2, e = makeXonoticButton(_("HUD settings"), '0 0 0'));
                        e.onClick = DialogOpenButton_Click;
                        e.onClickEntity = main.hudDialog;
                me.TD(me, 1, 2, e = makeXonoticButton(_("HUD settings"), '0 0 0'));
                        e.onClick = DialogOpenButton_Click;
                        e.onClickEntity = main.hudDialog;
-               // TODO: show hud config name with text here 
+               // TODO: show hud config name with text here
 
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "color -1 -1;name \"$_cl_name\";sendcvar cl_weaponpriority;sendcvar cl_autoswitch;sendcvar cl_forceplayermodels;sendcvar cl_forceplayermodelsfromxonotic;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY));
 
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "color -1 -1;name \"$_cl_name\";sendcvar cl_weaponpriority;sendcvar cl_autoswitch;sendcvar cl_forceplayermodels;sendcvar cl_forceplayermodelsfromxonotic;playermodel $_cl_playermodel;playerskin $_cl_playerskin", COMMANDBUTTON_APPLY));
index a18fec1c4dcf63548deb3fac2241e36b59fcb5ca..c4cdc3e70502ca65c255b13b79b26c21e75c3939 100644 (file)
@@ -23,7 +23,7 @@ string XonoticCrosshairDialog_toString(entity me)
 void XonoticCrosshairDialog_fill(entity me)
 {
        entity e;
 void XonoticCrosshairDialog_fill(entity me)
 {
        entity e;
-       
+
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center crosshair dot")));
                setDependent(e, "crosshair_enabled", 1, 2);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", _("Enable center crosshair dot")));
                setDependent(e, "crosshair_enabled", 1, 2);
@@ -84,9 +84,9 @@ void XonoticCrosshairDialog_fill(entity me)
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.25, 0, "crosshair_pickup", _("Animate when picking up an item")));
                        setDependent(e, "crosshair_enabled", 1, 2);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(0.25, 0, "crosshair_pickup", _("Animate when picking up an item")));
                        setDependent(e, "crosshair_enabled", 1, 2);
-                       
+
        me.TR(me);
        me.TR(me);
-                       
+
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
index a027c07017d928f11df7db9f318b66a8acf501b1..8d969fd7a3ef35fce3a0ba58cdc2bd3208d3e008 100644 (file)
@@ -30,12 +30,12 @@ void XonoticHUDDialog_showNotify(entity me)
 }
 string XonoticHUDDialog_toString(entity me)
 {
 }
 string XonoticHUDDialog_toString(entity me)
 {
-       return "hi"; // TODO: show hud config name with text here 
+       return "hi"; // TODO: show hud config name with text here
 }
 void XonoticHUDDialog_fill(entity me)
 {
        entity e;
 }
 void XonoticHUDDialog_fill(entity me)
 {
        entity e;
-       
+
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Damage:")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Damage:")));
        me.TR(me);
@@ -55,7 +55,7 @@ void XonoticHUDDialog_fill(entity me)
                me.TD(me, 1, 2, e = makeXonoticSlider(0.25, 1, 0.05, "hud_damage_fade_rate"));
                setDependent(e, "hud_damage", 0.001, 100);
        me.TR(me);
                me.TD(me, 1, 2, e = makeXonoticSlider(0.25, 1, 0.05, "hud_damage_fade_rate"));
                setDependent(e, "hud_damage", 0.001, 100);
        me.TR(me);
-       
+
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Waypoints")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Waypoints")));
        me.TR(me);
@@ -78,7 +78,7 @@ void XonoticHUDDialog_fill(entity me)
                makeMulti(e, "g_waypointsprite_edgeoffset_top g_waypointsprite_edgeoffset_left g_waypointsprite_edgeoffset_right");
                setDependent(e, "cl_hidewaypoints", 0, 0);
        me.TR(me);
                makeMulti(e, "g_waypointsprite_edgeoffset_top g_waypointsprite_edgeoffset_left g_waypointsprite_edgeoffset_right");
                setDependent(e, "cl_hidewaypoints", 0, 0);
        me.TR(me);
-       
+
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_shownames", _("Show names above players")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "hud_shownames", _("Show names above players")));
        me.TR(me);
@@ -93,8 +93,8 @@ void XonoticHUDDialog_fill(entity me)
                me.TD(me, 1, 2, e = makeXonoticButton(_("Enter HUD editor"), '0 0 0'));
                        e.onClick = HUDSetup_Check_Gamestatus;
                        e.onClickEntity = me;
                me.TD(me, 1, 2, e = makeXonoticButton(_("Enter HUD editor"), '0 0 0'));
                        e.onClick = HUDSetup_Check_Gamestatus;
                        e.onClickEntity = me;
-               // TODO: show hud config name with text here 
-               
+               // TODO: show hud config name with text here
+
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
index f42cb35bc831a1eb9fa009852dde37b79ec8cc9f..7749a148d96a5a6e77d5bb2c57123c19b106d528 100644 (file)
@@ -16,7 +16,7 @@ void HUDSetup_Start(entity me, entity btn)
                localcmd("map hudsetup/hudsetup", "\n");
        else
                localcmd("togglemenu 0\n");
                localcmd("map hudsetup/hudsetup", "\n");
        else
                localcmd("togglemenu 0\n");
-               
+
        localcmd("_hud_configure 1", "\n");
 }
 
        localcmd("_hud_configure 1", "\n");
 }
 
index c55d4d488ba4ebcf37f2fd096fcf27a81e5c79ba..d1cdade772a2c77f63dfed302b9a2fcf0cdd6fd8 100644 (file)
@@ -23,7 +23,7 @@ string XonoticModelDialog_toString(entity me)
 void XonoticModelDialog_fill(entity me)
 {
        entity e;
 void XonoticModelDialog_fill(entity me)
 {
        entity e;
-       
+
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Body fading:")));
                me.TD(me, 1, 2, e = makeXonoticSlider(0, 2, 0.2, "cl_deathglow"));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Body fading:")));
                me.TD(me, 1, 2, e = makeXonoticSlider(0, 2, 0.2, "cl_deathglow"));
@@ -42,7 +42,7 @@ void XonoticModelDialog_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayercolors", _("Force player colors to mine")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_forceplayercolors", _("Force player colors to mine")));
        me.TR(me);
-               
+
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
index 59a7e6e795942cbcca00468d0aa3cd0994126c25..b2b440a1c45673b0dbe7cc1aef5c62cb874f4858 100644 (file)
@@ -7,7 +7,7 @@ CLASS(XonoticViewDialog) EXTENDS(XonoticDialog)
        ATTRIB(XonoticViewDialog, color, vector, SKINCOLOR_DIALOG_VIEW)
        ATTRIB(XonoticViewDialog, intendedWidth, float, 0.9)
        ATTRIB(XonoticViewDialog, rows, float, 11)
        ATTRIB(XonoticViewDialog, color, vector, SKINCOLOR_DIALOG_VIEW)
        ATTRIB(XonoticViewDialog, intendedWidth, float, 0.9)
        ATTRIB(XonoticViewDialog, rows, float, 11)
-       ATTRIB(XonoticViewDialog, columns, float, 6.2) // added extra .2 for center space 
+       ATTRIB(XonoticViewDialog, columns, float, 6.2) // added extra .2 for center space
 ENDCLASS(XonoticViewDialog)
 #endif
 
 ENDCLASS(XonoticViewDialog)
 #endif
 
@@ -23,7 +23,7 @@ string XonoticViewDialog_toString(entity me)
 void XonoticViewDialog_fill(entity me)
 {
        entity e;
 void XonoticViewDialog_fill(entity me)
 {
        entity e;
-       
+
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
                me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov"));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:")));
                me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov"));
@@ -70,7 +70,7 @@ void XonoticViewDialog_fill(entity me)
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_clippedspectating", _("Allow passing through walls while spectating")));
-       
+
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
                makeMulti(e, "crosshair_hittest_showimpact");
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "chase_active", "0", _("1st person perspective")));
                makeMulti(e, "crosshair_hittest_showimpact");
@@ -108,7 +108,7 @@ void XonoticViewDialog_fill(entity me)
                me.TD(me, 1, 2, e = makeXonoticSlider(10, 50, 1, "chase_up"));
                setDependent(e, "chase_active", 1, 1);
        me.TR(me);
                me.TD(me, 1, 2, e = makeXonoticSlider(10, 50, 1, "chase_up"));
                setDependent(e, "chase_active", 1, 1);
        me.TR(me);
-               
+
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
index fa3549154b0e807eddc63391b04154c1baa9db65..cfdaf8fdfc0b4cc42f36f72e60a7f1ab17f24f9b 100644 (file)
@@ -36,7 +36,7 @@ void XonoticWeaponsDialog_fill(entity me)
                me.TD(me, 1, 1, e = makeXonoticButton(_("Down"), '0 0 0'));
                        e.onClick = WeaponsList_MoveDown_Click;
                        e.onClickEntity = me.weaponsList;
                me.TD(me, 1, 1, e = makeXonoticButton(_("Down"), '0 0 0'));
                        e.onClick = WeaponsList_MoveDown_Click;
                        e.onClickEntity = me.weaponsList;
-                       
+
        me.gotoRC(me, 0, 2.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", _("Use priority list for weapon cycling")));
        me.TR(me);
        me.gotoRC(me, 0, 2.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", _("Use priority list for weapon cycling")));
        me.TR(me);
@@ -69,7 +69,7 @@ void XonoticWeaponsDialog_fill(entity me)
        //      setDependent(e, "r_drawviewmodel", 1, 1);
        //      me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 2, 0.1, "cl_viewmodel_scale"));
        //      setDependent(e, "r_drawviewmodel", 1, 1);
        //      setDependent(e, "r_drawviewmodel", 1, 1);
        //      me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 2, 0.1, "cl_viewmodel_scale"));
        //      setDependent(e, "r_drawviewmodel", 1, 1);
-                       
+
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, e = makeXonoticButton(_("OK"), '0 0 0'));
                        e.onClick = Dialog_Close;
index 108b984a1e1c2d1d079b44dfd6506acc2cc43e46..f3c27915e781206f53fe4543614ab741497fc3bf 100644 (file)
@@ -4,7 +4,7 @@ CLASS(XonoticAudioSettingsTab) EXTENDS(XonoticTab)
        ATTRIB(XonoticAudioSettingsTab, title, string, _("Audio"))
        ATTRIB(XonoticAudioSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticAudioSettingsTab, rows, float, 17)
        ATTRIB(XonoticAudioSettingsTab, title, string, _("Audio"))
        ATTRIB(XonoticAudioSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticAudioSettingsTab, rows, float, 17)
-       ATTRIB(XonoticAudioSettingsTab, columns, float, 6.2) // added extra .2 for center space 
+       ATTRIB(XonoticAudioSettingsTab, columns, float, 6.2) // added extra .2 for center space
 ENDCLASS(XonoticAudioSettingsTab)
 entity makeXonoticAudioSettingsTab();
 #endif
 ENDCLASS(XonoticAudioSettingsTab)
 entity makeXonoticAudioSettingsTab();
 #endif
@@ -97,7 +97,7 @@ void XonoticAudioSettingsTab_fill(entity me)
                me.TD(me, 1, 3, makeXonoticCheckBox(0, "menu_snd_attenuation_method", _("New style sound attenuation")));
        me.TR(me);
                me.TD(me, 1, 3, makeXonoticCheckBox(0, "snd_mutewhenidle", _("Mute sounds when not active")));
                me.TD(me, 1, 3, makeXonoticCheckBox(0, "menu_snd_attenuation_method", _("New style sound attenuation")));
        me.TR(me);
                me.TD(me, 1, 3, makeXonoticCheckBox(0, "snd_mutewhenidle", _("Mute sounds when not active")));
-       
+
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Frequency:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
        me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Frequency:")));
                me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed"));
index bea650eba4a1582f655629266613c38b58e33563..a963d1e3099862fb485fff19d842f5f5206522b8 100644 (file)
@@ -4,7 +4,7 @@ CLASS(XonoticEffectsSettingsTab) EXTENDS(XonoticTab)
        ATTRIB(XonoticEffectsSettingsTab, title, string, _("Effects"))
        ATTRIB(XonoticEffectsSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticEffectsSettingsTab, rows, float, 17)
        ATTRIB(XonoticEffectsSettingsTab, title, string, _("Effects"))
        ATTRIB(XonoticEffectsSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticEffectsSettingsTab, rows, float, 17)
-       ATTRIB(XonoticEffectsSettingsTab, columns, float, 6.2) // added extra .2 for center space 
+       ATTRIB(XonoticEffectsSettingsTab, columns, float, 6.2) // added extra .2 for center space
 ENDCLASS(XonoticEffectsSettingsTab)
 entity makeXonoticEffectsSettingsTab();
 float updateCompression();
 ENDCLASS(XonoticEffectsSettingsTab)
 entity makeXonoticEffectsSettingsTab();
 float updateCompression();
@@ -195,7 +195,7 @@ void XonoticEffectsSettingsTab_fill(entity me)
                setDependent(e, "cl_decals", 1, 1);
            me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_time"));
                setDependent(e, "cl_decals", 1, 1);
                setDependent(e, "cl_decals", 1, 1);
            me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_time"));
                setDependent(e, "cl_decals", 1, 1);
-                       
+
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));
 }
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));
 }
index daa8f3ff104fe3bcfc659fd32f7762c2ebd1fc50..d8554be4f7af38285bcb259d87ec22a894cd2284 100644 (file)
@@ -4,7 +4,7 @@ CLASS(XonoticInputSettingsTab) EXTENDS(XonoticTab)
        ATTRIB(XonoticInputSettingsTab, title, string, _("Input"))
        ATTRIB(XonoticInputSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticInputSettingsTab, rows, float, 17)
        ATTRIB(XonoticInputSettingsTab, title, string, _("Input"))
        ATTRIB(XonoticInputSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticInputSettingsTab, rows, float, 17)
-       ATTRIB(XonoticInputSettingsTab, columns, float, 6.2) // added extra .2 for center space 
+       ATTRIB(XonoticInputSettingsTab, columns, float, 6.2) // added extra .2 for center space
 ENDCLASS(XonoticInputSettingsTab)
 entity makeXonoticInputSettingsTab();
 #endif
 ENDCLASS(XonoticInputSettingsTab)
 entity makeXonoticInputSettingsTab();
 #endif
@@ -84,8 +84,8 @@ void XonoticInputSettingsTab_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "m_accelerate", _("Enable built in mouse acceleration")));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "m_accelerate", _("Enable built in mouse acceleration")));
-               
-       
+
+
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_movement_track_canjump", COMMANDBUTTON_APPLY));
 }
        me.gotoRC(me, me.rows - 1, 0);
                me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_movement_track_canjump", COMMANDBUTTON_APPLY));
 }
index 5db6d35c62c3d6522a9bd1c222947d4dcc16e37b..724c868fd7cffe0847cc801a3a7fb1296b3a7a5d 100644 (file)
@@ -15,17 +15,17 @@ void XonoticCvarsDialog_showNotify(entity me)
 {
        loadAllCvars(me);
 }
 {
        loadAllCvars(me);
 }
-void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIST_CONTROLS to color ALL controls 
+void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIST_CONTROLS to color ALL controls
 {
 
        entity e, cvarlist;
 
        cvarlist = makeXonoticCvarList();
 
 {
 
        entity e, cvarlist;
 
        cvarlist = makeXonoticCvarList();
 
-       cvarlist.color = 
-               cvarlist.colorF = 
-               cvarlist.color2 = 
-               cvarlist.colorC = 
+       cvarlist.color =
+               cvarlist.colorF =
+               cvarlist.color2 =
+               cvarlist.colorC =
                SKINCOLOR_CVARLIST_CONTROLS;
 
        me.TR(me);
                SKINCOLOR_CVARLIST_CONTROLS;
 
        me.TR(me);
index a3b89744b9fbc30b6ef44cb3489c386e6ce9c460..5d6a32d563586bde88a96ef9f0479e2f106bbef0 100644 (file)
@@ -60,7 +60,7 @@ void XonoticUserSettingsTab_fill(entity me)
                me.TD(me, 1, 1.5, e = makeXonoticButton(_("Set font"), '0 0 0'));
                        e.onClick = SetLanguage_Click;
                        e.onClickEntity = sk;*/
                me.TD(me, 1, 1.5, e = makeXonoticButton(_("Set font"), '0 0 0'));
                        e.onClick = SetLanguage_Click;
                        e.onClickEntity = sk;*/
-                       
+
        me.gotoRC(me, 0, 2.85); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Text language:")));
        me.TR(me);
        me.gotoRC(me, 0, 2.85); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Text language:")));
        me.TR(me);
@@ -74,7 +74,7 @@ void XonoticUserSettingsTab_fill(entity me)
                me.TD(me, 1, 1.5, e = makeXonoticButton(_("Set language"), '0 0 0'));
                        e.onClick = SetLanguage_Click;
                        e.onClickEntity = sk;
                me.TD(me, 1, 1.5, e = makeXonoticButton(_("Set language"), '0 0 0'));
                        e.onClick = SetLanguage_Click;
                        e.onClickEntity = sk;
-               
+
        me.gotoRC(me, 9, 2.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_gentle", _("Disable gore effects and harsh language")));
        me.TR(me);
        me.gotoRC(me, 9, 2.2); me.setFirstColumn(me, me.currentColumn);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_gentle", _("Disable gore effects and harsh language")));
        me.TR(me);
@@ -83,7 +83,7 @@ void XonoticUserSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_allow_uid2name", _("Allow player statistics to use your nickname")));
                setDependent(e, "cl_allow_uidtracking", 1, 1);
        me.TR(me);
                me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_allow_uid2name", _("Allow player statistics to use your nickname")));
                setDependent(e, "cl_allow_uidtracking", 1, 1);
-               
+
        me.gotoRC(me, me.rows - 3, 2.6);
                me.TD(me, 1, 2, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_gentle; sendcvar cl_allow_uidtracking; sendcvar cl_allow_uid2name;", COMMANDBUTTON_APPLY));
 
        me.gotoRC(me, me.rows - 3, 2.6);
                me.TD(me, 1, 2, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "sendcvar cl_gentle; sendcvar cl_allow_uidtracking; sendcvar cl_allow_uid2name;", COMMANDBUTTON_APPLY));
 
index 076dd2337494296f0c0b4b4e8d8f5c7631f11c55..db728d601494407d9aa58077b594d73c48999823 100644 (file)
@@ -4,7 +4,7 @@ CLASS(XonoticVideoSettingsTab) EXTENDS(XonoticTab)
        ATTRIB(XonoticVideoSettingsTab, title, string, _("Video"))
        ATTRIB(XonoticVideoSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticVideoSettingsTab, rows, float, 17)
        ATTRIB(XonoticVideoSettingsTab, title, string, _("Video"))
        ATTRIB(XonoticVideoSettingsTab, intendedWidth, float, 0.9)
        ATTRIB(XonoticVideoSettingsTab, rows, float, 17)
-       ATTRIB(XonoticVideoSettingsTab, columns, float, 6.2) // added extra .2 for center space 
+       ATTRIB(XonoticVideoSettingsTab, columns, float, 6.2) // added extra .2 for center space
        ATTRIB(XonoticVideoSettingsTab, name, string, "videosettings")
 ENDCLASS(XonoticVideoSettingsTab)
 entity makeXonoticVideoSettingsTab();
        ATTRIB(XonoticVideoSettingsTab, name, string, "videosettings")
 ENDCLASS(XonoticVideoSettingsTab)
 entity makeXonoticVideoSettingsTab();
@@ -47,7 +47,7 @@ void XonoticVideoSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "vid_fullscreen", _("Full screen")));
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "vid_vsync", _("Vertical Synchronization")));
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "vid_fullscreen", _("Full screen")));
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "vid_vsync", _("Vertical Synchronization")));
-               
+
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Anisotropy:")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Anisotropy:")));
@@ -70,7 +70,7 @@ void XonoticVideoSettingsTab_fill(entity me)
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "r_viewfbo", _("High-quality frame buffer")));
                        setDependent(e, "vid_samples", 1, 1);
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 0, "r_viewfbo", _("High-quality frame buffer")));
                        setDependent(e, "vid_samples", 1, 1);
-               
+
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Depth first:")));
        me.TR(me);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Depth first:")));
index 531c761f637d124dccf7b46f0cc24605b2a9d2f5..56c25314da697317fdebfa66dceec917577dfc54 100644 (file)
@@ -77,7 +77,7 @@ void XonoticGametypeList_saveCvars(entity me)
 void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
 {
        string s;
 void XonoticGametypeList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
 {
        string s;
-       
+
        if(isSelected)
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
 
        if(isSelected)
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
 
@@ -91,7 +91,7 @@ void XonoticGametypeList_resizeNotify(entity me, vector relOrigin, vector relSiz
 {
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticServerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 {
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticServerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
-       
+
        me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
        me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
        me.realUpperMargin1 = 0.5 * (1 - me.realFontSize_y);
        me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize_y * me.itemHeight));
        me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize_x * (1 - me.controlWidth)));
        me.realUpperMargin1 = 0.5 * (1 - me.realFontSize_y);
index f9d86c2dd229276aadb7272c9484f165bb1ad606..0af90bbe270f8b43356e33c19da14b30ff773e52 100644 (file)
@@ -50,61 +50,61 @@ void MainWindow_configureMainWindow(entity me)
        me.firstRunDialog = i = spawnXonoticFirstRunDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        me.firstRunDialog = i = spawnXonoticFirstRunDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       
+
+
        // hud_configure dialogs
        i = spawnXonoticHUDExitDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        // hud_configure dialogs
        i = spawnXonoticHUDExitDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDNotificationDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDNotificationDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDAmmoDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDAmmoDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDHealthArmorDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDHealthArmorDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDChatDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDChatDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDModIconsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDModIconsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDPowerupsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDPowerupsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDPressedKeysDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDPressedKeysDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDRaceTimerDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDRaceTimerDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDRadarDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDRadarDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDScoreDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDScoreDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDTimerDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDTimerDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDVoteDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDVoteDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        i = spawnXonoticHUDWeaponsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDWeaponsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
@@ -124,35 +124,35 @@ void MainWindow_configureMainWindow(entity me)
        i = spawnXonoticHUDCenterprintDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        i = spawnXonoticHUDCenterprintDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       
+
+
        // dialogs used by settings
        me.userbindEditDialog = i = spawnXonoticUserbindEditDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        // dialogs used by settings
        me.userbindEditDialog = i = spawnXonoticUserbindEditDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        me.cvarsDialog = i = spawnXonoticCvarsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        me.cvarsDialog = i = spawnXonoticCvarsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       
+
+
        // dialog used by singleplayer
        me.winnerDialog = i = spawnXonoticWinnerDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        // dialog used by singleplayer
        me.winnerDialog = i = spawnXonoticWinnerDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       
+
+
        // dialog used by multiplayer/join
        me.serverInfoDialog = i = spawnXonoticServerInfoDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        // dialog used by multiplayer/join
        me.serverInfoDialog = i = spawnXonoticServerInfoDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       
+
+
        // dialogs used by multiplayer/create
        me.mapInfoDialog = i = spawnXonoticMapInfoDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        // dialogs used by multiplayer/create
        me.mapInfoDialog = i = spawnXonoticMapInfoDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        me.advancedDialog = i = spawnXonoticAdvancedDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        me.advancedDialog = i = spawnXonoticAdvancedDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
@@ -160,13 +160,13 @@ void MainWindow_configureMainWindow(entity me)
        me.mutatorsDialog = i = spawnXonoticMutatorsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        me.mutatorsDialog = i = spawnXonoticMutatorsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
 
        // dialogs used by multiplayer/player setup
        me.crosshairDialog = i = spawnXonoticCrosshairDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
 
        // dialogs used by multiplayer/player setup
        me.crosshairDialog = i = spawnXonoticCrosshairDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        me.hudDialog = i = spawnXonoticHUDDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        me.hudDialog = i = spawnXonoticHUDDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
@@ -174,32 +174,32 @@ void MainWindow_configureMainWindow(entity me)
        me.hudconfirmDialog = i = spawnXonoticHUDConfirmDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        me.hudconfirmDialog = i = spawnXonoticHUDConfirmDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        me.modelDialog = i = spawnXonoticModelDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        me.modelDialog = i = spawnXonoticModelDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        me.viewDialog = i = spawnXonoticViewDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        me.viewDialog = i = spawnXonoticViewDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
        me.weaponsDialog = i = spawnXonoticWeaponsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        me.weaponsDialog = i = spawnXonoticWeaponsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
+
 
        // mutator dialogs
        i = spawnXonoticSandboxToolsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z * SKINALPHA_DIALOG_SANDBOXTOOLS);
 
        // mutator dialogs
        i = spawnXonoticSandboxToolsDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z * SKINALPHA_DIALOG_SANDBOXTOOLS);
-       
-       
+
+
        // miscellaneous dialogs
        i = spawnXonoticTeamSelectDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
        // miscellaneous dialogs
        i = spawnXonoticTeamSelectDialog();
        i.configureDialog(i);
        me.addItemCentered(me, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
-       
-       
+
+
        // main dialogs/windows
        me.mainNexposee = n = spawnXonoticNexposee();
        /*
        // main dialogs/windows
        me.mainNexposee = n = spawnXonoticNexposee();
        /*
@@ -215,7 +215,7 @@ void MainWindow_configureMainWindow(entity me)
                i.configureDialog(i);
                n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
                n.setNexposee(n, i, SKINPOSITION_DIALOG_SINGLEPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
                i.configureDialog(i);
                n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
                n.setNexposee(n, i, SKINPOSITION_DIALOG_SINGLEPLAYER, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
-               
+
                i = spawnXonoticMultiplayerDialog();
                i.configureDialog(i);
                n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
                i = spawnXonoticMultiplayerDialog();
                i.configureDialog(i);
                n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
@@ -237,7 +237,7 @@ void MainWindow_configureMainWindow(entity me)
                n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
                n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
                n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
                n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z);
                n.setNexposee(n, i, SKINPOSITION_DIALOG_QUIT, SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y);
                n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight));
-               
+
        me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z);
        me.moveItemAfter(me, n, NULL);
 
        me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z);
        me.moveItemAfter(me, n, NULL);
 
index 4c1c62af26d6319350776e9526782f1d5702b440..a0f64ca39e424c97a05a83e1064b205fa4a3a65d 100644 (file)
@@ -109,7 +109,7 @@ void XonoticPlayerList_drawListBoxItem(entity me, float i, vector absSize, float
                rgb = colormapPaletteColor(9, 0);
        else
                rgb = '1 1 1';
                rgb = colormapPaletteColor(9, 0);
        else
                rgb = '1 1 1';
-       
+
        s = me.getPlayerList(me, i, PLAYERPARM_NAME);
        score = me.getPlayerList(me, i, PLAYERPARM_SCORE);
 
        s = me.getPlayerList(me, i, PLAYERPARM_NAME);
        score = me.getPlayerList(me, i, PLAYERPARM_SCORE);
 
@@ -123,7 +123,7 @@ void XonoticPlayerList_drawListBoxItem(entity me, float i, vector absSize, float
                        score = substring(score, 0, t);
                if((t = strstrofs(score, ",", 0)) >= 0)
                        score = substring(score, 0, t);
                        score = substring(score, 0, t);
                if((t = strstrofs(score, ",", 0)) >= 0)
                        score = substring(score, 0, t);
-                       
+
                if(stof(score) == -666)
                        score = _("spectator");
        }
                if(stof(score) == -666)
                        score = _("spectator");
        }
index 3531b68a2d628e5fbcaf839f32aac99dd5068f74..cb6b0fbcdc5641366c363a25b6159dfd9c3cdfa5 100644 (file)
@@ -169,7 +169,7 @@ void ToggleFavorite(string srv)
                f = 1;
                --i;
        }
                f = 1;
                --i;
        }
-       
+
        if(!f)
        {
                s1 = "";
        if(!f)
        {
                s1 = "";
index fdb07870a411f12b8b068eaf1601437d966ba7ab..3e094e7d7e7ce91d28c380b8fe94ada5874b56f9 100644 (file)
@@ -155,13 +155,13 @@ void XonoticSkinList_resizeNotify(entity me, vector relOrigin, vector relSize, v
 void XonoticSkinList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
 {
        string s;
 void XonoticSkinList_drawListBoxItem(entity me, float i, vector absSize, float isSelected)
 {
        string s;
-       
+
        if(isSelected)
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
        if(isSelected)
                draw_Fill('0 0 0', '1 1 0', SKINCOLOR_LISTBOX_SELECTED, SKINALPHA_LISTBOX_SELECTED);
-               
+
        s = me.skinParameter(me, i, SKINPARM_PREVIEW);
        draw_Picture(me.columnPreviewOrigin * eX, s, me.columnPreviewSize * eX + eY, '1 1 1', 1);
        s = me.skinParameter(me, i, SKINPARM_PREVIEW);
        draw_Picture(me.columnPreviewOrigin * eX, s, me.columnPreviewSize * eX + eY, '1 1 1', 1);
-       
+
        s = me.skinParameter(me, i, SKINPARM_NAME);
        s = sprintf(_("%s: %s"), s, me.skinParameter(me, i, SKINPARM_TITLE));
        s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
        s = me.skinParameter(me, i, SKINPARM_NAME);
        s = sprintf(_("%s: %s"), s, me.skinParameter(me, i, SKINPARM_TITLE));
        s = draw_TextShortenToWidth(s, me.columnNameSize, 0, me.realFontSize);
index 808c08535166f6d5a758a567d28dbc300917dd9d..0f8e341e74a782d75ec951d273e5d397ef4dd512 100644 (file)
@@ -313,7 +313,7 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data)
                n = 0;
        else
                n = tokenizebyseparator(data, "\n");
                n = 0;
        else
                n = tokenizebyseparator(data, "\n");
-       
+
        if(n >= 1)
        {
                _Nex_ExtResponseSystem_UpdateTo = argv(0);
        if(n >= 1)
        {
                _Nex_ExtResponseSystem_UpdateTo = argv(0);
@@ -449,7 +449,7 @@ float preMenuInit()
                boxA = '0.05 0.5 0' + 0.25 * sz_y * eY;
                boxB = '0.95 0.5 0' + 1.25 * sz_y * eY;
                draw_Fill(boxA, boxB - boxA, '1 1 1', 1);
                boxA = '0.05 0.5 0' + 0.25 * sz_y * eY;
                boxB = '0.95 0.5 0' + 1.25 * sz_y * eY;
                draw_Fill(boxA, boxB - boxA, '1 1 1', 1);
-               
+
                boxA += sz * 0.1;
                boxB -= sz * 0.1;
                draw_Fill(boxA, boxB - boxA, '0.1 0.1 0.1', 1);
                boxA += sz * 0.1;
                boxB -= sz * 0.1;
                draw_Fill(boxA, boxB - boxA, '0.1 0.1 0.1', 1);
@@ -616,13 +616,13 @@ float GameType_GetID(float cnt)
 {
        float i;
        i = 0;
 {
        float i;
        i = 0;
-       
+
        #define GAMETYPE(id) if(i++ == cnt) return id;
        GAMETYPES
        #undef GAMETYPE
 
        unused_float = i;
        #define GAMETYPE(id) if(i++ == cnt) return id;
        GAMETYPES
        #undef GAMETYPE
 
        unused_float = i;
-       
+
        return 0;
 }
 
        return 0;
 }
 
@@ -630,31 +630,31 @@ float GameType_GetCount()
 {
        float i;
        i = 0;
 {
        float i;
        i = 0;
-       
+
        #define GAMETYPE(id) ++i;
        GAMETYPES
        #undef GAMETYPE
        #define GAMETYPE(id) ++i;
        GAMETYPES
        #undef GAMETYPE
-       
+
        return i;
 }
 
 string GameType_GetName(float cnt)
 {
        float i = GameType_GetID(cnt);
        return i;
 }
 
 string GameType_GetName(float cnt)
 {
        float i = GameType_GetID(cnt);
-       
+
        if(i)
                return MapInfo_Type_ToText(i);
        if(i)
                return MapInfo_Type_ToText(i);
-       
+
        return "";
 }
 
 string GameType_GetIcon(float cnt)
 {
        float i = GameType_GetID(cnt);
        return "";
 }
 
 string GameType_GetIcon(float cnt)
 {
        float i = GameType_GetID(cnt);
-       
+
        if(i)
                return strcat("gametype_", MapInfo_Type_ToString(i));
        if(i)
                return strcat("gametype_", MapInfo_Type_ToString(i));
-       
+
        return "";
 }
 
        return "";
 }
 
@@ -662,7 +662,7 @@ string GameType_GetIcon(float cnt)
 {
        float i = GameType_GetID(cnt);
        string s = _MapInfo_GetDefaultEx(i);
 {
        float i = GameType_GetID(cnt);
        string s = _MapInfo_GetDefaultEx(i);
-       
+
        if(i)
        {
                if(strstrofs(s, "teams", 0) >= 0)
        if(i)
        {
                if(strstrofs(s, "teams", 0) >= 0)
@@ -670,7 +670,7 @@ string GameType_GetIcon(float cnt)
                else
                        return _("free for all");
        }
                else
                        return _("free for all");
        }
-       
+
        return _("tuba for all");
 }*/
 
        return _("tuba for all");
 }*/
 
index 6790befe122be32a5159e5732fa2615efc5d6daa..ad4071060f99ec53c97359ed2f04ebd6bb23556e 100644 (file)
@@ -68,13 +68,13 @@ float XonoticWeaponsList_mouseDrag(entity me, vector pos)
        float f, i;
        i = me.selectedItem;
        f = SUPER(XonoticWeaponsList).mouseDrag(me, pos);
        float f, i;
        i = me.selectedItem;
        f = SUPER(XonoticWeaponsList).mouseDrag(me, pos);
-       
+
        if(me.pressed != 1) // don't change priority if the person is just scrolling
        {
                if(me.selectedItem != i)
                        cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, i));
        }
        if(me.pressed != 1) // don't change priority if the person is just scrolling
        {
                if(me.selectedItem != i)
                        cvar_set("cl_weaponpriority", swapInPriorityList(cvar_string("cl_weaponpriority"), me.selectedItem, i));
        }
-       
+
        return f;
 }
 string XonoticWeaponsList_toString(entity me)
        return f;
 }
 string XonoticWeaponsList_toString(entity me)
index d9f1add2c5e26b4a7c5772d77647cea1e722fa31..6ec1756ed643851ff2ed574822960e63a2e798f3 100644 (file)
@@ -10,9 +10,9 @@ void spawnfunc_worldspawn()
        dprint("TESTCASE: START\n");
        r = test();
        if(r == 1)
        dprint("TESTCASE: START\n");
        r = test();
        if(r == 1)
-               error("TESTCASE: PASS"); 
+               error("TESTCASE: PASS");
        else if(r == 0)
        else if(r == 0)
-               error("TESTCASE: FAIL"); 
+               error("TESTCASE: FAIL");
        else
        else
-               error("TESTCASE: INVALID"); 
+               error("TESTCASE: INVALID");
 }
 }
index 5e0a91a3e897241196d0179e4467d7ca3f169ed0..c53452ab78b352836a0614970259a54be27be59d 100644 (file)
@@ -11,7 +11,7 @@ void antilag_record(entity e, float t)
 {
     if (e.vehicle && e.vehicle.vehicle_flags == VHF_PLAYERSLOT)
         return;
 {
     if (e.vehicle && e.vehicle.vehicle_flags == VHF_PLAYERSLOT)
         return;
-        
+
     if(e.vehicle)
         antilag_record(e.vehicle, t);
 
     if(e.vehicle)
         antilag_record(e.vehicle, t);
 
index 578306c4eb89c49c6e69707f07c6750273965601..3467e2b395d61c7c1f28357fe0460b0a97011394 100644 (file)
@@ -137,11 +137,11 @@ float bot_shouldattack(entity e)
                return FALSE;
        if(e.flags & FL_NOTARGET)
                return FALSE;
                return FALSE;
        if(e.flags & FL_NOTARGET)
                return FALSE;
-               
+
        checkentity = e;
        if(MUTATOR_CALLHOOK(BotShouldAttack))
                return FALSE;
        checkentity = e;
        if(MUTATOR_CALLHOOK(BotShouldAttack))
                return FALSE;
-               
+
        return TRUE;
 }
 
        return TRUE;
 }
 
index 93e513cab2d177f266f0ee6247d3ac6940279478..691ce3e0a929ab44e3b0138c1a91a2fa760b82b0 100644 (file)
@@ -733,7 +733,7 @@ void navigation_routerating(entity e, float f, float rangebias)
                        t = zdistance / autocvar_g_jetpack_maxspeed_up;
                        t += xydistance / autocvar_g_jetpack_maxspeed_side;
                        fuel = t * autocvar_g_jetpack_fuel * 0.8;
                        t = zdistance / autocvar_g_jetpack_maxspeed_up;
                        t += xydistance / autocvar_g_jetpack_maxspeed_side;
                        fuel = t * autocvar_g_jetpack_fuel * 0.8;
-                       
+
                        bot_debug(strcat("jetpack ai: required fuel ", ftos(fuel), " self.ammo_fuel ", ftos(self.ammo_fuel), "\n"));
 
                        // enough fuel ?
                        bot_debug(strcat("jetpack ai: required fuel ", ftos(fuel), " self.ammo_fuel ", ftos(self.ammo_fuel), "\n"));
 
                        // enough fuel ?
index 9beb6e1f04c04a7df695f849e276b67b1bde3c3f..b6a39ee6744686ae5465f06a47ce05724cf8e3fc 100644 (file)
@@ -21,7 +21,7 @@ float CampaignBailout(string s)
        return 1;
 }
 
        return 1;
 }
 
-string cvar_campaignwrapper_list; // string of format ; var value; var value; var value; 
+string cvar_campaignwrapper_list; // string of format ; var value; var value; var value;
 string cvar_string_campaignwrapper(string theCvar)
 {
        float p, q;
 string cvar_string_campaignwrapper(string theCvar)
 {
        float p, q;
index 53c1853a7faeeb056123eab23d3f3ab13f5812ca..5bd3b49a3ab8021b2d305912f8f662ae78adb990 100644 (file)
@@ -50,7 +50,7 @@ float CheatsAllowed(float i, float argc, float fr) // the cheat gets passed as a
                return 0;
        if(gamestart_sv_cheats < 2 && !IS_PLAYER(self))
                return 0;
                return 0;
        if(gamestart_sv_cheats < 2 && !IS_PLAYER(self))
                return 0;
-       
+
        // sv_clones
        if(i == CHIMPULSE_CLONE_MOVING || i == CHIMPULSE_CLONE_STANDING)
                if(self.lip < sv_clones)
        // sv_clones
        if(i == CHIMPULSE_CLONE_MOVING || i == CHIMPULSE_CLONE_STANDING)
                if(self.lip < sv_clones)
@@ -59,7 +59,7 @@ float CheatsAllowed(float i, float argc, float fr) // the cheat gets passed as a
        // haha
        if(self.maycheat)
                return 1;
        // haha
        if(self.maycheat)
                return 1;
-       
+
        // sv_cheats
        if(gamestart_sv_cheats && autocvar_sv_cheats)
                return 1;
        // sv_cheats
        if(gamestart_sv_cheats && autocvar_sv_cheats)
                return 1;
@@ -190,7 +190,7 @@ float CheatImpulse(float i)
                                        self.oldvelocity = self.velocity = self.personal.velocity;
                                        self.angles = self.personal.v_angle;
                                        self.fixangle = TRUE;
                                        self.oldvelocity = self.velocity = self.personal.velocity;
                                        self.angles = self.personal.v_angle;
                                        self.fixangle = TRUE;
-                                       
+
                                        MUTATOR_CALLHOOK(AbortSpeedrun);
                                }
 
                                        MUTATOR_CALLHOOK(AbortSpeedrun);
                                }
 
index ab886c896dcc258e8b66ad0da781f142b7e7e260..65443f4782992f51f3528ebcbbc36300f98f8d47 100644 (file)
@@ -167,7 +167,7 @@ void PutObserverInServer (void)
        MUTATOR_CALLHOOK(MakePlayerObserver);
 
        Portal_ClearAll(self);
        MUTATOR_CALLHOOK(MakePlayerObserver);
 
        Portal_ClearAll(self);
-       
+
        if(self.alivetime)
        {
                if(!warmup_stage)
        if(self.alivetime)
        {
                if(!warmup_stage)
@@ -176,7 +176,7 @@ void PutObserverInServer (void)
        }
 
        if(self.vehicle)
        }
 
        if(self.vehicle)
-               vehicles_exit(VHEF_RELESE);         
+               vehicles_exit(VHEF_RELESE);
 
        WaypointSprite_PlayerDead();
 
 
        WaypointSprite_PlayerDead();
 
@@ -198,7 +198,7 @@ void PutObserverInServer (void)
        accuracy_resend(self);
 
        self.spectatortime = time;
        accuracy_resend(self);
 
        self.spectatortime = time;
-       
+
        self.classname = "observer";
        self.iscreature = FALSE;
        self.teleportable = TELEPORT_SIMPLE;
        self.classname = "observer";
        self.iscreature = FALSE;
        self.teleportable = TELEPORT_SIMPLE;
@@ -558,7 +558,7 @@ void PutClientInServer (void)
 
                //stuffcmd(self, "chase_active 0");
                //stuffcmd(self, "set viewsize $tmpviewsize \n");
 
                //stuffcmd(self, "chase_active 0");
                //stuffcmd(self, "set viewsize $tmpviewsize \n");
-               
+
                target_voicescript_clear(self);
 
                // reset fields the weapons may use
                target_voicescript_clear(self);
 
                // reset fields the weapons may use
@@ -766,7 +766,7 @@ void ClientKill_Now()
            if(!self.killindicator_teamchange)
            {
             self.vehicle_health = -1;
            if(!self.killindicator_teamchange)
            {
             self.vehicle_health = -1;
-            Damage(self, self, self, 1 , DEATH_KILL, self.origin, '0 0 0');            
+            Damage(self, self, self, 1 , DEATH_KILL, self.origin, '0 0 0');
            }
        }
 
            }
        }
 
@@ -934,7 +934,7 @@ void ClientKill (void)
        if(gameover) return;
        if(self.player_blocked) return;
        if(self.freezetag_frozen) return;
        if(gameover) return;
        if(self.player_blocked) return;
        if(self.freezetag_frozen) return;
-       
+
        ClientKill_TeamChange(0);
 }
 
        ClientKill_TeamChange(0);
 }
 
@@ -1277,7 +1277,7 @@ void ClientDisconnect (void)
 
        if(autocvar_sv_eventlog)
                GameLogEcho(strcat(":part:", ftos(self.playerid)));
 
        if(autocvar_sv_eventlog)
                GameLogEcho(strcat(":part:", ftos(self.playerid)));
-               
+
        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_DISCONNECT, self.netname);
 
        MUTATOR_CALLHOOK(ClientDisconnect);
        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_QUIT_DISCONNECT, self.netname);
 
        MUTATOR_CALLHOOK(ClientDisconnect);
@@ -1516,7 +1516,7 @@ void player_powerups (void)
                        self.superweapons_finished = 0;
                }
        }
                        self.superweapons_finished = 0;
                }
        }
-       
+
        if(autocvar_g_nodepthtestplayers)
                self.effects = self.effects | EF_NODEPTHTEST;
 
        if(autocvar_g_nodepthtestplayers)
                self.effects = self.effects | EF_NODEPTHTEST;
 
@@ -1730,7 +1730,7 @@ void SpectateCopy(entity spectatee) {
        setorigin(self, spectatee.origin);
        setsize(self, spectatee.mins, spectatee.maxs);
        SetZoomState(spectatee.zoomstate);
        setorigin(self, spectatee.origin);
        setsize(self, spectatee.mins, spectatee.maxs);
        SetZoomState(spectatee.zoomstate);
-    
+
     anticheat_spectatecopy(spectatee);
        self.hud = spectatee.hud;
        if(spectatee.vehicle)
     anticheat_spectatecopy(spectatee);
        self.hud = spectatee.hud;
        if(spectatee.vehicle)
@@ -1746,22 +1746,22 @@ void SpectateCopy(entity spectatee) {
         self.vehicle_reload2 = spectatee.vehicle_reload2;
 
         msg_entity = self;
         self.vehicle_reload2 = spectatee.vehicle_reload2;
 
         msg_entity = self;
-        
+
         WriteByte (MSG_ONE, SVC_SETVIEWANGLES);
             WriteAngle(MSG_ONE,  spectatee.v_angle_x);
             WriteAngle(MSG_ONE,  spectatee.v_angle_y);
             WriteAngle(MSG_ONE,  spectatee.v_angle_z);
 
         //WriteByte (MSG_ONE, SVC_SETVIEW);
         WriteByte (MSG_ONE, SVC_SETVIEWANGLES);
             WriteAngle(MSG_ONE,  spectatee.v_angle_x);
             WriteAngle(MSG_ONE,  spectatee.v_angle_y);
             WriteAngle(MSG_ONE,  spectatee.v_angle_z);
 
         //WriteByte (MSG_ONE, SVC_SETVIEW);
-        //    WriteEntity(MSG_ONE, self);            
+        //    WriteEntity(MSG_ONE, self);
         //makevectors(spectatee.v_angle);
         //makevectors(spectatee.v_angle);
-        //setorigin(self, spectatee.origin - v_forward * 400 + v_up * 300);*/    
+        //setorigin(self, spectatee.origin - v_forward * 400 + v_up * 300);*/
     }
 }
 
 float SpectateUpdate() {
        if(!self.enemy)
     }
 }
 
 float SpectateUpdate() {
        if(!self.enemy)
-           return 0;           
+           return 0;
 
        if (self == self.enemy)
                return 0;
 
        if (self == self.enemy)
                return 0;
@@ -1820,13 +1820,13 @@ entity CA_SpectateNext(entity start) {
        if (start.team == self.team) {
                return start;
        }
        if (start.team == self.team) {
                return start;
        }
-       
+
        other = start;
        // continue from current player
        while(other && other.team != self.team) {
                other = find(other, classname, "player");
        }
        other = start;
        // continue from current player
        while(other && other.team != self.team) {
                other = find(other, classname, "player");
        }
-       
+
        if (!other) {
                // restart from begining
                other = find(other, classname, "player");
        if (!other) {
                // restart from begining
                other = find(other, classname, "player");
@@ -1834,7 +1834,7 @@ entity CA_SpectateNext(entity start) {
                        other = find(other, classname, "player");
                }
        }
                        other = find(other, classname, "player");
                }
        }
-       
+
        return other;
 }
 
        return other;
 }
 
@@ -2143,7 +2143,7 @@ void PlayerUseKey()
         vehicles_exit(VHEF_NORMAL);
         return;
        }
         vehicles_exit(VHEF_NORMAL);
         return;
        }
-       
+
        // a use key was pressed; call handlers
        MUTATOR_CALLHOOK(PlayerUseKey);
 }
        // a use key was pressed; call handlers
        MUTATOR_CALLHOOK(PlayerUseKey);
 }
@@ -2305,7 +2305,7 @@ void PlayerPreThink (void)
                                if(frametime)
                                        player_anim();
                                button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USE);
                                if(frametime)
                                        player_anim();
                                button_pressed = (self.BUTTON_ATCK || self.BUTTON_JUMP || self.BUTTON_ATCK2 || self.BUTTON_HOOK || self.BUTTON_USE);
-                               
+
                                if (self.deadflag == DEAD_DYING)
                                {
                                        if(self.respawn_flags & RESPAWN_FORCE)
                                if (self.deadflag == DEAD_DYING)
                                {
                                        if(self.respawn_flags & RESPAWN_FORCE)
@@ -2410,10 +2410,10 @@ void PlayerPreThink (void)
 
                if(frametime)
                        player_anim();
 
                if(frametime)
                        player_anim();
-               
+
                // secret status
                secrets_setstatus();
                // secret status
                secrets_setstatus();
-               
+
                self.dmg_team = max(0, self.dmg_team - autocvar_g_teamdamage_resetspeed * frametime);
 
                //self.angles_y=self.v_angle_y + 90;   // temp
                self.dmg_team = max(0, self.dmg_team - autocvar_g_teamdamage_resetspeed * frametime);
 
                //self.angles_y=self.v_angle_y + 90;   // temp
@@ -2573,7 +2573,7 @@ void PlayerPostThink (void)
                        return;         // intermission or finale
                GetPressedKeys();
        }
                        return;         // intermission or finale
                GetPressedKeys();
        }
-       
+
 #ifdef TETRIS
        }
 #endif
 #ifdef TETRIS
        }
 #endif
index dc8dabee6c719861d0c34b98fe880fa762a9c03a..a4376bd418a101096d5fdf7d2e68c76070796578 100644 (file)
@@ -52,13 +52,13 @@ void ImpulseCommands (void)
 
        if (timeout_status == TIMEOUT_ACTIVE) //don't allow any impulses while the game is paused
                return;
 
        if (timeout_status == TIMEOUT_ACTIVE) //don't allow any impulses while the game is paused
                return;
-    
+
     if(self.vehicle)
         if(self.vehicle.deadflag == DEAD_NO)
             if(self.vehicle.vehicles_impusle)
                 if(self.vehicle.vehicles_impusle(imp))
                     return;
     if(self.vehicle)
         if(self.vehicle.deadflag == DEAD_NO)
             if(self.vehicle.vehicles_impusle)
                 if(self.vehicle.vehicles_impusle(imp))
                     return;
-    
+
        if(CheatImpulse(imp))
        {
        }
        if(CheatImpulse(imp))
        {
        }
index 9531010ec454df40e3eab34be292ba4643c2cab9..edad6d63f845881338547c06bc59d2a4285a0ce7 100644 (file)
@@ -24,11 +24,11 @@ void PlayerJump (void)
        player_multijump = doublejump;
        if(MUTATOR_CALLHOOK(PlayerJump))
                return;
        player_multijump = doublejump;
        if(MUTATOR_CALLHOOK(PlayerJump))
                return;
-               
+
        doublejump = player_multijump;
 
        float mjumpheight;
        doublejump = player_multijump;
 
        float mjumpheight;
-       
+
        if (autocvar_sv_doublejump)
        {
                tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
        if (autocvar_sv_doublejump)
        {
                tracebox(self.origin + '0 0 0.01', self.mins, self.maxs, self.origin - '0 0 0.01', MOVE_NORMAL, self);
@@ -110,7 +110,7 @@ void PlayerJump (void)
        self.flags &= ~FL_JUMPRELEASED;
 
        animdecide_setaction(self, ANIMACTION_JUMP, TRUE);
        self.flags &= ~FL_JUMPRELEASED;
 
        animdecide_setaction(self, ANIMACTION_JUMP, TRUE);
-       
+
        if(autocvar_g_jump_grunt)
                PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND);
 
        if(autocvar_g_jump_grunt)
                PlayerSound(playersound_jump, CH_PLAYER, VOICETYPE_PLAYERSOUND);
 
@@ -517,9 +517,9 @@ void PM_Accelerate(vector wishdir, float wishspeed, float wishspeed0, float acce
        }
        else
                vel_perpend = vel_perpend * max(0, 1 - frametime * wishspeed * sidefric);
        }
        else
                vel_perpend = vel_perpend * max(0, 1 - frametime * wishspeed * sidefric);
-       
+
        vel_xy = vel_straight * wishdir + vel_perpend;
        vel_xy = vel_straight * wishdir + vel_perpend;
-       
+
        if(speedclamp >= 0)
        {
                float vel_xy_preclamp;
        if(speedclamp >= 0)
        {
                float vel_xy_preclamp;
@@ -633,7 +633,7 @@ void SV_PlayerPhysics()
        string c;
 
        WarpZone_PlayerPhysics_FixVAngle();
        string c;
 
        WarpZone_PlayerPhysics_FixVAngle();
-       
+
        maxspd_mod = 1;
        if(self.ballcarried)
                if(g_nexball)
        maxspd_mod = 1;
        if(self.ballcarried)
                if(g_nexball)
@@ -747,7 +747,7 @@ void SV_PlayerPhysics()
                        return;
                bot_think();
        }
                        return;
                bot_think();
        }
-       
+
        self.items &= ~IT_USING_JETPACK;
 
        if(IS_PLAYER(self))
        self.items &= ~IT_USING_JETPACK;
 
        if(IS_PLAYER(self))
index 8eaf8addc6e8f95f059e2a5fd392963d1c0a81fd..88397a88021feff495ada18a2d140c0412849c6e 100644 (file)
@@ -307,7 +307,7 @@ float W_IsWeaponThrowable(float w)
                return 0;
     if(w == 0)
         return 0;
                return 0;
     if(w == 0)
         return 0;
-       
+
        wa = W_AmmoItemCode(w);
        if(start_weapons & WepSet_FromWeapon(w))
        {
        wa = W_AmmoItemCode(w);
        if(start_weapons & WepSet_FromWeapon(w))
        {
@@ -345,7 +345,7 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce)
 
        W_SwitchWeapon_Force(self, w_getbestweapon(self));
        a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo);
 
        W_SwitchWeapon_Force(self, w_getbestweapon(self));
        a = W_ThrowNewWeapon(self, w, doreduce, self.origin + delta, velo);
-       
+
        if (!a) return;
        Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_WEAPON_DROP, a, w);
 }
        if (!a) return;
        Send_Notification(NOTIF_ONE, self, MSG_MULTI, ITEM_WEAPON_DROP, a, w);
 }
@@ -435,7 +435,7 @@ void W_WeaponFrame()
                        self.switchingweapon = self.switchweapon;
 
                        entity oldwep = get_weaponinfo(self.weapon);
                        self.switchingweapon = self.switchweapon;
 
                        entity oldwep = get_weaponinfo(self.weapon);
-                       
+
 #ifndef INDEPENDENT_ATTACK_FINISHED
                        if(ATTACK_FINISHED(self) <= time + self.weapon_frametime * 0.5)
                        {
 #ifndef INDEPENDENT_ATTACK_FINISHED
                        if(ATTACK_FINISHED(self) <= time + self.weapon_frametime * 0.5)
                        {
index 0c442d2af24bd9bd12ad0cc907d2c0a45d4c27c4..8d72a798bab35d21c183711337a95095bcced570 100644 (file)
@@ -541,7 +541,7 @@ void CL_Weaponentity_Think()
        }
 
        self.angles = '0 0 0';
        }
 
        self.angles = '0 0 0';
-       
+
        float f = (self.owner.weapon_nextthink - time);
        if (self.state == WS_RAISE && !intermission_running)
        {
        float f = (self.owner.weapon_nextthink - time);
        if (self.state == WS_RAISE && !intermission_running)
        {
@@ -667,7 +667,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain)
                complain = 0;
        if(complain)
                self.hasweapon_complain_spam = time + 0.2;
                complain = 0;
        if(complain)
                self.hasweapon_complain_spam = time + 0.2;
-               
+
        if(wpn == WEP_HOOK && !g_grappling_hook && autocvar_g_nades && !((cl.weapons | weaponsInMap) & WepSet_FromWeapon(wpn)))
                complain = 0;
 
        if(wpn == WEP_HOOK && !g_grappling_hook && autocvar_g_nades && !((cl.weapons | weaponsInMap) & WepSet_FromWeapon(wpn)))
                complain = 0;
 
@@ -851,7 +851,7 @@ float weapon_prepareattack_checkammo(float secondary)
                {
                        W_SwitchToOtherWeapon(self);
                }
                {
                        W_SwitchToOtherWeapon(self);
                }
-               
+
                return FALSE;
        }
        return TRUE;
                return FALSE;
        }
        return TRUE;
@@ -1129,7 +1129,7 @@ vector W_CalculateProjectileSpread(vector forward, float spread)
        if(spread <= 0)
                return forward;
        sstyle = autocvar_g_projectiles_spread_style;
        if(spread <= 0)
                return forward;
        sstyle = autocvar_g_projectiles_spread_style;
-       
+
        if(sstyle == 0)
        {
                // this is the baseline for the spread value!
        if(sstyle == 0)
        {
                // this is the baseline for the spread value!
index 1694bb661d0254dcd84e5d2e895de51244ea10b7..794854deddf1daa3b6e9b35b316f0d7fb1d3e443 100644 (file)
@@ -14,9 +14,9 @@ void BanCommand_ban(float request, float argc, string command)
                                string ip = argv(1);
                                float reason_arg, bantime;
                                string reason;
                                string ip = argv(1);
                                float reason_arg, bantime;
                                string reason;
-                               
-                               reason_arg = 2; 
-                               
+
+                               reason_arg = 2;
+
                                GET_BAN_ARG(bantime, autocvar_g_ban_default_bantime);
                                GET_BAN_REASON(reason, "No reason provided");
 
                                GET_BAN_ARG(bantime, autocvar_g_ban_default_bantime);
                                GET_BAN_REASON(reason, "No reason provided");
 
@@ -24,7 +24,7 @@ void BanCommand_ban(float request, float argc, string command)
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2ban^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2ban^7\n");
                case CMD_REQUEST_USAGE:
@@ -48,7 +48,7 @@ void BanCommand_banlist(float request)
                        Ban_View();
                        return;
                }
                        Ban_View();
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -72,26 +72,26 @@ void BanCommand_kickban(float request, float argc, string command)
                                float accepted = VerifyClientEntity(client, TRUE, FALSE);
                                float reason_arg, bantime, masksize;
                                string reason;
                                float accepted = VerifyClientEntity(client, TRUE, FALSE);
                                float reason_arg, bantime, masksize;
                                string reason;
-                               
-                               if(accepted > 0) 
+
+                               if(accepted > 0)
                                {
                                {
-                                       reason_arg = next_token; 
+                                       reason_arg = next_token;
 
                                        GET_BAN_ARG(bantime, autocvar_g_ban_default_bantime);
                                        GET_BAN_ARG(masksize, autocvar_g_ban_default_masksize);
                                        GET_BAN_REASON(reason, "No reason provided");
 
                                        Ban_KickBanClient(client, bantime, masksize, reason);
 
                                        GET_BAN_ARG(bantime, autocvar_g_ban_default_bantime);
                                        GET_BAN_ARG(masksize, autocvar_g_ban_default_masksize);
                                        GET_BAN_REASON(reason, "No reason provided");
 
                                        Ban_KickBanClient(client, bantime, masksize, reason);
-                                       
+
                                        return;
                                }
                                else
                                {
                                        return;
                                }
                                else
                                {
-                                       print("kickban: ", GetClientErrorString(accepted, argv(1)), ".\n"); 
+                                       print("kickban: ", GetClientErrorString(accepted, argv(1)), ".\n");
                                }
                        }
                }
                                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2kickban^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2kickban^7\n");
                case CMD_REQUEST_USAGE:
@@ -117,19 +117,19 @@ void BanCommand_mute(float request, float argc, string command) // TODO: Add a s
                        {
                                entity client = GetFilteredEntity(argv(1));
                                float accepted = VerifyClientEntity(client, TRUE, FALSE);
                        {
                                entity client = GetFilteredEntity(argv(1));
                                float accepted = VerifyClientEntity(client, TRUE, FALSE);
-                               
-                               if(accepted > 0) 
+
+                               if(accepted > 0)
                                {
                                        client.muted = TRUE;
                                        return;
                                }
                                else
                                {
                                {
                                        client.muted = TRUE;
                                        return;
                                }
                                else
                                {
-                                       print("mute: ", GetClientErrorString(accepted, argv(1)), ".\n"); 
+                                       print("mute: ", GetClientErrorString(accepted, argv(1)), ".\n");
                                }
                        }
                }
                                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2mute^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2mute^7\n");
                case CMD_REQUEST_USAGE:
@@ -147,16 +147,16 @@ void BanCommand_unban(float request, float argc)
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
-               {       
+               {
                        if(argv(1))
                        {
                                float tmp_number = -1;
                                string tmp_string;
                        if(argv(1))
                        {
                                float tmp_number = -1;
                                string tmp_string;
-                               
+
                                if(substring(argv(1), 0, 1) == "#")
                                {
                                        tmp_string = substring(argv(1), 1, -1);
                                if(substring(argv(1), 0, 1) == "#")
                                {
                                        tmp_string = substring(argv(1), 1, -1);
-                                       
+
                                        if(tmp_string != "") // is it all one token? like #1
                                        {
                                                tmp_number = stof(tmp_string);
                                        if(tmp_string != "") // is it all one token? like #1
                                        {
                                                tmp_number = stof(tmp_string);
@@ -171,7 +171,7 @@ void BanCommand_unban(float request, float argc)
                                else // maybe it's ONLY a number?
                                {
                                        tmp_number = stof(argv(1));
                                else // maybe it's ONLY a number?
                                {
                                        tmp_number = stof(argv(1));
-                                       
+
                                        if((tmp_number == 0) && (argv(1) != "0"))
                                                { tmp_number = -1; }
                                }
                                        if((tmp_number == 0) && (argv(1) != "0"))
                                                { tmp_number = -1; }
                                }
@@ -183,7 +183,7 @@ void BanCommand_unban(float request, float argc)
                                }
                        }
                }
                                }
                        }
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -205,19 +205,19 @@ void BanCommand_unmute(float request, float argc)
                        {
                                entity client = GetFilteredEntity(argv(1));
                                float accepted = VerifyClientEntity(client, TRUE, FALSE);
                        {
                                entity client = GetFilteredEntity(argv(1));
                                float accepted = VerifyClientEntity(client, TRUE, FALSE);
-                               
-                               if(accepted > 0) 
+
+                               if(accepted > 0)
                                {
                                        client.muted = FALSE;
                                        return;
                                }
                                else
                                {
                                {
                                        client.muted = FALSE;
                                        return;
                                }
                                else
                                {
-                                       print("unmute: ", GetClientErrorString(accepted, argv(1)), ".\n"); 
+                                       print("unmute: ", GetClientErrorString(accepted, argv(1)), ".\n");
                                }
                        }
                }
                                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2mute^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2mute^7\n");
                case CMD_REQUEST_USAGE:
@@ -238,10 +238,10 @@ void BanCommand_(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
        {
                case CMD_REQUEST_COMMAND:
                {
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -272,10 +272,10 @@ void BanCommand_macro_help()
 {
        #define BAN_COMMAND(name,function,description) \
                { if(strtolower(description) != "") { print("  ^2", name, "^7: ", description, "\n"); } }
 {
        #define BAN_COMMAND(name,function,description) \
                { if(strtolower(description) != "") { print("  ^2", name, "^7: ", description, "\n"); } }
-               
+
        BAN_COMMANDS(0, 0, "")
        #undef BAN_COMMAND
        BAN_COMMANDS(0, 0, "")
        #undef BAN_COMMAND
-       
+
        return;
 }
 
        return;
 }
 
@@ -283,10 +283,10 @@ float BanCommand_macro_command(float argc, string command)
 {
        #define BAN_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
 {
        #define BAN_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
-               
+
        BAN_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef BAN_COMMAND
        BAN_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef BAN_COMMAND
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -294,10 +294,10 @@ float BanCommand_macro_usage(float argc)
 {
        #define BAN_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
 {
        #define BAN_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
-               
+
        BAN_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef BAN_COMMAND
        BAN_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef BAN_COMMAND
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -305,26 +305,26 @@ void BanCommand_macro_write_aliases(float fh)
 {
        #define BAN_COMMAND(name,function,description) \
                { if(strtolower(description) != "") { CMD_Write_Alias("qc_cmd_sv", name, description); } }
 {
        #define BAN_COMMAND(name,function,description) \
                { if(strtolower(description) != "") { CMD_Write_Alias("qc_cmd_sv", name, description); } }
-       
+
        BAN_COMMANDS(0, 0, "")
        #undef BAN_COMMAND
        BAN_COMMANDS(0, 0, "")
        #undef BAN_COMMAND
-       
+
        return;
 }
 
 float BanCommand(string command)
 {
        float argc = tokenize_console(command);
        return;
 }
 
 float BanCommand(string command)
 {
        float argc = tokenize_console(command);
-       
+
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
        // 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(BanCommand_macro_command(argc, command)) // continue as usual and scan for normal commands
        {
                return TRUE; // handled by one of the above GenericCommand_* functions
        }
        // cmd     vote - master - login - password
 
        if(BanCommand_macro_command(argc, command)) // continue as usual and scan for normal commands
        {
                return TRUE; // handled by one of the above GenericCommand_* functions
        }
-       
+
        return FALSE;
 }
        return FALSE;
 }
index 44cc46a02bcd7bad0a07422ec6dc8b11917c9c5e..08bf940db062066b603f71ce925ad621cddd687f 100644 (file)
@@ -39,13 +39,13 @@ void ClientCommand_autoswitch(float request, float argc)
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        sprint(self, "Incorrect parameters for ^2autoswitch^7\n");
                case CMD_REQUEST_USAGE:
                {
                        sprint(self, "\nUsage:^3 cmd autoswitch selection\n");
                default:
                        sprint(self, "Incorrect parameters for ^2autoswitch^7\n");
                case CMD_REQUEST_USAGE:
                {
                        sprint(self, "\nUsage:^3 cmd autoswitch selection\n");
-                       sprint(self, "  Where 'selection' controls if autoswitch is on or off.\n"); 
+                       sprint(self, "  Where 'selection' controls if autoswitch is on or off.\n");
                        return;
                }
        }
                        return;
                }
        }
@@ -61,7 +61,7 @@ void ClientCommand_checkfail(float request, string command) // internal command,
                        self.checkfail = 1;
                        return; // never fall through to usage
                }
                        self.checkfail = 1;
                        return; // never fall through to usage
                }
-                       
+
                default:
                        sprint(self, "Incorrect parameters for ^2checkfail^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        sprint(self, "Incorrect parameters for ^2checkfail^7\n");
                case CMD_REQUEST_USAGE:
@@ -84,27 +84,27 @@ void ClientCommand_clientversion(float request, float argc) // internal command,
                                if(IS_CLIENT(self))
                                {
                                        self.version = ((argv(1) == "$gameversion") ? 1 : stof(argv(1)));
                                if(IS_CLIENT(self))
                                {
                                        self.version = ((argv(1) == "$gameversion") ? 1 : stof(argv(1)));
-                                       
+
                                        if(self.version < autocvar_gameversion_min || self.version > autocvar_gameversion_max)
                                        {
                                                self.version_mismatch = 1;
                                                ClientKill_TeamChange(-2); // observe
                                        if(self.version < autocvar_gameversion_min || self.version > autocvar_gameversion_max)
                                        {
                                                self.version_mismatch = 1;
                                                ClientKill_TeamChange(-2); // observe
-                                       } 
-                                       else if(autocvar_g_campaign || autocvar_g_balance_teams) 
+                                       }
+                                       else if(autocvar_g_campaign || autocvar_g_balance_teams)
                                        {
                                                //JoinBestTeam(self, FALSE, TRUE);
                                        {
                                                //JoinBestTeam(self, FALSE, TRUE);
-                                       } 
-                                       else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0)) 
+                                       }
+                                       else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0))
                                        {
                                                self.classname = "observer"; // really?
                                                stuffcmd(self, "menu_showteamselect\n");
                                        }
                                }
                                        {
                                                self.classname = "observer"; // really?
                                                stuffcmd(self, "menu_showteamselect\n");
                                        }
                                }
-                               
+
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        sprint(self, "Incorrect parameters for ^2clientversion^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        sprint(self, "Incorrect parameters for ^2clientversion^7\n");
                case CMD_REQUEST_USAGE:
@@ -124,13 +124,13 @@ void ClientCommand_mv_getpicture(float request, float argc) // internal command,
                {
                        if(argv(1) != "")
                        {
                {
                        if(argv(1) != "")
                        {
-                               if(intermission_running)                                
+                               if(intermission_running)
                                        MapVote_SendPicture(stof(argv(1)));
 
                                return;
                        }
                }
                                        MapVote_SendPicture(stof(argv(1)));
 
                                return;
                        }
                }
-                       
+
                default:
                        sprint(self, "Incorrect parameters for ^2mv_getpicture^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        sprint(self, "Incorrect parameters for ^2mv_getpicture^7\n");
                case CMD_REQUEST_USAGE:
@@ -142,7 +142,7 @@ void ClientCommand_mv_getpicture(float request, float argc) // internal command,
        }
 }
 
        }
 }
 
-void ClientCommand_join(float request) 
+void ClientCommand_join(float request)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -152,7 +152,7 @@ void ClientCommand_join(float request)
                        {
                                if(!IS_PLAYER(self) && !lockteams && !g_arena)
                                {
                        {
                                if(!IS_PLAYER(self) && !lockteams && !g_arena)
                                {
-                                       if(nJoinAllowed(self)) 
+                                       if(nJoinAllowed(self))
                                        {
                                                if(autocvar_g_campaign) { campaign_bots_may_start = 1; }
 
                                        {
                                                if(autocvar_g_campaign) { campaign_bots_may_start = 1; }
 
@@ -162,7 +162,7 @@ void ClientCommand_join(float request)
                                                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_JOIN_PLAY, self.netname);
                                                PutClientInServer();
                                        }
                                                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_JOIN_PLAY, self.netname);
                                                PutClientInServer();
                                        }
-                                       else 
+                                       else
                                        {
                                                //player may not join because of g_maxplayers is set
                                                Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_PREVENT);
                                        {
                                                //player may not join because of g_maxplayers is set
                                                Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_PREVENT);
@@ -171,7 +171,7 @@ void ClientCommand_join(float request)
                        }
                        return; // never fall through to usage
                }
                        }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -217,7 +217,7 @@ void ClientCommand_ready(float request) // todo: anti-spam for toggling readynes
                        }
                        return; // never fall through to usage
                }
                        }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -237,7 +237,7 @@ void ClientCommand_say(float request, float argc, string command)
                        if(argc >= 2) { Say(self, FALSE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
                        return; // never fall through to usage
                }
                        if(argc >= 2) { Say(self, FALSE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -257,7 +257,7 @@ void ClientCommand_say_team(float request, float argc, string command)
                        if(argc >= 2) { Say(self, TRUE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
                        return; // never fall through to usage
                }
                        if(argc >= 2) { Say(self, TRUE, world, substring(command, argv_start_index(1), argv_end_index(-1) - argv_start_index(1)), 1); }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -280,10 +280,10 @@ void ClientCommand_selectteam(float request, float argc)
                                {
                                        if(teamplay)
                                                if(self.team_forced <= 0)
                                {
                                        if(teamplay)
                                                if(self.team_forced <= 0)
-                                                       if (!lockteams) 
+                                                       if (!lockteams)
                                                        {
                                                                float selection;
                                                        {
                                                                float selection;
-                                                               
+
                                                                switch(argv(1))
                                                                {
                                                                        case "red": selection = NUM_TEAM_1; break;
                                                                switch(argv(1))
                                                                {
                                                                        case "red": selection = NUM_TEAM_1; break;
@@ -291,10 +291,10 @@ void ClientCommand_selectteam(float request, float argc)
                                                                        case "yellow": selection = NUM_TEAM_3; break;
                                                                        case "pink": selection = NUM_TEAM_4; break;
                                                                        case "auto": selection = (-1); break;
                                                                        case "yellow": selection = NUM_TEAM_3; break;
                                                                        case "pink": selection = NUM_TEAM_4; break;
                                                                        case "auto": selection = (-1); break;
-                                                                       
+
                                                                        default: selection = 0; break;
                                                                }
                                                                        default: selection = 0; break;
                                                                }
-                                                               
+
                                                                if(selection)
                                                                {
                                                                        if(self.team == selection && self.deadflag == DEAD_NO)
                                                                if(selection)
                                                                {
                                                                        if(self.team == selection && self.deadflag == DEAD_NO)
@@ -312,7 +312,7 @@ void ClientCommand_selectteam(float request, float argc)
                                        else
                                                sprint(self, "^7selectteam can only be used in teamgames\n");
                                }
                                        else
                                                sprint(self, "^7selectteam can only be used in teamgames\n");
                                }
-                               return; 
+                               return;
                        }
                }
 
                        }
                }
 
@@ -340,7 +340,7 @@ void ClientCommand_selfstuff(float request, string command)
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        sprint(self, "Incorrect parameters for ^2selectteam^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        sprint(self, "Incorrect parameters for ^2selectteam^7\n");
                case CMD_REQUEST_USAGE:
@@ -362,19 +362,19 @@ void ClientCommand_sentcvar(float request, float argc, string command)
                        {
                                //float tokens;
                                string s;
                        {
                                //float tokens;
                                string s;
-                               
+
                                if(argc == 2) // undefined cvar: use the default value on the server then
                                {
                                        s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
                                        tokenize_console(s);
                                }
                                if(argc == 2) // undefined cvar: use the default value on the server then
                                {
                                        s = strcat(substring(command, argv_start_index(0), argv_end_index(1) - argv_start_index(0)), " \"", cvar_defstring(argv(1)), "\"");
                                        tokenize_console(s);
                                }
-                               
+
                                GetCvars(1);
                                GetCvars(1);
-                               
+
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        sprint(self, "Incorrect parameters for ^2sentcvar^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        sprint(self, "Incorrect parameters for ^2sentcvar^7\n");
                case CMD_REQUEST_USAGE:
@@ -386,7 +386,7 @@ void ClientCommand_sentcvar(float request, float argc, string command)
        }
 }
 
        }
 }
 
-void ClientCommand_spectate(float request) 
+void ClientCommand_spectate(float request)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -394,7 +394,7 @@ void ClientCommand_spectate(float request)
                {
                        if(IS_CLIENT(self))
                        {
                {
                        if(IS_CLIENT(self))
                        {
-                               if(g_arena) { return; } 
+                               if(g_arena) { return; }
                                if(g_lms)
                                {
                                        if(self.lms_spectate_warning)
                                if(g_lms)
                                {
                                        if(self.lms_spectate_warning)
@@ -411,8 +411,8 @@ void ClientCommand_spectate(float request)
                                                return;
                                        }
                                }
                                                return;
                                        }
                                }
-                               
-                               if(IS_PLAYER(self) && autocvar_sv_spectate == 1) 
+
+                               if(IS_PLAYER(self) && autocvar_sv_spectate == 1)
                                        ClientKill_TeamChange(-2); // observe
 
                                // in CA, allow a dead player to move to spectators (without that, caplayer!=0 will be moved back to the player list)
                                        ClientKill_TeamChange(-2); // observe
 
                                // in CA, allow a dead player to move to spectators (without that, caplayer!=0 will be moved back to the player list)
@@ -425,7 +425,7 @@ void ClientCommand_spectate(float request)
                        }
                        return; // never fall through to usage
                }
                        }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -448,7 +448,7 @@ void ClientCommand_suggestmap(float request, float argc)
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        sprint(self, "Incorrect parameters for ^2suggestmap^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        sprint(self, "Incorrect parameters for ^2suggestmap^7\n");
                case CMD_REQUEST_USAGE:
@@ -470,7 +470,7 @@ void ClientCommand_tell(float request, float argc, string command)
                        {
                                entity tell_to = GetIndexedEntity(argc, 1);
                                float tell_accepted = VerifyClientEntity(tell_to, TRUE, FALSE);
                        {
                                entity tell_to = GetIndexedEntity(argc, 1);
                                float tell_accepted = VerifyClientEntity(tell_to, TRUE, FALSE);
-                               
+
                                if(tell_accepted > 0) // the target is a real client
                                {
                                        if(tell_to != self) // and we're allowed to send to them :D
                                if(tell_accepted > 0) // the target is a real client
                                {
                                        if(tell_to != self) // and we're allowed to send to them :D
@@ -480,15 +480,15 @@ void ClientCommand_tell(float request, float argc, string command)
                                        }
                                        else { print_to(self, "You can't ^2tell^7 a message to yourself."); return; }
                                }
                                        }
                                        else { print_to(self, "You can't ^2tell^7 a message to yourself."); return; }
                                }
-                               else if(argv(1) == "#0") 
-                               { 
+                               else if(argv(1) == "#0")
+                               {
                                        trigger_magicear_processmessage_forallears(self, -1, world, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)));
                                        return;
                                }
                                else { print_to(self, strcat("tell: ", GetClientErrorString(tell_accepted, argv(1)), ".")); return; }
                        }
                }
                                        trigger_magicear_processmessage_forallears(self, -1, world, substring(command, argv_start_index(next_token), argv_end_index(-1) - argv_start_index(next_token)));
                                        return;
                                }
                                else { print_to(self, strcat("tell: ", GetClientErrorString(tell_accepted, argv(1)), ".")); return; }
                        }
                }
-                       
+
                default:
                        sprint(self, "Incorrect parameters for ^2tell^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        sprint(self, "Incorrect parameters for ^2tell^7\n");
                case CMD_REQUEST_USAGE:
@@ -500,7 +500,7 @@ void ClientCommand_tell(float request, float argc, string command)
        }
 }
 
        }
 }
 
-void ClientCommand_voice(float request, float argc, string command) 
+void ClientCommand_voice(float request, float argc, string command)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -512,11 +512,11 @@ void ClientCommand_voice(float request, float argc, string command)
                                        VoiceMessage(argv(1), substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
                                else
                                        VoiceMessage(argv(1), "");
                                        VoiceMessage(argv(1), substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)));
                                else
                                        VoiceMessage(argv(1), "");
-                                       
+
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        sprint(self, "Incorrect parameters for ^2voice^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        sprint(self, "Incorrect parameters for ^2voice^7\n");
                case CMD_REQUEST_USAGE:
@@ -537,10 +537,10 @@ void ClientCommand_(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
        {
                case CMD_REQUEST_COMMAND:
                {
-                       
+
                        return; // never fall through to usage
                }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -575,15 +575,15 @@ void ClientCommand_(float request)
        CLIENT_COMMAND("tell", ClientCommand_tell(request, arguments, command), "Send a message directly to a player") \
        CLIENT_COMMAND("voice", ClientCommand_voice(request, arguments, command), "Send voice message via sound") \
        /* nothing */
        CLIENT_COMMAND("tell", ClientCommand_tell(request, arguments, command), "Send a message directly to a player") \
        CLIENT_COMMAND("voice", ClientCommand_voice(request, arguments, command), "Send voice message via sound") \
        /* nothing */
-       
+
 void ClientCommand_macro_help()
 {
        #define CLIENT_COMMAND(name,function,description) \
                { sprint(self, "  ^2", name, "^7: ", description, "\n"); }
 void ClientCommand_macro_help()
 {
        #define CLIENT_COMMAND(name,function,description) \
                { sprint(self, "  ^2", name, "^7: ", description, "\n"); }
-               
+
        CLIENT_COMMANDS(0, 0, "")
        #undef CLIENT_COMMAND
        CLIENT_COMMANDS(0, 0, "")
        #undef CLIENT_COMMAND
-       
+
        return;
 }
 
        return;
 }
 
@@ -591,10 +591,10 @@ float ClientCommand_macro_command(float argc, string command)
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
-               
+
        CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef CLIENT_COMMAND
        CLIENT_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef CLIENT_COMMAND
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -602,21 +602,21 @@ float ClientCommand_macro_usage(float argc)
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
 {
        #define CLIENT_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
-               
+
        CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef CLIENT_COMMAND
        CLIENT_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef CLIENT_COMMAND
-       
+
        return FALSE;
 }
 
 void ClientCommand_macro_write_aliases(float fh)
 {
        #define CLIENT_COMMAND(name,function,description) \
        return FALSE;
 }
 
 void ClientCommand_macro_write_aliases(float fh)
 {
        #define CLIENT_COMMAND(name,function,description) \
-               { CMD_Write_Alias("qc_cmd_cmd", name, description); } 
-               
+               { CMD_Write_Alias("qc_cmd_cmd", name, description); }
+
        CLIENT_COMMANDS(0, 0, "")
        #undef CLIENT_COMMAND
        CLIENT_COMMANDS(0, 0, "")
        #undef CLIENT_COMMAND
-       
+
        return;
 }
 
        return;
 }
 
@@ -632,17 +632,17 @@ void SV_ParseClientCommand(string command)
                return;
 
        float argc = tokenize_console(command);
                return;
 
        float argc = tokenize_console(command);
-       
+
        // for the mutator hook system
        cmd_name = strtolower(argv(0));
        cmd_argc = argc;
        cmd_string = command;
        // for the mutator hook system
        cmd_name = strtolower(argv(0));
        cmd_argc = argc;
        cmd_string = command;
-       
+
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
        // 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
        // cmd     vote - master - login - password
-       
+
        // for floodcheck
        switch(strtolower(argv(0)))
        {
        // for floodcheck
        switch(strtolower(argv(0)))
        {
@@ -654,29 +654,29 @@ void SV_ParseClientCommand(string command)
                case "prespawn": break; // handled by engine in host_cmd.c
                case "sentcvar": break; // handled by server in this file
                case "spawn": break; // handled by engine in host_cmd.c
                case "prespawn": break; // handled by engine in host_cmd.c
                case "sentcvar": break; // handled by server in this file
                case "spawn": break; // handled by engine in host_cmd.c
-               
-               default: 
+
+               default:
                        if(SV_ParseClientCommand_floodcheck())
                                break; // "TRUE": continue, as we're not flooding yet
                        else
                                return; // "FALSE": not allowed to continue, halt // print("^1ERROR: ^7ANTISPAM CAUGHT: ", command, ".\n");
        }
                        if(SV_ParseClientCommand_floodcheck())
                                break; // "TRUE": continue, as we're not flooding yet
                        else
                                return; // "FALSE": not allowed to continue, halt // print("^1ERROR: ^7ANTISPAM CAUGHT: ", command, ".\n");
        }
-       
+
        /* NOTE: should this be disabled? It can be spammy perhaps, but hopefully it's okay for now */
        /* NOTE: should this be disabled? It can be spammy perhaps, but hopefully it's okay for now */
-       if(argv(0) == "help") 
+       if(argv(0) == "help")
        {
        {
-               if(argc == 1) 
+               if(argc == 1)
                {
                        sprint(self, "\nClient networked commands:\n");
                        ClientCommand_macro_help();
                {
                        sprint(self, "\nClient networked commands:\n");
                        ClientCommand_macro_help();
-                       
+
                        sprint(self, "\nCommon networked commands:\n");
                        CommonCommand_macro_help(self);
                        sprint(self, "\nCommon networked commands:\n");
                        CommonCommand_macro_help(self);
-                       
+
                        sprint(self, "\nUsage:^3 cmd COMMAND...^7, where possible commands are listed above.\n");
                        sprint(self, "For help about a specific command, type cmd help COMMAND\n");
                        return;
                        sprint(self, "\nUsage:^3 cmd COMMAND...^7, where possible commands are listed above.\n");
                        sprint(self, "For help about a specific command, type cmd help COMMAND\n");
                        return;
-               } 
+               }
                else if(CommonCommand_macro_usage(argc, self)) // Instead of trying to call a command, we're going to see detailed information about it
                {
                        return;
                else if(CommonCommand_macro_usage(argc, self)) // Instead of trying to call a command, we're going to see detailed information about it
                {
                        return;
@@ -685,12 +685,12 @@ void SV_ParseClientCommand(string command)
                {
                        return;
                }
                {
                        return;
                }
-       } 
+       }
        else if(MUTATOR_CALLHOOK(SV_ParseClientCommand))
        {
                return; // handled by a mutator
        }
        else if(MUTATOR_CALLHOOK(SV_ParseClientCommand))
        {
                return; // handled by a mutator
        }
-       else if(CheatCommand(argc)) 
+       else if(CheatCommand(argc))
        {
                return; // handled by server/cheats.qc
        }
        {
                return; // handled by server/cheats.qc
        }
index 14754f501acb958d24c2301d4f0795a2c1520e42..c5ae7c7be069798f4cc0eff048f4d50e5633e7ac 100644 (file)
@@ -30,7 +30,7 @@ float VerifyClientEntity(entity client, float must_be_real, float must_be_bots)
                return CLIENT_NOT_REAL;
        else if(must_be_bots && !IS_BOT_CLIENT(client))
                return CLIENT_NOT_BOT;
                return CLIENT_NOT_REAL;
        else if(must_be_bots && !IS_BOT_CLIENT(client))
                return CLIENT_NOT_BOT;
-               
+
        return CLIENT_ACCEPTABLE;
 }
 
        return CLIENT_ACCEPTABLE;
 }
 
@@ -60,18 +60,18 @@ entity GetIndexedEntity(float argc, float start_index)
        entity tmp_player, selection;
        float tmp_number, index;
        string tmp_string;
        entity tmp_player, selection;
        float tmp_number, index;
        string tmp_string;
-       
+
        next_token = -1;
        index = start_index;
        selection = world;
        next_token = -1;
        index = start_index;
        selection = world;
-       
+
        if(argc > start_index)
        {
                if(substring(argv(index), 0, 1) == "#")
                {
                        tmp_string = substring(argv(index), 1, -1);
                        ++index;
        if(argc > start_index)
        {
                if(substring(argv(index), 0, 1) == "#")
                {
                        tmp_string = substring(argv(index), 1, -1);
                        ++index;
-                       
+
                        if(tmp_string != "") // is it all one token? like #1
                        {
                                tmp_number = stof(tmp_string);
                        if(tmp_string != "") // is it all one token? like #1
                        {
                                tmp_number = stof(tmp_string);
@@ -89,7 +89,7 @@ entity GetIndexedEntity(float argc, float start_index)
                        tmp_number = stof(argv(index));
                        ++index;
                }
                        tmp_number = stof(argv(index));
                        ++index;
                }
-               
+
                if(VerifyClientNumber(tmp_number))
                {
                        selection = edict_num(tmp_number); // yes, it was a number
                if(VerifyClientNumber(tmp_number))
                {
                        selection = edict_num(tmp_number); // yes, it was a number
@@ -99,11 +99,11 @@ entity GetIndexedEntity(float argc, float start_index)
                        FOR_EACH_CLIENT(tmp_player)
                                if (strdecolorize(tmp_player.netname) == strdecolorize(argv(start_index)))
                                        selection = tmp_player;
                        FOR_EACH_CLIENT(tmp_player)
                                if (strdecolorize(tmp_player.netname) == strdecolorize(argv(start_index)))
                                        selection = tmp_player;
-                                       
+
                        index = (start_index + 1);
                }
        }
                        index = (start_index + 1);
                }
        }
-       
+
        next_token = index;
        //print(strcat("start_index: ", ftos(start_index), ", next_token: ", ftos(next_token), ", edict: ", ftos(num_for_edict(selection)), ".\n"));
        return selection;
        next_token = index;
        //print(strcat("start_index: ", ftos(start_index), ", next_token: ", ftos(next_token), ", edict: ", ftos(num_for_edict(selection)), ".\n"));
        return selection;
@@ -114,12 +114,12 @@ entity GetFilteredEntity(string input)
 {
        entity tmp_player, selection;
        float tmp_number;
 {
        entity tmp_player, selection;
        float tmp_number;
-       
+
        if(substring(input, 0, 1) == "#")
                tmp_number = stof(substring(input, 1, -1));
        else
                tmp_number = stof(input);
        if(substring(input, 0, 1) == "#")
                tmp_number = stof(substring(input, 1, -1));
        else
                tmp_number = stof(input);
-       
+
        if(VerifyClientNumber(tmp_number))
        {
                selection = edict_num(tmp_number);
        if(VerifyClientNumber(tmp_number))
        {
                selection = edict_num(tmp_number);
@@ -131,7 +131,7 @@ entity GetFilteredEntity(string input)
                        if (strdecolorize(tmp_player.netname) == strdecolorize(input))
                                selection = tmp_player;
        }
                        if (strdecolorize(tmp_player.netname) == strdecolorize(input))
                                selection = tmp_player;
        }
-       
+
        return selection;
 }
 
        return selection;
 }
 
@@ -140,7 +140,7 @@ float GetFilteredNumber(string input)
 {
        entity selection = GetFilteredEntity(input);
        float output;
 {
        entity selection = GetFilteredEntity(input);
        float output;
-       
+
        output = num_for_edict(selection);
 
        return output;
        output = num_for_edict(selection);
 
        return output;
@@ -165,14 +165,14 @@ void timeout_handler_reset()
        timeout_caller = world;
        timeout_time = 0;
        timeout_leadtime = 0;
        timeout_caller = world;
        timeout_time = 0;
        timeout_leadtime = 0;
-                               
+
        remove(self);
 }
 
        remove(self);
 }
 
-void timeout_handler_think() 
+void timeout_handler_think()
 {
        entity tmp_player;
 {
        entity tmp_player;
-       
+
        switch(timeout_status)
        {
                case TIMEOUT_ACTIVE:
        switch(timeout_status)
        {
                case TIMEOUT_ACTIVE:
@@ -190,53 +190,53 @@ void timeout_handler_think()
                        else // time to end the timeout
                        {
                                timeout_status = TIMEOUT_INACTIVE;
                        else // time to end the timeout
                        {
                                timeout_status = TIMEOUT_INACTIVE;
-                               
+
                                // reset the slowmo value back to normal
                                cvar_set("slowmo", ftos(orig_slowmo));
                                // reset the slowmo value back to normal
                                cvar_set("slowmo", ftos(orig_slowmo));
-                               
+
                                // unlock the view for players so they can move around again
                                // unlock the view for players so they can move around again
-                               FOR_EACH_REALPLAYER(tmp_player) 
+                               FOR_EACH_REALPLAYER(tmp_player)
                                        tmp_player.fixangle = FALSE;
                                        tmp_player.fixangle = FALSE;
-                                       
+
                                timeout_handler_reset();
                        }
                                timeout_handler_reset();
                        }
-                       
+
                        return;
                }
                        return;
                }
-               
+
                case TIMEOUT_LEADTIME:
                {
                        if(timeout_leadtime > 0) // countdown is still going
                        {
                                Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_TIMEOUT_BEGINNING, timeout_leadtime);
                case TIMEOUT_LEADTIME:
                {
                        if(timeout_leadtime > 0) // countdown is still going
                        {
                                Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_TIMEOUT_BEGINNING, timeout_leadtime);
-                               
+
                                self.nextthink = time + 1; // think again in one second
                                timeout_leadtime -= 1; // decrease the time counter
                        }
                        else // time to begin the timeout
                        {
                                timeout_status = TIMEOUT_ACTIVE;
                                self.nextthink = time + 1; // think again in one second
                                timeout_leadtime -= 1; // decrease the time counter
                        }
                        else // time to begin the timeout
                        {
                                timeout_status = TIMEOUT_ACTIVE;
-                               
+
                                // set the slowmo value to the timeout default slowmo value
                                cvar_set("slowmo", ftos(TIMEOUT_SLOWMO_VALUE));
                                // set the slowmo value to the timeout default slowmo value
                                cvar_set("slowmo", ftos(TIMEOUT_SLOWMO_VALUE));
-                               
+
                                // reset all the flood variables
                                FOR_EACH_CLIENT(tmp_player)
                                        tmp_player.nickspamcount = tmp_player.nickspamtime = tmp_player.floodcontrol_chat =
                                // reset all the flood variables
                                FOR_EACH_CLIENT(tmp_player)
                                        tmp_player.nickspamcount = tmp_player.nickspamtime = tmp_player.floodcontrol_chat =
-                                       tmp_player.floodcontrol_chatteam = tmp_player.floodcontrol_chattell = 
+                                       tmp_player.floodcontrol_chatteam = tmp_player.floodcontrol_chattell =
                                        tmp_player.floodcontrol_voice = tmp_player.floodcontrol_voiceteam = 0;
                                        tmp_player.floodcontrol_voice = tmp_player.floodcontrol_voiceteam = 0;
-                                       
+
                                // copy .v_angle to .lastV_angle for every player in order to fix their view during pause (see PlayerPreThink)
                                // copy .v_angle to .lastV_angle for every player in order to fix their view during pause (see PlayerPreThink)
-                               FOR_EACH_REALPLAYER(tmp_player) 
+                               FOR_EACH_REALPLAYER(tmp_player)
                                        tmp_player.lastV_angle = tmp_player.v_angle;
                                        tmp_player.lastV_angle = tmp_player.v_angle;
-                               
+
                                self.nextthink = time; // think again next frame to handle it under TIMEOUT_ACTIVE code
                        }
                                self.nextthink = time; // think again next frame to handle it under TIMEOUT_ACTIVE code
                        }
-                       
+
                        return;
                }
                        return;
                }
-               
-               
+
+
                case TIMEOUT_INACTIVE:
                default:
                {
                case TIMEOUT_INACTIVE:
                default:
                {
@@ -261,7 +261,7 @@ void CommonCommand_cvar_changes(float request, entity caller)
                        print_to(caller, cvar_changes);
                        return; // never fall through to usage
                }
                        print_to(caller, cvar_changes);
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -282,7 +282,7 @@ void CommonCommand_cvar_purechanges(float request, entity caller)
                        print_to(caller, cvar_purechanges);
                        return; // never fall through to usage
                }
                        print_to(caller, cvar_purechanges);
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -294,22 +294,22 @@ void CommonCommand_cvar_purechanges(float request, entity caller)
        }
 }
 
        }
 }
 
-void CommonCommand_info(float request, entity caller, float argc) 
-{      
+void CommonCommand_info(float request, entity caller, float argc)
+{
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
                {
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
                {
-                       string command = builtin_cvar_string(strcat("sv_info_", argv(1))); 
-                       
+                       string command = builtin_cvar_string(strcat("sv_info_", argv(1)));
+
                        if(command)
                        if(command)
-                               wordwrap_sprint(command, 1000); 
+                               wordwrap_sprint(command, 1000);
                        else
                                print_to(caller, "ERROR: unsupported info command");
                        else
                                print_to(caller, "ERROR: unsupported info command");
-                               
+
                        return; // never fall through to usage
                }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -329,7 +329,7 @@ void CommonCommand_ladder(float request, entity caller)
                        print_to(caller, ladder_reply);
                        return; // never fall through to usage
                }
                        print_to(caller, ladder_reply);
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -349,7 +349,7 @@ void CommonCommand_lsmaps(float request, entity caller)
                        print_to(caller, lsmaps_reply);
                        return; // never fall through to usage
                }
                        print_to(caller, lsmaps_reply);
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -369,7 +369,7 @@ void CommonCommand_printmaplist(float request, entity caller)
                        print_to(caller, maplist_reply);
                        return; // never fall through to usage
                }
                        print_to(caller, maplist_reply);
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -389,7 +389,7 @@ void CommonCommand_rankings(float request, entity caller)
                        print_to(caller, rankings_reply);
                        return; // never fall through to usage
                }
                        print_to(caller, rankings_reply);
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -401,20 +401,20 @@ void CommonCommand_rankings(float request, entity caller)
 }
 
 void CommonCommand_records(float request, entity caller)
 }
 
 void CommonCommand_records(float request, entity caller)
-{      
+{
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
                {
                        float i;
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
                {
                        float i;
-                       
+
                        for(i = 0; i < 10; ++i)
                                if(records_reply[i] != "")
                                        print_to(caller, records_reply[i]);
                        for(i = 0; i < 10; ++i)
                                if(records_reply[i] != "")
                                        print_to(caller, records_reply[i]);
-                               
+
                        return; // never fall through to usage
                }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -434,7 +434,7 @@ void CommonCommand_teamstatus(float request, entity caller)
                        Score_NicePrint(caller);
                        return; // never fall through to usage
                }
                        Score_NicePrint(caller);
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -460,7 +460,7 @@ void CommonCommand_time(float request, entity caller)
                        print_to(caller, strcat("gmtime = ", strftime(FALSE, "%a %b %e %H:%M:%S %Z %Y")));
                        return;
                }
                        print_to(caller, strcat("gmtime = ", strftime(FALSE, "%a %b %e %H:%M:%S %Z %Y")));
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -481,7 +481,7 @@ void CommonCommand_timein(float request, entity caller)
                        {
                                if (!timeout_status) { print_to(caller, "^7Error: There is no active timeout called."); }
                                else if(caller && (caller != timeout_caller)) { print_to(caller, "^7Error: You are not allowed to stop the active timeout."); }
                        {
                                if (!timeout_status) { print_to(caller, "^7Error: There is no active timeout called."); }
                                else if(caller && (caller != timeout_caller)) { print_to(caller, "^7Error: You are not allowed to stop the active timeout."); }
-                                       
+
                                else // everything should be okay, continue aborting timeout
                                {
                                        switch(timeout_status)
                                else // everything should be okay, continue aborting timeout
                                {
                                        switch(timeout_status)
@@ -494,7 +494,7 @@ void CommonCommand_timein(float request, entity caller)
                                                        bprint(strcat("^7The timeout was aborted by ", GetCallerName(caller), " !\n"));
                                                        return;
                                                }
                                                        bprint(strcat("^7The timeout was aborted by ", GetCallerName(caller), " !\n"));
                                                        return;
                                                }
-                                               
+
                                                case TIMEOUT_ACTIVE:
                                                {
                                                        timeout_time = autocvar_sv_timeout_resumetime;
                                                case TIMEOUT_ACTIVE:
                                                {
                                                        timeout_time = autocvar_sv_timeout_resumetime;
@@ -502,16 +502,16 @@ void CommonCommand_timein(float request, entity caller)
                                                        bprint(strcat("^1Attention: ^7", GetCallerName(caller), " resumed the game! Prepare for battle!\n"));
                                                        return;
                                                }
                                                        bprint(strcat("^1Attention: ^7", GetCallerName(caller), " resumed the game! Prepare for battle!\n"));
                                                        return;
                                                }
-                                               
+
                                                default: dprint("timeout status was inactive, but this code was executed anyway?"); return;
                                        }
                                }
                        }
                        else { print_to(caller, "^1Timeins are not allowed to be called, enable them with sv_timeout 1.\n"); }
                                                default: dprint("timeout status was inactive, but this code was executed anyway?"); return;
                                        }
                                }
                        }
                        else { print_to(caller, "^1Timeins are not allowed to be called, enable them with sv_timeout 1.\n"); }
-                       
+
                        return; // never fall through to usage
                }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -531,7 +531,7 @@ void CommonCommand_timeout(float request, entity caller) // DEAR GOD THIS COMMAN
                        if(!caller || autocvar_sv_timeout)
                        {
                                float last_possible_timeout = ((autocvar_timelimit * 60) - autocvar_sv_timeout_leadtime - 1);
                        if(!caller || autocvar_sv_timeout)
                        {
                                float last_possible_timeout = ((autocvar_timelimit * 60) - autocvar_sv_timeout_leadtime - 1);
-                               
+
                                if(timeout_status) { print_to(caller, "^7Error: A timeout is already active."); }
                                else if(vote_called) { print_to(caller, "^7Error: You can not call a timeout while a vote is active."); }
                                else if(warmup_stage && !g_warmup_allow_timeout) { print_to(caller, "^7Error: You can not call a timeout in warmup-stage."); }
                                if(timeout_status) { print_to(caller, "^7Error: A timeout is already active."); }
                                else if(vote_called) { print_to(caller, "^7Error: You can not call a timeout while a vote is active."); }
                                else if(warmup_stage && !g_warmup_allow_timeout) { print_to(caller, "^7Error: You can not call a timeout in warmup-stage."); }
@@ -539,18 +539,18 @@ void CommonCommand_timeout(float request, entity caller) // DEAR GOD THIS COMMAN
                                else if(caller && (caller.allowed_timeouts < 1)) { print_to(caller, "^7Error: You already used all your timeout calls for this map."); }
                                else if(caller && !IS_PLAYER(caller)) { print_to(caller, "^7Error: You must be a player to call a timeout."); }
                                else if((autocvar_timelimit) && (last_possible_timeout < time - game_starttime)) { print_to(caller, "^7Error: It is too late to call a timeout now!"); }
                                else if(caller && (caller.allowed_timeouts < 1)) { print_to(caller, "^7Error: You already used all your timeout calls for this map."); }
                                else if(caller && !IS_PLAYER(caller)) { print_to(caller, "^7Error: You must be a player to call a timeout."); }
                                else if((autocvar_timelimit) && (last_possible_timeout < time - game_starttime)) { print_to(caller, "^7Error: It is too late to call a timeout now!"); }
-                               
+
                                else // everything should be okay, proceed with starting the timeout
                                else // everything should be okay, proceed with starting the timeout
-                               {                                       
+                               {
                                        if(caller) { caller.allowed_timeouts -= 1; }
                                        if(caller) { caller.allowed_timeouts -= 1; }
-                                       
+
                                        bprint(GetCallerName(caller), " ^7called a timeout", (caller ? strcat(" (", ftos(caller.allowed_timeouts), " timeout(s) left)") : ""), "!\n"); // write a bprint who started the timeout (and how many they have left)
                                        bprint(GetCallerName(caller), " ^7called a timeout", (caller ? strcat(" (", ftos(caller.allowed_timeouts), " timeout(s) left)") : ""), "!\n"); // write a bprint who started the timeout (and how many they have left)
-                                       
+
                                        timeout_status = TIMEOUT_LEADTIME;
                                        timeout_caller = caller;
                                        timeout_time = autocvar_sv_timeout_length;
                                        timeout_leadtime = autocvar_sv_timeout_leadtime;
                                        timeout_status = TIMEOUT_LEADTIME;
                                        timeout_caller = caller;
                                        timeout_time = autocvar_sv_timeout_length;
                                        timeout_leadtime = autocvar_sv_timeout_leadtime;
-                                       
+
                                        timeout_handler = spawn();
                                        timeout_handler.think = timeout_handler_think;
                                        timeout_handler.nextthink = time; // always let the entity think asap
                                        timeout_handler = spawn();
                                        timeout_handler.think = timeout_handler_think;
                                        timeout_handler.nextthink = time; // always let the entity think asap
@@ -559,10 +559,10 @@ void CommonCommand_timeout(float request, entity caller) // DEAR GOD THIS COMMAN
                                }
                        }
                        else { print_to(caller, "^1Timeouts are not allowed to be called, enable them with sv_timeout 1.\n"); }
                                }
                        }
                        else { print_to(caller, "^1Timeouts are not allowed to be called, enable them with sv_timeout 1.\n"); }
-                       
+
                        return; // never fall through to usage
                }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -581,20 +581,20 @@ void CommonCommand_who(float request, entity caller, float argc)
                {
                        float total_listed_players, is_bot;
                        entity tmp_player;
                {
                        float total_listed_players, is_bot;
                        entity tmp_player;
-                       
+
                        float privacy = (caller && autocvar_sv_status_privacy);
                        string separator = strreplace("%", " ", strcat((argv(1) ? argv(1) : " "), "^7"));
                        string tmp_netaddress, tmp_crypto_idfp;
                        float privacy = (caller && autocvar_sv_status_privacy);
                        string separator = strreplace("%", " ", strcat((argv(1) ? argv(1) : " "), "^7"));
                        string tmp_netaddress, tmp_crypto_idfp;
-                       
+
                        print_to(caller, strcat("List of client information", (privacy ? " (some data is hidden for privacy)" : ""), ":"));
                        print_to(caller, strcat("List of client information", (privacy ? " (some data is hidden for privacy)" : ""), ":"));
-                       print_to(caller, sprintf(strreplace(" ", separator, " %-4s %-20s %-5s %-3s %-9s %-16s %s "), 
+                       print_to(caller, sprintf(strreplace(" ", separator, " %-4s %-20s %-5s %-3s %-9s %-16s %s "),
                                "ent", "nickname", "ping", "pl", "time", "ip", "crypto_id"));
                                "ent", "nickname", "ping", "pl", "time", "ip", "crypto_id"));
-                       
+
                        total_listed_players = 0;
                        FOR_EACH_CLIENT(tmp_player)
                        {
                                is_bot = (IS_BOT_CLIENT(tmp_player));
                        total_listed_players = 0;
                        FOR_EACH_CLIENT(tmp_player)
                        {
                                is_bot = (IS_BOT_CLIENT(tmp_player));
-                               
+
                                if(is_bot)
                                {
                                        tmp_netaddress = "null/botclient";
                                if(is_bot)
                                {
                                        tmp_netaddress = "null/botclient";
@@ -611,23 +611,23 @@ void CommonCommand_who(float request, entity caller, float argc)
                                        tmp_crypto_idfp = tmp_player.crypto_idfp;
                                }
 
                                        tmp_crypto_idfp = tmp_player.crypto_idfp;
                                }
 
-                               print_to(caller, sprintf(strreplace(" ", separator, " #%-3d %-20.20s %-5d %-3d %-9s %-16s %s "), 
-                                       num_for_edict(tmp_player), 
+                               print_to(caller, sprintf(strreplace(" ", separator, " #%-3d %-20.20s %-5d %-3d %-9s %-16s %s "),
+                                       num_for_edict(tmp_player),
                                        tmp_player.netname,
                                        tmp_player.netname,
-                                       tmp_player.ping, 
-                                       tmp_player.ping_packetloss, 
+                                       tmp_player.ping,
+                                       tmp_player.ping_packetloss,
                                        process_time(1, time - tmp_player.jointime),
                                        tmp_netaddress,
                                        tmp_crypto_idfp));
                                        process_time(1, time - tmp_player.jointime),
                                        tmp_netaddress,
                                        tmp_crypto_idfp));
-                               
+
                                ++total_listed_players;
                        }
                                ++total_listed_players;
                        }
-                       
+
                        print_to(caller, strcat("Finished listing ", ftos(total_listed_players), " client(s) out of ", ftos(maxclients), " slots."));
                        print_to(caller, strcat("Finished listing ", ftos(total_listed_players), " client(s) out of ", ftos(maxclients), " slots."));
-                       
+
                        return; // never fall through to usage
                }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -646,10 +646,10 @@ void CommonCommand_(float request, entity caller)
        {
                case CMD_REQUEST_COMMAND:
                {
        {
                case CMD_REQUEST_COMMAND:
                {
-                       
+
                        return; // never fall through to usage
                }
                        return; // never fall through to usage
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -688,10 +688,10 @@ void CommonCommand_macro_help(entity caller)
 {
        #define COMMON_COMMAND(name,function,description) \
                { print_to(caller, strcat("  ^2", name, "^7: ", description)); }
 {
        #define COMMON_COMMAND(name,function,description) \
                { print_to(caller, strcat("  ^2", name, "^7: ", description)); }
-               
+
        COMMON_COMMANDS(0, caller, 0, "")
        #undef COMMON_COMMAND
        COMMON_COMMANDS(0, caller, 0, "")
        #undef COMMON_COMMAND
-       
+
        return;
 }
 
        return;
 }
 
@@ -699,10 +699,10 @@ float CommonCommand_macro_command(float argc, entity caller, string command)
 {
        #define COMMON_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
 {
        #define COMMON_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
-               
+
        COMMON_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, command)
        #undef COMMON_COMMAND
        COMMON_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, command)
        #undef COMMON_COMMAND
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -710,10 +710,10 @@ float CommonCommand_macro_usage(float argc, entity caller)
 {
        #define COMMON_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
 {
        #define COMMON_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
-               
+
        COMMON_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "")
        #undef COMMON_COMMAND
        COMMON_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "")
        #undef COMMON_COMMAND
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -721,9 +721,9 @@ void CommonCommand_macro_write_aliases(float fh)
 {
        #define COMMON_COMMAND(name,function,description) \
                { CMD_Write_Alias("qc_cmd_svcmd", name, description); }
 {
        #define COMMON_COMMAND(name,function,description) \
                { CMD_Write_Alias("qc_cmd_svcmd", name, description); }
-               
+
        COMMON_COMMANDS(0, world, 0, "")
        #undef COMMON_COMMAND
        COMMON_COMMANDS(0, world, 0, "")
        #undef COMMON_COMMAND
-       
+
        return;
 }
        return;
 }
index 191c0d9d6e345f19714b684a6b34911ab2d013d9..a55e0e0cd28706f7199c06db12aae058a02c1dbc 100644 (file)
@@ -9,12 +9,12 @@
 // without using any extra processing time.
 
 // See common.qc for their proper commands
 // without using any extra processing time.
 
 // See common.qc for their proper commands
-       
+
 string getrecords(float page) // 50 records per page
 string getrecords(float page) // 50 records per page
-{      
+{
        float rec = 0, r, i;
        string h, s;
        float rec = 0, r, i;
        string h, s;
-       
+
        s = "";
 
        if (g_ctf)
        s = "";
 
        if (g_ctf)
@@ -24,10 +24,10 @@ string getrecords(float page) // 50 records per page
                        if (MapInfo_Get_ByID(i))
                        {
                                r = stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, "/captimerecord/time")));
                        if (MapInfo_Get_ByID(i))
                        {
                                r = stof(db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, "/captimerecord/time")));
-                               
+
                                if (!r)
                                        continue;
                                if (!r)
                                        continue;
-                                       
+
                                // TODO: uid2name
                                h = db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, "/captimerecord/netname"));
                                s = strcat(s, strpad(32, MapInfo_Map_bspname), " ", strpad(-6, ftos_decimals(r, 2)), " ", h, "\n");
                                // TODO: uid2name
                                h = db_get(ServerProgsDB, strcat(MapInfo_Map_bspname, "/captimerecord/netname"));
                                s = strcat(s, strpad(32, MapInfo_Map_bspname), " ", strpad(-6, ftos_decimals(r, 2)), " ", h, "\n");
@@ -43,10 +43,10 @@ string getrecords(float page) // 50 records per page
                        if (MapInfo_Get_ByID(i))
                        {
                                r = race_readTime(MapInfo_Map_bspname, 1);
                        if (MapInfo_Get_ByID(i))
                        {
                                r = race_readTime(MapInfo_Map_bspname, 1);
-                               
+
                                if (!r)
                                        continue;
                                if (!r)
                                        continue;
-                                       
+
                                h = race_readName(MapInfo_Map_bspname, 1);
                                s = strcat(s, strpad(32, MapInfo_Map_bspname), " ", strpad(-8, TIME_ENCODED_TOSTRING(r)), " ", h, "\n");
                                ++rec;
                                h = race_readName(MapInfo_Map_bspname, 1);
                                s = strcat(s, strpad(32, MapInfo_Map_bspname), " ", strpad(-8, TIME_ENCODED_TOSTRING(r)), " ", h, "\n");
                                ++rec;
@@ -61,10 +61,10 @@ string getrecords(float page) // 50 records per page
                        if (MapInfo_Get_ByID(i))
                        {
                                r = race_readTime(MapInfo_Map_bspname, 1);
                        if (MapInfo_Get_ByID(i))
                        {
                                r = race_readTime(MapInfo_Map_bspname, 1);
-                               
+
                                if (!r)
                                        continue;
                                if (!r)
                                        continue;
-                                       
+
                                h = race_readName(MapInfo_Map_bspname, 1);
                                s = strcat(s, strpad(32, MapInfo_Map_bspname), " ", strpad(-8, TIME_ENCODED_TOSTRING(r)), " ", h, "\n");
                                ++rec;
                                h = race_readName(MapInfo_Map_bspname, 1);
                                s = strcat(s, strpad(32, MapInfo_Map_bspname), " ", strpad(-8, TIME_ENCODED_TOSTRING(r)), " ", h, "\n");
                                ++rec;
@@ -91,10 +91,10 @@ string getrankings()
        for (i = 1; i <= RANKINGS_CNT; ++i)
        {
                t = race_readTime(map, i);
        for (i = 1; i <= RANKINGS_CNT; ++i)
        {
                t = race_readTime(map, i);
-               
+
                if (t == 0)
                        continue;
                if (t == 0)
                        continue;
-                       
+
                n = race_readName(map, i);
                p = count_ordinal(i);
                s = strcat(s, strpad(8, p), " ", strpad(-8, TIME_ENCODED_TOSTRING(t)), " ", n, "\n");
                n = race_readName(map, i);
                p = count_ordinal(i);
                s = strcat(s, strpad(8, p), " ", strpad(-8, TIME_ENCODED_TOSTRING(t)), " ", n, "\n");
@@ -112,7 +112,7 @@ string getladder()
 {
        float i, j, k, uidcnt = 0, thiscnt;
        string s, temp_s, rr, myuid, thisuid;
 {
        float i, j, k, uidcnt = 0, thiscnt;
        string s, temp_s, rr, myuid, thisuid;
-       
+
        if(g_cts)
                rr = CTS_RECORD;
        else
        if(g_cts)
                rr = CTS_RECORD;
        else
@@ -147,12 +147,12 @@ string getladder()
                                // LADDER_CNT+1 = total points
 
                                temp_s = db_get(TemporaryDB, strcat("ladder", myuid));
                                // LADDER_CNT+1 = total points
 
                                temp_s = db_get(TemporaryDB, strcat("ladder", myuid));
-                               
+
                                if(temp_s == "")
                                {
                                        db_put(TemporaryDB, strcat("uid", ftos(uidcnt)), myuid);
                                        ++uidcnt;
                                if(temp_s == "")
                                {
                                        db_put(TemporaryDB, strcat("uid", ftos(uidcnt)), myuid);
                                        ++uidcnt;
-                                       
+
                                        for(j = 0; j <= LADDER_CNT + 1; ++j)
                                        {
                                                if(j != LADDER_CNT + 1)
                                        for(j = 0; j <= LADDER_CNT + 1; ++j)
                                        {
                                                if(j != LADDER_CNT + 1)
@@ -225,7 +225,7 @@ string getladder()
                                                top_uids[k] = top_uids[k-1];
                                                top_scores[k] = top_scores[k-1];
                                        }
                                                top_uids[k] = top_uids[k-1];
                                                top_scores[k] = top_scores[k-1];
                                        }
-                                       
+
                                        top_uids[j] = thisuid;
                                        top_scores[j] = thiscnt;
                                        break;
                                        top_uids[j] = thisuid;
                                        top_scores[j] = thiscnt;
                                        break;
@@ -233,21 +233,21 @@ string getladder()
                        }
                }
        }
                        }
                }
        }
-       
+
        s = "^3-----------------------\n\n";
        s = "^3-----------------------\n\n";
-       
+
        s = strcat(s, "Pos ^3|");
        s = strcat(s, " ^7Total  ^3|");
        s = strcat(s, "Pos ^3|");
        s = strcat(s, " ^7Total  ^3|");
-       
+
        for(i = 1; i <= LADDER_CNT; ++i)
                { s = strcat(s, " ^7", count_ordinal(i), " ^3|"); }
        for(i = 1; i <= LADDER_CNT; ++i)
                { s = strcat(s, " ^7", count_ordinal(i), " ^3|"); }
-       
+
        s = strcat(s, " ^7Speed awards ^3| ^7Name");
        s = strcat(s, "\n^3----+--------");
        s = strcat(s, " ^7Speed awards ^3| ^7Name");
        s = strcat(s, "\n^3----+--------");
-       
+
        for(i = 1; i <= min(9, LADDER_CNT); ++i)
                { s = strcat(s, "+-----"); }
        for(i = 1; i <= min(9, LADDER_CNT); ++i)
                { s = strcat(s, "+-----"); }
-               
+
        #if LADDER_CNT > 9
        for(i = 1; i <= LADDER_CNT - 9; ++i)
                { s = strcat(s, "+------"); }
        #if LADDER_CNT > 9
        for(i = 1; i <= LADDER_CNT - 9; ++i)
                { s = strcat(s, "+------"); }
@@ -259,16 +259,16 @@ string getladder()
        {
                temp_s = db_get(TemporaryDB, strcat("ladder", top_uids[i]));
                tokenize_console(temp_s);
        {
                temp_s = db_get(TemporaryDB, strcat("ladder", top_uids[i]));
                tokenize_console(temp_s);
-               
+
                if(argv(LADDER_CNT+1) == "") // total is 0, skip
                        continue;
                if(argv(LADDER_CNT+1) == "") // total is 0, skip
                        continue;
-                       
+
                s = strcat(s, strpad(4, count_ordinal(i+1)), "^3| ^7"); // pos
                s = strcat(s, strpad(7, argv(LADDER_CNT+1)), "^3| ^7"); // total
                s = strcat(s, strpad(4, count_ordinal(i+1)), "^3| ^7"); // pos
                s = strcat(s, strpad(7, argv(LADDER_CNT+1)), "^3| ^7"); // total
-               
+
                for(j = 1; j <= min(9, LADDER_CNT); ++j)
                        { s = strcat(s, strpad(4, argv(j)), "^3| ^7"); } // 1st, 2nd, 3rd etc cnt
                for(j = 1; j <= min(9, LADDER_CNT); ++j)
                        { s = strcat(s, strpad(4, argv(j)), "^3| ^7"); } // 1st, 2nd, 3rd etc cnt
-                       
+
                #if LADDER_CNT > 9
                for(j = 10; j <= LADDER_CNT; ++j)
                        { s = strcat(s, strpad(4, argv(j)), " ^3| ^7"); } // 1st, 2nd, 3rd etc cnt
                #if LADDER_CNT > 9
                for(j = 10; j <= LADDER_CNT; ++j)
                        { s = strcat(s, strpad(4, argv(j)), " ^3| ^7"); } // 1st, 2nd, 3rd etc cnt
@@ -290,7 +290,7 @@ string getmaplist()
 {
        string maplist = "", col;
        float i, argc;
 {
        string maplist = "", col;
        float i, argc;
-       
+
        argc = tokenize_console(autocvar_g_maplist);
        for(i = 0; i < argc; ++i)
        {
        argc = tokenize_console(autocvar_g_maplist);
        for(i = 0; i < argc; ++i)
        {
@@ -306,12 +306,12 @@ string getmaplist()
        return sprintf("^7Maps in list: %s\n", maplist);
 }
 
        return sprintf("^7Maps in list: %s\n", maplist);
 }
 
-       
+
 string getlsmaps()
 {
        string lsmaps = "", col;
        float i, newmaps = 0;
 string getlsmaps()
 {
        string lsmaps = "", col;
        float i, newmaps = 0;
-       
+
        for(i = 0; i < MapInfo_count; ++i)
        {
                if((MapInfo_Get_ByID(i)) && !(MapInfo_Map_flags & MapInfo_ForbiddenFlags()))
        for(i = 0; i < MapInfo_count; ++i)
        {
                if((MapInfo_Get_ByID(i)) && !(MapInfo_Map_flags & MapInfo_ForbiddenFlags()))
index 7fd707813570331d9d20f4d63a958138f70cc01b..331f5f95f404484f5a79bffc624e4b8fbb434444 100644 (file)
@@ -226,7 +226,7 @@ void RadarMap_Think()
        //   size: pixel width/height
        //   maxs: cell width/height
        //   frame: counter
        //   size: pixel width/height
        //   maxs: cell width/height
        //   frame: counter
-       
+
        float i, x, l;
        string si;
 
        float i, x, l;
        string si;
 
@@ -380,7 +380,7 @@ void RadarMap_Think()
 float RadarMap_Make(float argc)
 {
        float i;
 float RadarMap_Make(float argc)
 {
        float i;
-       
+
        if(!radarmapper)
        {
                radarmapper = spawn();
        if(!radarmapper)
        {
                radarmapper = spawn();
@@ -407,21 +407,21 @@ float RadarMap_Make(float argc)
                                case "--resolution": { ++i; radarmapper.size_x = stof(argv(i)); ++i; radarmapper.size_y = stof(argv(i)); break; }
                                case "--qual": // minor alias
                                case "--quality": { ++i; radarmapper.size_z = stof(argv(i)); break; }
                                case "--resolution": { ++i; radarmapper.size_x = stof(argv(i)); ++i; radarmapper.size_y = stof(argv(i)); break; }
                                case "--qual": // minor alias
                                case "--quality": { ++i; radarmapper.size_z = stof(argv(i)); break; }
-                               
-                               default: 
-                                       i = argc; 
+
+                               default:
+                                       i = argc;
                                        remove(radarmapper);
                                        radarmapper = world;
                                        break;
                        }
                }
                                        remove(radarmapper);
                                        radarmapper = world;
                                        break;
                        }
                }
-                               
-               if(radarmapper) // after doing the arguments, see if we successfully went forward. 
+
+               if(radarmapper) // after doing the arguments, see if we successfully went forward.
                {
                        print("Radarmap entity spawned.\n");
                        return TRUE; // if so, don't print usage.
                }
        }
                {
                        print("Radarmap entity spawned.\n");
                        return TRUE; // if so, don't print usage.
                }
        }
-       
+
        return FALSE;
 }
        return FALSE;
 }
index 7dbafa7ab8b747d888e1e06868a3717938463d3a..ff07f2458a0608ed5f7f3696f129531da76d9f8d 100644 (file)
@@ -74,31 +74,31 @@ void GameCommand_adminmsg(float request, float argc)
                {
                        entity client;
                        float accepted;
                {
                        entity client;
                        float accepted;
-                       
+
                        string targets = strreplace(",", " ", argv(1));
                        string original_targets = strreplace(" ", ", ", targets);
                        string admin_message = argv(2);
                        float infobartime = stof(argv(3));
                        string targets = strreplace(",", " ", argv(1));
                        string original_targets = strreplace(" ", ", ", targets);
                        string admin_message = argv(2);
                        float infobartime = stof(argv(3));
-                       
+
                        string successful, t;
                        successful = string_null;
                        string successful, t;
                        successful = string_null;
-                       
+
                        if((targets) && (admin_message))
                        {
                                for(;targets;)
                                {
                                        t = car(targets); targets = cdr(targets);
                        if((targets) && (admin_message))
                        {
                                for(;targets;)
                                {
                                        t = car(targets); targets = cdr(targets);
-                                       
+
                                        // Check to see if the player is a valid target
                                        client = GetFilteredEntity(t);
                                        accepted = VerifyClientEntity(client, TRUE, FALSE);
                                        // Check to see if the player is a valid target
                                        client = GetFilteredEntity(t);
                                        accepted = VerifyClientEntity(client, TRUE, FALSE);
-                                       
-                                       if(accepted <= 0) 
+
+                                       if(accepted <= 0)
                                        {
                                        {
-                                               print("adminmsg: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n")); 
+                                               print("adminmsg: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
                                                continue;
                                        }
                                                continue;
                                        }
-                                       
+
                                        // send the centerprint/console print or infomessage
                                        if(infobartime)
                                        {
                                        // send the centerprint/console print or infomessage
                                        if(infobartime)
                                        {
@@ -109,21 +109,21 @@ void GameCommand_adminmsg(float request, float argc)
                                                centerprint(client, strcat("^3", admin_name(), ":\n^7", admin_message));
                                                sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: ", admin_message, "\n"));
                                        }
                                                centerprint(client, strcat("^3", admin_name(), ":\n^7", admin_message));
                                                sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: ", admin_message, "\n"));
                                        }
-                                       
+
                                        successful = strcat(successful, (successful ? ", " : ""), client.netname);
                                        dprint("Message sent to ", client.netname, "\n");
                                        continue;
                                }
                                        successful = strcat(successful, (successful ? ", " : ""), client.netname);
                                        dprint("Message sent to ", client.netname, "\n");
                                        continue;
                                }
-                               
+
                                if(successful)
                                        bprint("Successfully sent message '", admin_message, "' to ", successful, ".\n");
                                else
                                        print("No players given (", original_targets, ") could receive the message.\n");
                                if(successful)
                                        bprint("Successfully sent message '", admin_message, "' to ", successful, ".\n");
                                else
                                        print("No players given (", original_targets, ") could receive the message.\n");
-                                       
+
                                return;
                        }
                }
                                return;
                        }
                }
-               
+
                default:
                        print("Incorrect parameters for ^2adminmsg^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2adminmsg^7\n");
                case CMD_REQUEST_USAGE:
@@ -148,7 +148,7 @@ void GameCommand_allready(float request)
                        ReadyRestart();
                        return;
                }
                        ReadyRestart();
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -160,7 +160,7 @@ void GameCommand_allready(float request)
 }
 
 void GameCommand_allspec(float request, float argc)
 }
 
 void GameCommand_allspec(float request, float argc)
-{      
+{
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
@@ -168,7 +168,7 @@ void GameCommand_allspec(float request, float argc)
                        entity client;
                        string reason = argv(1);
                        float i = 0;
                        entity client;
                        string reason = argv(1);
                        float i = 0;
-                       
+
                        FOR_EACH_REALPLAYER(client)
                        {
                                self = client;
                        FOR_EACH_REALPLAYER(client)
                        {
                                self = client;
@@ -179,7 +179,7 @@ void GameCommand_allspec(float request, float argc)
                        else { print("No players found to spectate.\n"); }
                        return;
                }
                        else { print("No players found to spectate.\n"); }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -191,7 +191,7 @@ void GameCommand_allspec(float request, float argc)
        }
 }
 
        }
 }
 
-void GameCommand_anticheat(float request, float argc) 
+void GameCommand_anticheat(float request, float argc)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -199,8 +199,8 @@ void GameCommand_anticheat(float request, float argc)
                {
                        entity client = GetIndexedEntity(argc, 1);
                        float accepted = VerifyClientEntity(client, FALSE, FALSE);
                {
                        entity client = GetIndexedEntity(argc, 1);
                        float accepted = VerifyClientEntity(client, FALSE, FALSE);
-                       
-                       if(accepted > 0) 
+
+                       if(accepted > 0)
                        {
                                self = client;
                                anticheat_report();
                        {
                                self = client;
                                anticheat_report();
@@ -208,10 +208,10 @@ void GameCommand_anticheat(float request, float argc)
                        }
                        else
                        {
                        }
                        else
                        {
-                               print("anticheat: ", GetClientErrorString(accepted, argv(1)), ".\n"); 
+                               print("anticheat: ", GetClientErrorString(accepted, argv(1)), ".\n");
                        }
                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2anticheat^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2anticheat^7\n");
                case CMD_REQUEST_USAGE:
@@ -223,7 +223,7 @@ void GameCommand_anticheat(float request, float argc)
        }
 }
 
        }
 }
 
-void GameCommand_bbox(float request) 
+void GameCommand_bbox(float request)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -300,11 +300,11 @@ void GameCommand_bbox(float request)
                                print(" ", ftos(world.absmax_z));
                        else
                                print(" ", ftos(trace_endpos_z));
                                print(" ", ftos(world.absmax_z));
                        else
                                print(" ", ftos(trace_endpos_z));
-                               
+
                        print("\n");
                        return;
                }
                        print("\n");
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -323,7 +323,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                case CMD_REQUEST_COMMAND:
                {
                        entity bot;
                case CMD_REQUEST_COMMAND:
                {
                        entity bot;
-                       
+
                        if(argv(1) == "reset")
                        {
                                bot_resetqueues();
                        if(argv(1) == "reset")
                        {
                                bot_resetqueues();
@@ -414,7 +414,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
                                        print(strcat("Error: Can't find bot with the name or id '", argv(1),"' - Did you mistype the command?\n")); // don't return so that usage is shown
                        }
                }
                                        print(strcat("Error: Can't find bot with the name or id '", argv(1),"' - Did you mistype the command?\n")); // don't return so that usage is shown
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2bot_cmd^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2bot_cmd^7\n");
                case CMD_REQUEST_USAGE:
@@ -439,13 +439,13 @@ void GameCommand_cointoss(float request, float argc)
                        string result1 = (argv(2) ? strcat("^7", argv(1), "^3!\n") : "^1HEADS^3!\n");
                        string result2 = (argv(2) ? strcat("^7", argv(2), "^3!\n") : "^4TAILS^3!\n");
                        string choice = ((random() > 0.5) ? result1 : result2);
                        string result1 = (argv(2) ? strcat("^7", argv(1), "^3!\n") : "^1HEADS^3!\n");
                        string result2 = (argv(2) ? strcat("^7", argv(2), "^3!\n") : "^4TAILS^3!\n");
                        string choice = ((random() > 0.5) ? result1 : result2);
-                       
+
                        FOR_EACH_CLIENT(client)
                                centerprint(client, strcat("^3Throwing coin... Result: ", choice));
                        bprint(strcat("^3Throwing coin... Result: ", choice));
                        return;
                }
                        FOR_EACH_CLIENT(client)
                                centerprint(client, strcat("^3Throwing coin... Result: ", choice));
                        bprint(strcat("^3Throwing coin... Result: ", choice));
                        return;
                }
-               
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -456,7 +456,7 @@ void GameCommand_cointoss(float request, float argc)
        }
 }
 
        }
 }
 
-void GameCommand_database(float request, float argc) 
+void GameCommand_database(float request, float argc)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -485,7 +485,7 @@ void GameCommand_database(float request, float argc)
                                }
                        }
                }
                                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2database^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2database^7\n");
                case CMD_REQUEST_USAGE:
@@ -500,30 +500,30 @@ void GameCommand_database(float request, float argc)
 }
 
 void GameCommand_defer_clear(float request, float argc)
 }
 
 void GameCommand_defer_clear(float request, float argc)
-{      
+{
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
                {
                        entity client;
                        float accepted;
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
                {
                        entity client;
                        float accepted;
-                       
+
                        if(argc >= 2)
                        {
                                client = GetIndexedEntity(argc, 1);
                                accepted = VerifyClientEntity(client, TRUE, FALSE);
                        if(argc >= 2)
                        {
                                client = GetIndexedEntity(argc, 1);
                                accepted = VerifyClientEntity(client, TRUE, FALSE);
-                               
+
                                if(accepted > 0)
                                {
                                        stuffcmd(client, "defer clear\n");
                                        print("defer clear stuffed to ", client.netname, "\n");
                                }
                                else { print("defer_clear: ", GetClientErrorString(accepted, argv(1)), ".\n"); }
                                if(accepted > 0)
                                {
                                        stuffcmd(client, "defer clear\n");
                                        print("defer clear stuffed to ", client.netname, "\n");
                                }
                                else { print("defer_clear: ", GetClientErrorString(accepted, argv(1)), ".\n"); }
-                               
+
                                return;
                        }
                }
                                return;
                        }
                }
-               
+
                default:
                        print("Incorrect parameters for ^2defer_clear^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2defer_clear^7\n");
                case CMD_REQUEST_USAGE:
@@ -537,7 +537,7 @@ void GameCommand_defer_clear(float request, float argc)
 }
 
 void GameCommand_defer_clear_all(float request)
 }
 
 void GameCommand_defer_clear_all(float request)
-{      
+{
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
@@ -545,17 +545,17 @@ void GameCommand_defer_clear_all(float request)
                        entity client;
                        float i = 0;
                        float argc;
                        entity client;
                        float i = 0;
                        float argc;
-                       
+
                        FOR_EACH_CLIENT(client)
                        {
                                argc = tokenize_console(strcat("defer_clear ", ftos(num_for_edict(client))));
                        FOR_EACH_CLIENT(client)
                        {
                                argc = tokenize_console(strcat("defer_clear ", ftos(num_for_edict(client))));
-                               GameCommand_defer_clear(CMD_REQUEST_COMMAND, argc);     
+                               GameCommand_defer_clear(CMD_REQUEST_COMMAND, argc);
                                ++i;
                        }
                                ++i;
                        }
-                       if(i) { print(strcat("Successfully stuffed defer clear to all clients (", ftos(i), ")\n")); } // should a message be added if no players were found? 
+                       if(i) { print(strcat("Successfully stuffed defer clear to all clients (", ftos(i), ")\n")); } // should a message be added if no players were found?
                        return;
                }
                        return;
                }
-               
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -581,8 +581,8 @@ void GameCommand_delrec(float request, float argc)  // perhaps merge later with
                                        race_deleteTime(GetMapname(), stof(argv(1)));
                                return;
                        }
                                        race_deleteTime(GetMapname(), stof(argv(1)));
                                return;
                        }
-               }       
-               
+               }
+
                default:
                        print("Incorrect parameters for ^2delrec^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2delrec^7\n");
                case CMD_REQUEST_USAGE:
@@ -596,7 +596,7 @@ void GameCommand_delrec(float request, float argc)  // perhaps merge later with
        }
 }
 
        }
 }
 
-void GameCommand_effectindexdump(float request) 
+void GameCommand_effectindexdump(float request)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -604,7 +604,7 @@ void GameCommand_effectindexdump(float request)
                {
                        float fh, d;
                        string s;
                {
                        float fh, d;
                        string s;
-                       
+
                        d = db_create();
                        print("begin of effects list\n");
                        db_put(d, "TE_GUNSHOT", "1"); print("effect TE_GUNSHOT is ", ftos(particleeffectnum("TE_GUNSHOT")), "\n");
                        d = db_create();
                        print("begin of effects list\n");
                        db_put(d, "TE_GUNSHOT", "1"); print("effect TE_GUNSHOT is ", ftos(particleeffectnum("TE_GUNSHOT")), "\n");
@@ -663,7 +663,7 @@ void GameCommand_effectindexdump(float request)
                        db_close(d);
                        return;
                }
                        db_close(d);
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -674,7 +674,7 @@ void GameCommand_effectindexdump(float request)
        }
 }
 
        }
 }
 
-void GameCommand_extendmatchtime(float request) 
+void GameCommand_extendmatchtime(float request)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -683,7 +683,7 @@ void GameCommand_extendmatchtime(float request)
                        changematchtime(autocvar_timelimit_increment * 60, autocvar_timelimit_min * 60, autocvar_timelimit_max * 60);
                        return;
                }
                        changematchtime(autocvar_timelimit_increment * 60, autocvar_timelimit_min * 60, autocvar_timelimit_max * 60);
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -696,19 +696,19 @@ void GameCommand_extendmatchtime(float request)
 }
 
 void GameCommand_find(float request, float argc)  // is this even needed? We have prvm_edicts command and such ANYWAY
 }
 
 void GameCommand_find(float request, float argc)  // is this even needed? We have prvm_edicts command and such ANYWAY
-{      
+{
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
                {
                        entity client;
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
                {
                        entity client;
-                       
+
                        for(client = world; (client = find(client, classname, argv(1))); )
                                print(etos(client), "\n");
                        for(client = world; (client = find(client, classname, argv(1))); )
                                print(etos(client), "\n");
-                               
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2find^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2find^7\n");
                case CMD_REQUEST_USAGE:
@@ -720,8 +720,8 @@ void GameCommand_find(float request, float argc)  // is this even needed? We hav
        }
 }
 
        }
 }
 
-void GameCommand_gametype(float request, float argc) 
-{      
+void GameCommand_gametype(float request, float argc)
+{
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
@@ -730,7 +730,7 @@ void GameCommand_gametype(float request, float argc)
                        {
                                string s = argv(1);
                                float t = MapInfo_Type_FromString(s), tsave = MapInfo_CurrentGametype();
                        {
                                string s = argv(1);
                                float t = MapInfo_Type_FromString(s), tsave = MapInfo_CurrentGametype();
-                               
+
                                if(t)
                                {
                                        MapInfo_SwitchGameType(t);
                                if(t)
                                {
                                        MapInfo_SwitchGameType(t);
@@ -751,11 +751,11 @@ void GameCommand_gametype(float request, float argc)
                                }
                                else
                                        bprint("Game type switch to ", s, " failed: this type does not exist!\n");
                                }
                                else
                                        bprint("Game type switch to ", s, " failed: this type does not exist!\n");
-                                       
+
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2gametype^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2gametype^7\n");
                case CMD_REQUEST_USAGE:
@@ -768,8 +768,8 @@ void GameCommand_gametype(float request, float argc)
        }
 }
 
        }
 }
 
-void GameCommand_gettaginfo(float request, float argc) 
-{      
+void GameCommand_gettaginfo(float request, float argc)
+{
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
@@ -777,7 +777,7 @@ void GameCommand_gettaginfo(float request, float argc)
                        entity tmp_entity;
                        float i;
                        vector v;
                        entity tmp_entity;
                        float i;
                        vector v;
-                       
+
                        if(argc >= 4)
                        {
                                tmp_entity = spawn();
                        if(argc >= 4)
                        {
                                tmp_entity = spawn();
@@ -811,12 +811,12 @@ void GameCommand_gettaginfo(float request, float argc)
                                }
                                else
                                        print("bone not found\n");
                                }
                                else
                                        print("bone not found\n");
-                                       
+
                                remove(tmp_entity);
                                return;
                        }
                }
                                remove(tmp_entity);
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2gettaginfo^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2gettaginfo^7\n");
                case CMD_REQUEST_USAGE:
@@ -828,7 +828,7 @@ void GameCommand_gettaginfo(float request, float argc)
        }
 }
 
        }
 }
 
-void GameCommand_animbench(float request, float argc) 
+void GameCommand_animbench(float request, float argc)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -896,7 +896,7 @@ void GameCommand_gotomap(float request, float argc)
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2gotomap^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2gotomap^7\n");
                case CMD_REQUEST_USAGE:
@@ -926,7 +926,7 @@ void GameCommand_lockteams(float request)
                        }
                        return;
                }
                        }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -938,14 +938,14 @@ void GameCommand_lockteams(float request)
        }
 }
 
        }
 }
 
-void GameCommand_make_mapinfo(float request) 
+void GameCommand_make_mapinfo(float request)
 {
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
 {
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
-               { 
+               {
                        entity tmp_entity;
                        entity tmp_entity;
-                       
+
                        tmp_entity = spawn();
                        tmp_entity.classname = "make_mapinfo";
                        tmp_entity.think = make_mapinfo_Think;
                        tmp_entity = spawn();
                        tmp_entity.classname = "make_mapinfo";
                        tmp_entity.think = make_mapinfo_Think;
@@ -953,7 +953,7 @@ void GameCommand_make_mapinfo(float request)
                        MapInfo_Enumerate();
                        return;
                }
                        MapInfo_Enumerate();
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -973,17 +973,17 @@ void GameCommand_moveplayer(float request, float argc)
                {
                        float accepted;
                        entity client;
                {
                        float accepted;
                        entity client;
-       
+
                        string targets = strreplace(",", " ", argv(1));
                        string original_targets = strreplace(" ", ", ", targets);
                        string destination = argv(2);
                        string targets = strreplace(",", " ", argv(1));
                        string original_targets = strreplace(" ", ", ", targets);
                        string destination = argv(2);
-                       
+
                        string successful, t;
                        successful = string_null;
                        string successful, t;
                        successful = string_null;
-                       
+
                        // lets see if the target(s) even actually exist.
                        if((targets) && (destination))
                        // lets see if the target(s) even actually exist.
                        if((targets) && (destination))
-                       { 
+                       {
                                for(;targets;)
                                {
                                        t = car(targets); targets = cdr(targets);
                                for(;targets;)
                                {
                                        t = car(targets); targets = cdr(targets);
@@ -991,21 +991,21 @@ void GameCommand_moveplayer(float request, float argc)
                                        // Check to see if the player is a valid target
                                        client = GetFilteredEntity(t);
                                        accepted = VerifyClientEntity(client, FALSE, FALSE);
                                        // Check to see if the player is a valid target
                                        client = GetFilteredEntity(t);
                                        accepted = VerifyClientEntity(client, FALSE, FALSE);
-                                       
-                                       if(accepted <= 0) 
+
+                                       if(accepted <= 0)
                                        {
                                        {
-                                               print("moveplayer: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n")); 
+                                               print("moveplayer: ", GetClientErrorString(accepted, t), (targets ? ", skipping to next player.\n" : ".\n"));
                                                continue;
                                        }
                                                continue;
                                        }
-                                       
+
                                        // Where are we putting this player?
                                        // Where are we putting this player?
-                                       if(destination == "spec" || destination == "spectator") 
+                                       if(destination == "spec" || destination == "spectator")
                                        {
                                                if(!IS_SPEC(client) && !IS_OBSERVER(client))
                                                {
                                                        self = client;
                                                        PutObserverInServer();
                                        {
                                                if(!IS_SPEC(client) && !IS_OBSERVER(client))
                                                {
                                                        self = client;
                                                        PutObserverInServer();
-                                                       
+
                                                        successful = strcat(successful, (successful ? ", " : ""), client.netname);
                                                }
                                                else
                                                        successful = strcat(successful, (successful ? ", " : ""), client.netname);
                                                }
                                                else
@@ -1032,7 +1032,7 @@ void GameCommand_moveplayer(float request, float argc)
                                                                        // keep the forcing undone
                                                                        print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7.\n"));
                                                                        continue;
                                                                        // keep the forcing undone
                                                                        print("Player ", ftos(GetFilteredNumber(t)), " (", client.netname, ") is already on the ", Team_ColoredFullName(client.team), (targets ? "^7, skipping to next player.\n" : "^7.\n"));
                                                                        continue;
-                                                               } 
+                                                               }
                                                                else if(team_id == 0)  // auto team
                                                                {
                                                                        team_id = Team_NumberToTeam(FindSmallestTeam(client, FALSE));
                                                                else if(team_id == 0)  // auto team
                                                                {
                                                                        team_id = Team_NumberToTeam(FindSmallestTeam(client, FALSE));
@@ -1042,18 +1042,18 @@ void GameCommand_moveplayer(float request, float argc)
                                                                        CheckAllowedTeams(client);
                                                                }
                                                                client.team_forced = save;
                                                                        CheckAllowedTeams(client);
                                                                }
                                                                client.team_forced = save;
-                                                               
+
                                                                // Check to see if the destination team is even available
                                                                // Check to see if the destination team is even available
-                                                               switch(team_id) 
+                                                               switch(team_id)
                                                                {
                                                                        case NUM_TEAM_1: if(c1 == -1) { print("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break;
                                                                        case NUM_TEAM_2: if(c2 == -1) { print("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break;
                                                                        case NUM_TEAM_3: if(c3 == -1) { print("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break;
                                                                        case NUM_TEAM_4: if(c4 == -1) { print("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break;
                                                                {
                                                                        case NUM_TEAM_1: if(c1 == -1) { print("Sorry, can't move player to red team if it doesn't exist.\n"); return; } break;
                                                                        case NUM_TEAM_2: if(c2 == -1) { print("Sorry, can't move player to blue team if it doesn't exist.\n"); return; } break;
                                                                        case NUM_TEAM_3: if(c3 == -1) { print("Sorry, can't move player to yellow team if it doesn't exist.\n"); return; } break;
                                                                        case NUM_TEAM_4: if(c4 == -1) { print("Sorry, can't move player to pink team if it doesn't exist.\n"); return; } break;
-                                                                       
+
                                                                        default: print("Sorry, can't move player here if team ", destination, " doesn't exist.\n"); return;
                                                                }
                                                                        default: print("Sorry, can't move player here if team ", destination, " doesn't exist.\n"); return;
                                                                }
-                                                               
+
                                                                // If so, lets continue and finally move the player
                                                                client.team_forced = 0;
                                                                MoveToTeam(client, team_id, 6);
                                                                // If so, lets continue and finally move the player
                                                                client.team_forced = 0;
                                                                MoveToTeam(client, team_id, 6);
@@ -1069,21 +1069,21 @@ void GameCommand_moveplayer(float request, float argc)
                                                }
                                                else
                                                {
                                                }
                                                else
                                                {
-                                                       print("Can't change teams if the player isn't in the game.\n"); // well technically we could, but should we allow that? :P 
+                                                       print("Can't change teams if the player isn't in the game.\n"); // well technically we could, but should we allow that? :P
                                                        return;
                                                }
                                        }
                                }
                                                        return;
                                                }
                                        }
                                }
-                               
+
                                if(successful)
                                        bprint("Successfully moved players ", successful, " to destination ", destination, ".\n");
                                else
                                        print("No players given (", original_targets, ") are able to move.\n");
                                if(successful)
                                        bprint("Successfully moved players ", successful, " to destination ", destination, ".\n");
                                else
                                        print("No players given (", original_targets, ") are able to move.\n");
-                                       
+
                                return; // still correct parameters so return to avoid usage print
                        }
                }
                                return; // still correct parameters so return to avoid usage print
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2moveplayer^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2moveplayer^7\n");
                case CMD_REQUEST_USAGE:
@@ -1100,7 +1100,7 @@ void GameCommand_moveplayer(float request, float argc)
        }
 }
 
        }
 }
 
-void GameCommand_nospectators(float request) 
+void GameCommand_nospectators(float request)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -1119,7 +1119,7 @@ void GameCommand_nospectators(float request)
                        bprint(strcat("^7All spectators will be automatically kicked when not joining the game after ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds!\n"));
                        return;
                }
                        bprint(strcat("^7All spectators will be automatically kicked when not joining the game after ", ftos(autocvar_g_maxplayers_spectator_blocktime), " seconds!\n"));
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1131,7 +1131,7 @@ void GameCommand_nospectators(float request)
 }
 
 void GameCommand_playerdemo(float request, float argc)
 }
 
 void GameCommand_playerdemo(float request, float argc)
-{      
+{
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
@@ -1140,58 +1140,58 @@ void GameCommand_playerdemo(float request, float argc)
                        {
                                entity client;
                                float i, n, accepted;
                        {
                                entity client;
                                float i, n, accepted;
-                               
+
                                switch(argv(1))
                                {
                                        case "read":
                                        {
                                                client = GetIndexedEntity(argc, 2);
                                                accepted = VerifyClientEntity(client, FALSE, TRUE);
                                switch(argv(1))
                                {
                                        case "read":
                                        {
                                                client = GetIndexedEntity(argc, 2);
                                                accepted = VerifyClientEntity(client, FALSE, TRUE);
-                                               
-                                               if(accepted <= 0) 
+
+                                               if(accepted <= 0)
                                                {
                                                {
-                                                       print("playerdemo: read: ", GetClientErrorString(accepted, argv(2)), ".\n"); 
+                                                       print("playerdemo: read: ", GetClientErrorString(accepted, argv(2)), ".\n");
                                                        return;
                                                }
                                                        return;
                                                }
-                                               
+
                                                self = client;
                                                playerdemo_open_read(argv(next_token));
                                                return;
                                        }
                                                self = client;
                                                playerdemo_open_read(argv(next_token));
                                                return;
                                        }
-                                       
+
                                        case "write":
                                        {
                                                client = GetIndexedEntity(argc, 2);
                                                accepted = VerifyClientEntity(client, FALSE, FALSE);
                                        case "write":
                                        {
                                                client = GetIndexedEntity(argc, 2);
                                                accepted = VerifyClientEntity(client, FALSE, FALSE);
-                                               
-                                               if(accepted <= 0) 
+
+                                               if(accepted <= 0)
                                                {
                                                {
-                                                       print("playerdemo: write: ", GetClientErrorString(accepted, argv(2)), ".\n"); 
+                                                       print("playerdemo: write: ", GetClientErrorString(accepted, argv(2)), ".\n");
                                                        return;
                                                }
                                                        return;
                                                }
-                                               
+
                                                self = client;
                                                playerdemo_open_write(argv(next_token));
                                                return;
                                        }
                                                self = client;
                                                playerdemo_open_write(argv(next_token));
                                                return;
                                        }
-                                       
+
                                        case "auto_read_and_write":
                                        {
                                                n = GetFilteredNumber(argv(3));
                                                cvar_set("bot_number", ftos(n));
                                        case "auto_read_and_write":
                                        {
                                                n = GetFilteredNumber(argv(3));
                                                cvar_set("bot_number", ftos(n));
-                                               
+
                                                localcmd("wait; wait; wait\n");
                                                for(i = 0; i < n; ++i) { localcmd("sv_cmd playerdemo read ", ftos(i+2), " ", argv(2), ftos(i+1), "\n"); }
                                                localcmd("wait; wait; wait\n");
                                                for(i = 0; i < n; ++i) { localcmd("sv_cmd playerdemo read ", ftos(i+2), " ", argv(2), ftos(i+1), "\n"); }
-                                               
+
                                                localcmd("sv_cmd playerdemo write 1 ", ftos(n+1), "\n");
                                                return;
                                        }
                                                localcmd("sv_cmd playerdemo write 1 ", ftos(n+1), "\n");
                                                return;
                                        }
-                                       
+
                                        case "auto_read":
                                        {
                                                n = GetFilteredNumber(argv(3));
                                                cvar_set("bot_number", ftos(n));
                                        case "auto_read":
                                        {
                                                n = GetFilteredNumber(argv(3));
                                                cvar_set("bot_number", ftos(n));
-                                               
+
                                                localcmd("wait; wait; wait\n");
                                                for(i = 0; i < n; ++i) { localcmd("sv_cmd playerdemo read ", ftos(i+2), " ", argv(2), ftos(i+1), "\n"); }
                                                return;
                                                localcmd("wait; wait; wait\n");
                                                for(i = 0; i < n; ++i) { localcmd("sv_cmd playerdemo read ", ftos(i+2), " ", argv(2), ftos(i+1), "\n"); }
                                                return;
@@ -1199,7 +1199,7 @@ void GameCommand_playerdemo(float request, float argc)
                                }
                        }
                }
                                }
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2playerdemo^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2playerdemo^7\n");
                case CMD_REQUEST_USAGE:
@@ -1211,7 +1211,7 @@ void GameCommand_playerdemo(float request, float argc)
        }
 }
 
        }
 }
 
-void GameCommand_printstats(float request) 
+void GameCommand_printstats(float request)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -1221,7 +1221,7 @@ void GameCommand_printstats(float request)
                        print("stats dumped.\n");
                        return;
                }
                        print("stats dumped.\n");
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1241,7 +1241,7 @@ void GameCommand_radarmap(float request, float argc)
                        if(RadarMap_Make(argc))
                                return;
                }
                        if(RadarMap_Make(argc))
                                return;
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2radarmap^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2radarmap^7\n");
                case CMD_REQUEST_USAGE:
@@ -1255,7 +1255,7 @@ void GameCommand_radarmap(float request, float argc)
        }
 }
 
        }
 }
 
-void GameCommand_reducematchtime(float request) 
+void GameCommand_reducematchtime(float request)
 {
        switch(request)
        {
 {
        switch(request)
        {
@@ -1264,7 +1264,7 @@ void GameCommand_reducematchtime(float request)
                        changematchtime(autocvar_timelimit_decrement *-60, autocvar_timelimit_min * 60, autocvar_timelimit_max * 60);
                        return;
                }
                        changematchtime(autocvar_timelimit_decrement *-60, autocvar_timelimit_min * 60, autocvar_timelimit_max * 60);
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1290,7 +1290,7 @@ void GameCommand_setbots(float request, float argc)
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2setbots^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2setbots^7\n");
                case CMD_REQUEST_USAGE:
@@ -1320,22 +1320,22 @@ void GameCommand_shuffleteams(float request)
                                FOR_EACH_PLAYER(tmp_player)
                                {
                                        CheckAllowedTeams(tmp_player);
                                FOR_EACH_PLAYER(tmp_player)
                                {
                                        CheckAllowedTeams(tmp_player);
-                                       
+
                                        if(c1 >= 0) t_teams = max(1, t_teams);
                                        if(c2 >= 0) t_teams = max(2, t_teams);
                                        if(c3 >= 0) t_teams = max(3, t_teams);
                                        if(c4 >= 0) t_teams = max(4, t_teams);
                                        if(c1 >= 0) t_teams = max(1, t_teams);
                                        if(c2 >= 0) t_teams = max(2, t_teams);
                                        if(c3 >= 0) t_teams = max(3, t_teams);
                                        if(c4 >= 0) t_teams = max(4, t_teams);
-                                       
+
                                        ++t_players;
                                }
                                        ++t_players;
                                }
-                               
+
                                // build a list of the players in a random order
                                FOR_EACH_PLAYER(tmp_player)
                                {
                                        for(;;)
                                        {
                                                i = bound(1, floor(random() * maxclients) + 1, maxclients);
                                // build a list of the players in a random order
                                FOR_EACH_PLAYER(tmp_player)
                                {
                                        for(;;)
                                        {
                                                i = bound(1, floor(random() * maxclients) + 1, maxclients);
-                                               
+
                                                if(shuffleteams_players[i])
                                                {
                                                        continue; // a player is already assigned to this slot
                                                if(shuffleteams_players[i])
                                                {
                                                        continue; // a player is already assigned to this slot
@@ -1348,27 +1348,27 @@ void GameCommand_shuffleteams(float request)
                                        }
                                }
 
                                        }
                                }
 
-                               // finally, from the list made earlier, re-join the players in different order. 
+                               // finally, from the list made earlier, re-join the players in different order.
                                for(i = 1; i <= t_teams; ++i)
                                {
                                        // find out how many players to assign to this team
                                        x = (t_players / t_teams);
                                        x = ((i == 1) ? ceil(x) : floor(x));
                                for(i = 1; i <= t_teams; ++i)
                                {
                                        // find out how many players to assign to this team
                                        x = (t_players / t_teams);
                                        x = ((i == 1) ? ceil(x) : floor(x));
-                                       
+
                                        team_color = Team_NumberToTeam(i);
                                        team_color = Team_NumberToTeam(i);
-                                       
-                                       // sort through the random list of players made earlier 
+
+                                       // sort through the random list of players made earlier
                                        for(z = 1; z <= maxclients; ++z)
                                        for(z = 1; z <= maxclients; ++z)
-                                       {                                                       
+                                       {
                                                if (!(shuffleteams_teams[i] >= x))
                                                {
                                                        if (!(shuffleteams_players[z]))
                                                                continue; // not a player, move on to next random slot
                                                if (!(shuffleteams_teams[i] >= x))
                                                {
                                                        if (!(shuffleteams_players[z]))
                                                                continue; // not a player, move on to next random slot
-                                                               
+
                                                        if(VerifyClientNumber(shuffleteams_players[z]))
                                                                self = edict_num(shuffleteams_players[z]);
 
                                                        if(VerifyClientNumber(shuffleteams_players[z]))
                                                                self = edict_num(shuffleteams_players[z]);
 
-                                                       if(self.team != team_color) 
+                                                       if(self.team != team_color)
                                                                MoveToTeam(self, team_color, 6);
 
                                                        shuffleteams_players[z] = 0;
                                                                MoveToTeam(self, team_color, 6);
 
                                                        shuffleteams_players[z] = 0;
@@ -1380,13 +1380,13 @@ void GameCommand_shuffleteams(float request)
                                                }
                                        }
                                }
                                                }
                                        }
                                }
-                               
+
                                bprint("Successfully shuffled the players around randomly.\n");
                                bprint("Successfully shuffled the players around randomly.\n");
-                               
+
                                // clear the buffers now
                                for (i=0; i<SHUFFLETEAMS_MAX_PLAYERS; ++i)
                                        shuffleteams_players[i] = 0;
                                // clear the buffers now
                                for (i=0; i<SHUFFLETEAMS_MAX_PLAYERS; ++i)
                                        shuffleteams_players[i] = 0;
-                               
+
                                for (i=0; i<SHUFFLETEAMS_MAX_TEAMS; ++i)
                                        shuffleteams_teams[i] = 0;
                        }
                                for (i=0; i<SHUFFLETEAMS_MAX_TEAMS; ++i)
                                        shuffleteams_teams[i] = 0;
                        }
@@ -1394,10 +1394,10 @@ void GameCommand_shuffleteams(float request)
                        {
                                print("Can't shuffle teams when currently not playing a team game.\n");
                        }
                        {
                                print("Can't shuffle teams when currently not playing a team game.\n");
                        }
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1425,19 +1425,19 @@ void GameCommand_stuffto(float request, float argc)
                        {
                                entity client = GetIndexedEntity(argc, 1);
                                float accepted = VerifyClientEntity(client, TRUE, FALSE);
                        {
                                entity client = GetIndexedEntity(argc, 1);
                                float accepted = VerifyClientEntity(client, TRUE, FALSE);
-                               
+
                                if(accepted > 0)
                                {
                                        stuffcmd(client, strcat("\n", argv(next_token), "\n"));
                                        print(strcat("Command: \"", argv(next_token), "\" sent to ", GetCallerName(client), " (", argv(1) ,").\n"));
                                }
                                else
                                if(accepted > 0)
                                {
                                        stuffcmd(client, strcat("\n", argv(next_token), "\n"));
                                        print(strcat("Command: \"", argv(next_token), "\" sent to ", GetCallerName(client), " (", argv(1) ,").\n"));
                                }
                                else
-                                       print("stuffto: ", GetClientErrorString(accepted, argv(1)), ".\n"); 
-                               
+                                       print("stuffto: ", GetClientErrorString(accepted, argv(1)), ".\n");
+
                                return;
                        }
                }
                                return;
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2stuffto^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2stuffto^7\n");
                case CMD_REQUEST_USAGE:
@@ -1466,7 +1466,7 @@ void GameCommand_trace(float request, float argc)
                        entity e;
                        vector org, delta, start, end, p, q, q0, pos, vv, dv;
                        float i, f, safe, unsafe, dq, dqf;
                        entity e;
                        vector org, delta, start, end, p, q, q0, pos, vv, dv;
                        float i, f, safe, unsafe, dq, dqf;
-       
+
                        switch(argv(1))
                        {
                                case "debug":
                        switch(argv(1))
                        {
                                case "debug":
@@ -1559,7 +1559,7 @@ void GameCommand_trace(float request, float argc)
                                        }
                                        return;
                                }
                                        }
                                        return;
                                }
-                                       
+
                                case "debug2":
                                {
                                        e = nextent(world);
                                case "debug2":
                                {
                                        e = nextent(world);
@@ -1590,7 +1590,7 @@ void GameCommand_trace(float request, float argc)
                                        print("highest possible dist: ", ftos(f), "\n");
                                        return;
                                }
                                        print("highest possible dist: ", ftos(f), "\n");
                                        return;
                                }
-                               
+
                                case "walk":
                                {
                                        if(argc == 4)
                                case "walk":
                                {
                                        if(argc == 4)
@@ -1603,7 +1603,7 @@ void GameCommand_trace(float request, float argc)
                                                return;
                                        }
                                }
                                                return;
                                        }
                                }
-                               
+
                                case "showline":
                                {
                                        if(argc == 4)
                                case "showline":
                                {
                                        if(argc == 4)
@@ -1616,11 +1616,11 @@ void GameCommand_trace(float request, float argc)
                                                return;
                                        }
                                }
                                                return;
                                        }
                                }
-                               
+
                                // no default case, just go straight to invalid
                        }
                }
                                // no default case, just go straight to invalid
                        }
                }
-                       
+
                default:
                        print("Incorrect parameters for ^2trace^7\n");
                case CMD_REQUEST_USAGE:
                default:
                        print("Incorrect parameters for ^2trace^7\n");
                case CMD_REQUEST_USAGE:
@@ -1650,7 +1650,7 @@ void GameCommand_unlockteams(float request)
                        }
                        return;
                }
                        }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1674,7 +1674,7 @@ void GameCommand_warp(float request, float argc)
                                {
                                        CampaignLevelWarp(stof(argv(1)));
                                        print("Successfully warped to campaign level ", stof(argv(1)), ".\n");
                                {
                                        CampaignLevelWarp(stof(argv(1)));
                                        print("Successfully warped to campaign level ", stof(argv(1)), ".\n");
-                               }       
+                               }
                                else
                                {
                                        CampaignLevelWarp(-1);
                                else
                                {
                                        CampaignLevelWarp(-1);
@@ -1685,7 +1685,7 @@ void GameCommand_warp(float request, float argc)
                                print("Not in campaign, can't level warp\n");
                        return;
                }
                                print("Not in campaign, can't level warp\n");
                        return;
                }
-               
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1705,10 +1705,10 @@ void GameCommand_(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
        {
                case CMD_REQUEST_COMMAND:
                {
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1765,10 +1765,10 @@ void GameCommand_macro_help()
 {
        #define SERVER_COMMAND(name,function,description) \
                { print("  ^2", name, "^7: ", description, "\n"); }
 {
        #define SERVER_COMMAND(name,function,description) \
                { print("  ^2", name, "^7: ", description, "\n"); }
-               
+
        SERVER_COMMANDS(0, 0, "")
        #undef SERVER_COMMAND
        SERVER_COMMANDS(0, 0, "")
        #undef SERVER_COMMAND
-       
+
        return;
 }
 
        return;
 }
 
@@ -1776,10 +1776,10 @@ float GameCommand_macro_command(float argc, string command)
 {
        #define SERVER_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
 {
        #define SERVER_COMMAND(name,function,description) \
                { if(name == strtolower(argv(0))) { function; return TRUE; } }
-               
+
        SERVER_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef SERVER_COMMAND
        SERVER_COMMANDS(CMD_REQUEST_COMMAND, argc, command)
        #undef SERVER_COMMAND
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -1787,10 +1787,10 @@ float GameCommand_macro_usage(float argc)
 {
        #define SERVER_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
 {
        #define SERVER_COMMAND(name,function,description) \
                { if(name == strtolower(argv(1))) { function; return TRUE; } }
-               
+
        SERVER_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef SERVER_COMMAND
        SERVER_COMMANDS(CMD_REQUEST_USAGE, argc, "")
        #undef SERVER_COMMAND
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -1798,13 +1798,13 @@ void GameCommand_macro_write_aliases(float fh)
 {
        #define SERVER_COMMAND(name,function,description) \
                { CMD_Write_Alias("qc_cmd_sv", name, description); }
 {
        #define SERVER_COMMAND(name,function,description) \
                { CMD_Write_Alias("qc_cmd_sv", name, description); }
-               
+
        SERVER_COMMANDS(0, 0, "")
        #undef SERVER_COMMAND
        SERVER_COMMANDS(0, 0, "")
        #undef SERVER_COMMAND
-       
+
        return;
 }
        return;
 }
-       
+
 
 // =========================================
 //  Main Function Called By Engine (sv_cmd)
 
 // =========================================
 //  Main Function Called By Engine (sv_cmd)
@@ -1814,33 +1814,33 @@ void GameCommand_macro_write_aliases(float fh)
 void GameCommand(string command)
 {
        float argc = tokenize_console(command);
 void GameCommand(string command)
 {
        float argc = tokenize_console(command);
-       
+
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
        // 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
 
        // cmd     vote - master - login - password
 
-       if(strtolower(argv(0)) == "help") 
+       if(strtolower(argv(0)) == "help")
        {
        {
-               if(argc == 1) 
+               if(argc == 1)
                {
                        print("\nServer console commands:\n");
                        GameCommand_macro_help();
                {
                        print("\nServer console commands:\n");
                        GameCommand_macro_help();
-                       
+
                        print("\nBanning commands:\n");
                        BanCommand_macro_help();
                        print("\nBanning commands:\n");
                        BanCommand_macro_help();
-                       
+
                        print("\nCommon networked commands:\n");
                        CommonCommand_macro_help(world);
                        print("\nCommon networked commands:\n");
                        CommonCommand_macro_help(world);
-                       
+
                        print("\nGeneric commands shared by all programs:\n");
                        GenericCommand_macro_help();
                        print("\nGeneric commands shared by all programs:\n");
                        GenericCommand_macro_help();
-                       
+
                        print("\nUsage:^3 sv_cmd COMMAND...^7, where possible commands are listed above.\n");
                        print("For help about a specific command, type sv_cmd help COMMAND\n");
                        print("\nUsage:^3 sv_cmd COMMAND...^7, where possible commands are listed above.\n");
                        print("For help about a specific command, type sv_cmd help COMMAND\n");
-                       
+
                        return;
                        return;
-               } 
+               }
                else if(BanCommand_macro_usage(argc)) // Instead of trying to call a command, we're going to see detailed information about it
                {
                        return;
                else if(BanCommand_macro_usage(argc)) // Instead of trying to call a command, we're going to see detailed information about it
                {
                        return;
@@ -1857,8 +1857,8 @@ void GameCommand(string command)
                {
                        return;
                }
                {
                        return;
                }
-       } 
-       else if(BanCommand(command)) 
+       }
+       else if(BanCommand(command))
        {
                return; // handled by server/command/ipban.qc
        }
        {
                return; // handled by server/command/ipban.qc
        }
@@ -1866,7 +1866,7 @@ void GameCommand(string command)
        {
                return; // handled by server/command/common.qc
        }
        {
                return; // handled by server/command/common.qc
        }
-       else if(GenericCommand(command)) 
+       else if(GenericCommand(command))
        {
                return; // handled by common/command/generic.qc
        }
        {
                return; // handled by common/command/generic.qc
        }
@@ -1874,9 +1874,9 @@ void GameCommand(string command)
        {
                return; // handled by one of the above GameCommand_* functions
        }
        {
                return; // handled by one of the above GameCommand_* functions
        }
-       
+
        // nothing above caught the command, must be invalid
        print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n");
        // nothing above caught the command, must be invalid
        print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n");
-       
+
        return;
 }
        return;
 }
index c444a96159aea83625b59453f77fed044b01af68..01ecd78979b35922b2bd302e85ec7ab0a059f685 100644 (file)
@@ -100,7 +100,7 @@ void Nagger_ReadyCounted()
 //  Game logic for voting
 // =======================
 
 //  Game logic for voting
 // =======================
 
-void VoteReset() 
+void VoteReset()
 {
        entity tmp_player;
 
 {
        entity tmp_player;
 
@@ -115,50 +115,50 @@ void VoteReset()
        vote_called = VOTE_NULL;
        vote_caller = world;
        vote_endtime = 0;
        vote_called = VOTE_NULL;
        vote_caller = world;
        vote_endtime = 0;
-       
+
        vote_called_command = string_null;
        vote_called_display = string_null;
        vote_called_command = string_null;
        vote_called_display = string_null;
-       
+
        vote_parsed_command = string_null;
        vote_parsed_display = string_null;
 
        Nagger_VoteChanged();
 }
 
        vote_parsed_command = string_null;
        vote_parsed_display = string_null;
 
        Nagger_VoteChanged();
 }
 
-void VoteStop(entity stopper) 
+void VoteStop(entity stopper)
 {
        bprint("\{1}^2* ^3", GetCallerName(stopper), "^2 stopped ^3", GetCallerName(vote_caller), "^2's vote\n");
        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vstop:", ftos(stopper.playerid))); }
 {
        bprint("\{1}^2* ^3", GetCallerName(stopper), "^2 stopped ^3", GetCallerName(vote_caller), "^2's vote\n");
        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vstop:", ftos(stopper.playerid))); }
-       
+
        // Don't force them to wait for next vote, this way they can e.g. correct their vote.
        if((vote_caller) && (stopper == vote_caller)) { vote_caller.vote_waittime = time + autocvar_sv_vote_stop; }
 
        VoteReset();
 }
 
        // Don't force them to wait for next vote, this way they can e.g. correct their vote.
        if((vote_caller) && (stopper == vote_caller)) { vote_caller.vote_waittime = time + autocvar_sv_vote_stop; }
 
        VoteReset();
 }
 
-void VoteAccept() 
+void VoteAccept()
 {
        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2's vote for ^1", vote_called_display, "^2 was accepted\n");
 {
        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2's vote for ^1", vote_called_display, "^2 was accepted\n");
-       
+
        if((vote_called == VOTE_MASTER) && vote_caller)
                vote_caller.vote_master = 1;
        else
                localcmd(strcat(vote_called_command, "\n"));
        if((vote_called == VOTE_MASTER) && vote_caller)
                vote_caller.vote_master = 1;
        else
                localcmd(strcat(vote_called_command, "\n"));
-       
+
        if(vote_caller) { vote_caller.vote_waittime = 0; } // people like your votes, you don't need to wait to vote again
 
        VoteReset();
        Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_VOTE_ACCEPT);
 }
 
        if(vote_caller) { vote_caller.vote_waittime = 0; } // people like your votes, you don't need to wait to vote again
 
        VoteReset();
        Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_VOTE_ACCEPT);
 }
 
-void VoteReject() 
+void VoteReject()
 {
        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2's vote for ", vote_called_display, "^2 was rejected\n");
        VoteReset();
        Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_VOTE_FAIL);
 }
 
 {
        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2's vote for ", vote_called_display, "^2 was rejected\n");
        VoteReset();
        Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_VOTE_FAIL);
 }
 
-void VoteTimeout() 
+void VoteTimeout()
 {
        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2's vote for ", vote_called_display, "^2 timed out\n");
        VoteReset();
 {
        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2's vote for ", vote_called_display, "^2 timed out\n");
        VoteReset();
@@ -173,7 +173,7 @@ void VoteSpam(float notvoters, float mincount, string result)
                ((mincount >= 0) ? strcat("^2 (^1", ftos(mincount), "^2 needed)") : "^2"),
                strcat(", ^1", ftos(vote_abstain_count), "^2 didn't care"),
                strcat(", ^1", ftos(notvoters), strcat("^2 didn't ", ((mincount >= 0) ? "" : "have to "), "vote\n"))));
                ((mincount >= 0) ? strcat("^2 (^1", ftos(mincount), "^2 needed)") : "^2"),
                strcat(", ^1", ftos(vote_abstain_count), "^2 didn't care"),
                strcat(", ^1", ftos(notvoters), strcat("^2 didn't ", ((mincount >= 0) ? "" : "have to "), "vote\n"))));
-       
+
        if(autocvar_sv_eventlog)
        {
                GameLogEcho(strcat(
        if(autocvar_sv_eventlog)
        {
                GameLogEcho(strcat(
@@ -185,31 +185,31 @@ void VoteSpam(float notvoters, float mincount, string result)
        }
 }
 
        }
 }
 
-void VoteCount(float first_count) 
+void VoteCount(float first_count)
 {
        // declarations
        vote_accept_count = vote_reject_count = vote_abstain_count = 0;
 {
        // declarations
        vote_accept_count = vote_reject_count = vote_abstain_count = 0;
-       
-       float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) 
+
+       float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
                                || ((autocvar_sv_vote_nospectators == 1) && (warmup_stage || gameover))
                                || (autocvar_sv_vote_nospectators == 0));
                                || ((autocvar_sv_vote_nospectators == 1) && (warmup_stage || gameover))
                                || (autocvar_sv_vote_nospectators == 0));
-                               
+
        float vote_player_count = 0, notvoters = 0;
        float vote_real_player_count = 0, vote_real_accept_count = 0;
        float vote_real_reject_count = 0, vote_real_abstain_count = 0;
        float vote_needed_of_voted, final_needed_votes;
        float vote_factor_overall, vote_factor_of_voted;
        float vote_player_count = 0, notvoters = 0;
        float vote_real_player_count = 0, vote_real_accept_count = 0;
        float vote_real_reject_count = 0, vote_real_abstain_count = 0;
        float vote_needed_of_voted, final_needed_votes;
        float vote_factor_overall, vote_factor_of_voted;
-       
+
        entity tmp_player;
 
        Nagger_VoteCountChanged();
        entity tmp_player;
 
        Nagger_VoteCountChanged();
-       
+
        // add up all the votes from each connected client
        FOR_EACH_REALCLIENT(tmp_player)
        {
                ++vote_player_count;
                if(IS_PLAYER(tmp_player)) { ++vote_real_player_count; }
        // add up all the votes from each connected client
        FOR_EACH_REALCLIENT(tmp_player)
        {
                ++vote_player_count;
                if(IS_PLAYER(tmp_player)) { ++vote_real_player_count; }
-               
+
                switch(tmp_player.vote_selection)
                {
                        case VOTE_SELECT_REJECT: { ++vote_reject_count; { if(IS_PLAYER(tmp_player)) ++vote_real_reject_count; } break; }
                switch(tmp_player.vote_selection)
                {
                        case VOTE_SELECT_REJECT: { ++vote_reject_count; { if(IS_PLAYER(tmp_player)) ++vote_real_reject_count; } break; }
@@ -218,17 +218,17 @@ void VoteCount(float first_count)
                        default: break;
                }
        }
                        default: break;
                }
        }
-       
+
        // Check to see if there are enough players on the server to allow master voting... otherwise, vote master could be used for evil.
        // Check to see if there are enough players on the server to allow master voting... otherwise, vote master could be used for evil.
-       if((vote_called == VOTE_MASTER) && autocvar_sv_vote_master_playerlimit > vote_player_count) 
+       if((vote_called == VOTE_MASTER) && autocvar_sv_vote_master_playerlimit > vote_player_count)
        {
                if(vote_caller) { vote_caller.vote_waittime = 0; }
                print_to(vote_caller, "^1There are not enough players on this server to allow you to become vote master.");
                VoteReset();
                return;
        }
        {
                if(vote_caller) { vote_caller.vote_waittime = 0; }
                print_to(vote_caller, "^1There are not enough players on this server to allow you to become vote master.");
                VoteReset();
                return;
        }
-       
-       // if spectators aren't allowed to vote and there are players in a match, then only count the players in the vote and ignore spectators. 
+
+       // if spectators aren't allowed to vote and there are players in a match, then only count the players in the vote and ignore spectators.
        if(!spectators_allowed && (vote_real_player_count > 0))
        {
                vote_accept_count = vote_real_accept_count;
        if(!spectators_allowed && (vote_real_player_count > 0))
        {
                vote_accept_count = vote_real_accept_count;
@@ -236,46 +236,46 @@ void VoteCount(float first_count)
                vote_abstain_count = vote_real_abstain_count;
                vote_player_count = vote_real_player_count;
        }
                vote_abstain_count = vote_real_abstain_count;
                vote_player_count = vote_real_player_count;
        }
-       
+
        // people who have no opinion in any way :D
        notvoters = (vote_player_count - vote_accept_count - vote_reject_count - vote_abstain_count);
 
        // determine the goal for the vote to be passed or rejected normally
        vote_factor_overall = bound(0.5, autocvar_sv_vote_majority_factor, 0.999);
        vote_needed_overall = floor((vote_player_count - vote_abstain_count) * vote_factor_overall) + 1;
        // people who have no opinion in any way :D
        notvoters = (vote_player_count - vote_accept_count - vote_reject_count - vote_abstain_count);
 
        // determine the goal for the vote to be passed or rejected normally
        vote_factor_overall = bound(0.5, autocvar_sv_vote_majority_factor, 0.999);
        vote_needed_overall = floor((vote_player_count - vote_abstain_count) * vote_factor_overall) + 1;
-       
+
        // if the vote times out, determine the amount of votes needed of the people who actually already voted
        vote_factor_of_voted = bound(0.5, autocvar_sv_vote_majority_factor_of_voted, 0.999);
        vote_needed_of_voted = floor((vote_accept_count + vote_reject_count) * vote_factor_of_voted) + 1;
        // if the vote times out, determine the amount of votes needed of the people who actually already voted
        vote_factor_of_voted = bound(0.5, autocvar_sv_vote_majority_factor_of_voted, 0.999);
        vote_needed_of_voted = floor((vote_accept_count + vote_reject_count) * vote_factor_of_voted) + 1;
-       
+
        // are there any players at all on the server? it could be an admin vote
        if(vote_player_count == 0 && first_count)
        {
        // are there any players at all on the server? it could be an admin vote
        if(vote_player_count == 0 && first_count)
        {
-               VoteSpam(0, -1, "yes"); // no players at all, just accept it 
+               VoteSpam(0, -1, "yes"); // no players at all, just accept it
                VoteAccept();
                return;
        }
                VoteAccept();
                return;
        }
-       
-       // since there ARE players, finally calculate the result of the vote    
+
+       // since there ARE players, finally calculate the result of the vote
        if(vote_accept_count >= vote_needed_overall)
        {
                VoteSpam(notvoters, -1, "yes"); // there is enough acceptions to pass the vote
                VoteAccept();
                return;
        }
        if(vote_accept_count >= vote_needed_overall)
        {
                VoteSpam(notvoters, -1, "yes"); // there is enough acceptions to pass the vote
                VoteAccept();
                return;
        }
-       
+
        if(vote_reject_count > vote_player_count - vote_abstain_count - vote_needed_overall)
        {
                VoteSpam(notvoters, -1, "no"); // there is enough rejections to deny the vote
                VoteReject();
                return;
        }
        if(vote_reject_count > vote_player_count - vote_abstain_count - vote_needed_overall)
        {
                VoteSpam(notvoters, -1, "no"); // there is enough rejections to deny the vote
                VoteReject();
                return;
        }
-       
+
        // there is not enough votes in either direction, now lets just calculate what the voters have said
        if(time > vote_endtime)
        {
                final_needed_votes = vote_needed_overall;
        // there is not enough votes in either direction, now lets just calculate what the voters have said
        if(time > vote_endtime)
        {
                final_needed_votes = vote_needed_overall;
-               
+
                if(autocvar_sv_vote_majority_factor_of_voted)
                {
                        if(vote_accept_count >= vote_needed_of_voted)
                if(autocvar_sv_vote_majority_factor_of_voted)
                {
                        if(vote_accept_count >= vote_needed_of_voted)
@@ -284,31 +284,31 @@ void VoteCount(float first_count)
                                VoteAccept();
                                return;
                        }
                                VoteAccept();
                                return;
                        }
-                       
+
                        if(vote_accept_count + vote_reject_count > 0)
                        {
                                VoteSpam(notvoters, min(vote_needed_overall, vote_needed_of_voted), "no");
                                VoteReject();
                                return;
                        }
                        if(vote_accept_count + vote_reject_count > 0)
                        {
                                VoteSpam(notvoters, min(vote_needed_overall, vote_needed_of_voted), "no");
                                VoteReject();
                                return;
                        }
-                       
+
                        final_needed_votes = min(vote_needed_overall, vote_needed_of_voted);
                }
 
                        final_needed_votes = min(vote_needed_overall, vote_needed_of_voted);
                }
 
-               // it didn't pass or fail, so not enough votes to even make a decision. 
+               // it didn't pass or fail, so not enough votes to even make a decision.
                VoteSpam(notvoters, final_needed_votes, "timeout");
                VoteTimeout();
        }
 }
 
                VoteSpam(notvoters, final_needed_votes, "timeout");
                VoteTimeout();
        }
 }
 
-void VoteThink() 
+void VoteThink()
 {
        if(vote_endtime > 0) // a vote was called
        if(time > vote_endtime) // time is up
        {
                VoteCount(FALSE);
        }
 {
        if(vote_endtime > 0) // a vote was called
        if(time > vote_endtime) // time is up
        {
                VoteCount(FALSE);
        }
-       
+
        return;
 }
 
        return;
 }
 
@@ -391,13 +391,13 @@ void reset_map(float dorespawn)
 }
 
 // Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown is set)
 }
 
 // Restarts the map after the countdown is over (and cvar sv_ready_restart_after_countdown is set)
-void ReadyRestart_think() 
+void ReadyRestart_think()
 {
        restart_mapalreadyrestarted = 1;
        reset_map(TRUE);
        Score_ClearAll();
        remove(self);
 {
        restart_mapalreadyrestarted = 1;
        reset_map(TRUE);
        Score_ClearAll();
        remove(self);
-       
+
        return;
 }
 
        return;
 }
 
@@ -473,7 +473,7 @@ void ReadyRestart()
        if (!autocvar_sv_ready_restart_after_countdown) { Score_ClearAll(); }
 
        ReadyRestart_force();
        if (!autocvar_sv_ready_restart_after_countdown) { Score_ClearAll(); }
 
        ReadyRestart_force();
-       
+
        return;
 }
 
        return;
 }
 
@@ -499,12 +499,12 @@ void ReadyCount()
 
        ready_needed_factor = bound(0.5, cvar("g_warmup_majority_factor"), 0.999);
        ready_needed_count = floor(t_players * ready_needed_factor) + 1;
 
        ready_needed_factor = bound(0.5, cvar("g_warmup_majority_factor"), 0.999);
        ready_needed_count = floor(t_players * ready_needed_factor) + 1;
-       
+
        if(readycount >= ready_needed_count)
        {
                ReadyRestart();
        }
        if(readycount >= ready_needed_count)
        {
                ReadyRestart();
        }
-               
+
        return;
 }
 
        return;
 }
 
@@ -516,9 +516,9 @@ void ReadyCount()
 float Votecommand_check_assignment(entity caller, float assignment)
 {
        float from_server = (!caller);
 float Votecommand_check_assignment(entity caller, float assignment)
 {
        float from_server = (!caller);
-       
-       if((assignment == VC_ASGNMNT_BOTH) 
-               || ((!from_server && assignment == VC_ASGNMNT_CLIENTONLY) 
+
+       if((assignment == VC_ASGNMNT_BOTH)
+               || ((!from_server && assignment == VC_ASGNMNT_CLIENTONLY)
                || (from_server && assignment == VC_ASGNMNT_SERVERONLY)))
        {
                return TRUE;
                || (from_server && assignment == VC_ASGNMNT_SERVERONLY)))
        {
                return TRUE;
@@ -527,15 +527,15 @@ float Votecommand_check_assignment(entity caller, float assignment)
        return FALSE;
 }
 
        return FALSE;
 }
 
-string VoteCommand_extractcommand(string input, float startpos, float argc) 
+string VoteCommand_extractcommand(string input, float startpos, float argc)
 {
        string output;
 {
        string output;
-       
+
        if((argc - 1) < startpos)
                output = "";
        else
                output = substring(input, argv_start_index(startpos), argv_end_index(-1) - argv_start_index(startpos));
        if((argc - 1) < startpos)
                output = "";
        else
                output = substring(input, argv_start_index(startpos), argv_end_index(-1) - argv_start_index(startpos));
-               
+
        return output;
 }
 
        return output;
 }
 
@@ -546,30 +546,30 @@ float VoteCommand_checknasty(string vote_command)
                || (strstrofs(vote_command, "\r", 0) >= 0)
                || (strstrofs(vote_command, "$", 0) >= 0))
                return FALSE;
                || (strstrofs(vote_command, "\r", 0) >= 0)
                || (strstrofs(vote_command, "$", 0) >= 0))
                return FALSE;
-               
+
        return TRUE;
 }
 
 float VoteCommand_checkinlist(string vote_command, string list)
 {
        string l = strcat(" ", list, " ");
        return TRUE;
 }
 
 float VoteCommand_checkinlist(string vote_command, string list)
 {
        string l = strcat(" ", list, " ");
-       
+
        if(strstrofs(l, strcat(" ", vote_command, " "), 0) >= 0)
                return TRUE;
        if(strstrofs(l, strcat(" ", vote_command, " "), 0) >= 0)
                return TRUE;
-       
+
        return FALSE;
 }
 
 string ValidateMap(string validated_map, entity caller)
 {
        validated_map = MapInfo_FixName(validated_map);
        return FALSE;
 }
 
 string ValidateMap(string validated_map, entity caller)
 {
        validated_map = MapInfo_FixName(validated_map);
-       
+
        if (!validated_map)
        {
                print_to(caller, "This map is not available on this server.");
                return string_null;
        }
        if (!validated_map)
        {
                print_to(caller, "This map is not available on this server.");
                return string_null;
        }
-       
+
        if(!autocvar_sv_vote_override_mostrecent && caller)
        {
                if(Map_IsRecent(validated_map))
        if(!autocvar_sv_vote_override_mostrecent && caller)
        {
                if(Map_IsRecent(validated_map))
@@ -578,7 +578,7 @@ string ValidateMap(string validated_map, entity caller)
                        return string_null;
                }
        }
                        return string_null;
                }
        }
-       
+
        if(!MapInfo_CheckMap(validated_map))
        {
                print_to(caller, strcat("^1Invalid mapname, \"^3", validated_map, "^1\" does not support the current game mode."));
        if(!MapInfo_CheckMap(validated_map))
        {
                print_to(caller, strcat("^1Invalid mapname, \"^3", validated_map, "^1\" does not support the current game mode."));
@@ -665,7 +665,7 @@ float VoteCommand_checkargs(float startpos, float argc)
 float VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, float argc)
 {
        string first_command;
 float VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, float argc)
 {
        string first_command;
-       
+
        first_command = argv(startpos);
 
        /*dprint(sprintf("VoteCommand_parse(): Command: '%s', Length: %f.\n",
        first_command = argv(startpos);
 
        /*dprint(sprintf("VoteCommand_parse(): Command: '%s', Length: %f.\n",
@@ -693,25 +693,25 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl
                {
                        entity victim = GetIndexedEntity(argc, (startpos + 1));
                        float accepted = VerifyClientEntity(victim, TRUE, FALSE);
                {
                        entity victim = GetIndexedEntity(argc, (startpos + 1));
                        float accepted = VerifyClientEntity(victim, TRUE, FALSE);
-                       
+
                        if(accepted > 0)
                        {
                                string reason = ((argc > next_token) ? substring(vote_command, argv_start_index(next_token), strlen(vote_command) - argv_start_index(next_token)) : "No reason provided");
                                string command_arguments;
                        if(accepted > 0)
                        {
                                string reason = ((argc > next_token) ? substring(vote_command, argv_start_index(next_token), strlen(vote_command) - argv_start_index(next_token)) : "No reason provided");
                                string command_arguments;
-                               
+
                                if(first_command == "kickban")
                                        command_arguments = strcat(ftos(autocvar_g_ban_default_bantime), " ", ftos(autocvar_g_ban_default_masksize), " ~");
                                else
                                        command_arguments = reason;
                                if(first_command == "kickban")
                                        command_arguments = strcat(ftos(autocvar_g_ban_default_bantime), " ", ftos(autocvar_g_ban_default_masksize), " ~");
                                else
                                        command_arguments = reason;
-                               
+
                                vote_parsed_command = strcat(first_command, " # ", ftos(num_for_edict(victim)), " ", command_arguments);
                                vote_parsed_display = strcat("^1", vote_command, " (^7", victim.netname, "^1): ", reason);
                        }
                        else { print_to(caller, strcat("vcall: ", GetClientErrorString(accepted, argv(startpos + 1)), ".\n")); return FALSE; }
                                vote_parsed_command = strcat(first_command, " # ", ftos(num_for_edict(victim)), " ", command_arguments);
                                vote_parsed_display = strcat("^1", vote_command, " (^7", victim.netname, "^1): ", reason);
                        }
                        else { print_to(caller, strcat("vcall: ", GetClientErrorString(accepted, argv(startpos + 1)), ".\n")); return FALSE; }
-                       
+
                        break;
                }
                        break;
                }
-               
+
                case "map":
                case "chmap":
                case "gotomap": // re-direct all map selection commands to gotomap
                case "map":
                case "chmap":
                case "gotomap": // re-direct all map selection commands to gotomap
@@ -720,16 +720,16 @@ float VoteCommand_parse(entity caller, string vote_command, string vote_list, fl
                        if (!vote_command) { return FALSE; }
                        vote_parsed_command = strcat("gotomap ", vote_command);
                        vote_parsed_display = strzone(strcat("^1", vote_parsed_command));
                        if (!vote_command) { return FALSE; }
                        vote_parsed_command = strcat("gotomap ", vote_command);
                        vote_parsed_display = strzone(strcat("^1", vote_parsed_command));
-                       
+
                        break;
                }
                        break;
                }
-               
-               default: 
-               { 
+
+               default:
+               {
                        vote_parsed_command = vote_command;
                        vote_parsed_display = strzone(strcat("^1", vote_command));
                        vote_parsed_command = vote_command;
                        vote_parsed_display = strzone(strcat("^1", vote_command));
-                       
-                       break; 
+
+                       break;
                }
        }
 
                }
        }
 
@@ -749,7 +749,7 @@ void VoteCommand_abstain(float request, entity caller) // CLIENT ONLY
                {
                        if (!vote_called) { print_to(caller, "^1No vote called."); }
                        else if(caller.vote_selection != VOTE_SELECT_NULL && !autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
                {
                        if (!vote_called) { print_to(caller, "^1No vote called."); }
                        else if(caller.vote_selection != VOTE_SELECT_NULL && !autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
-                       
+
                        else // everything went okay, continue changing vote
                        {
                                print_to(caller, "^1You abstained from your vote.");
                        else // everything went okay, continue changing vote
                        {
                                print_to(caller, "^1You abstained from your vote.");
@@ -757,10 +757,10 @@ void VoteCommand_abstain(float request, entity caller) // CLIENT ONLY
                                msg_entity = caller;
                                if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); }
                        }
                                msg_entity = caller;
                                if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); }
                        }
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -777,15 +777,15 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm
        {
                case CMD_REQUEST_COMMAND:
                {
        {
                case CMD_REQUEST_COMMAND:
                {
-                       float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) 
-                               || ((autocvar_sv_vote_nospectators == 1) && warmup_stage) 
+                       float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
+                               || ((autocvar_sv_vote_nospectators == 1) && warmup_stage)
                                || (autocvar_sv_vote_nospectators == 0));
                                || (autocvar_sv_vote_nospectators == 0));
-                               
+
                        float tmp_playercount = 0;
                        entity tmp_player;
                        float tmp_playercount = 0;
                        entity tmp_player;
-                       
+
                        vote_command = VoteCommand_extractcommand(vote_command, 2, argc);
                        vote_command = VoteCommand_extractcommand(vote_command, 2, argc);
-                       
+
                        if(!autocvar_sv_vote_call && caller) { print_to(caller, "^1Vote calling is not allowed."); }
                        else if(!autocvar_sv_vote_gamestart && time < game_starttime) { print_to(caller, "^1Vote calling is not allowed before the match has started."); }
                        else if(vote_called) { print_to(caller, "^1There is already a vote called."); }
                        if(!autocvar_sv_vote_call && caller) { print_to(caller, "^1Vote calling is not allowed."); }
                        else if(!autocvar_sv_vote_gamestart && time < game_starttime) { print_to(caller, "^1Vote calling is not allowed before the match has started."); }
                        else if(vote_called) { print_to(caller, "^1There is already a vote called."); }
@@ -802,26 +802,26 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm
                                vote_called_command = strzone(vote_parsed_command);
                                vote_called_display = strzone(vote_parsed_display);
                                vote_endtime = time + autocvar_sv_vote_timeout;
                                vote_called_command = strzone(vote_parsed_command);
                                vote_called_display = strzone(vote_parsed_display);
                                vote_endtime = time + autocvar_sv_vote_timeout;
-                               
+
                                if(caller)
                                {
                                        caller.vote_selection = VOTE_SELECT_ACCEPT;
                                        caller.vote_waittime = time + autocvar_sv_vote_wait;
                                        msg_entity = caller;
                                }
                                if(caller)
                                {
                                        caller.vote_selection = VOTE_SELECT_ACCEPT;
                                        caller.vote_waittime = time + autocvar_sv_vote_wait;
                                        msg_entity = caller;
                                }
-                               
+
                                FOR_EACH_REALCLIENT(tmp_player) { ++tmp_playercount; }
                                if(tmp_playercount > 1) { Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_VOTE_CALL); } // don't announce a "vote now" sound if player is alone
                                FOR_EACH_REALCLIENT(tmp_player) { ++tmp_playercount; }
                                if(tmp_playercount > 1) { Send_Notification(NOTIF_ALL, world, MSG_ANNCE, ANNCE_VOTE_CALL); } // don't announce a "vote now" sound if player is alone
-                               
+
                                bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2 calls a vote for ", vote_called_display, "\n");
                                if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); }
                                Nagger_VoteChanged();
                                VoteCount(TRUE); // needed if you are the only one
                        }
                                bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2 calls a vote for ", vote_called_display, "\n");
                                if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); }
                                Nagger_VoteChanged();
                                VoteCount(TRUE); // needed if you are the only one
                        }
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -847,11 +847,11 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co
                                        case "do":
                                        {
                                                vote_command = VoteCommand_extractcommand(vote_command, 3, argc);
                                        case "do":
                                        {
                                                vote_command = VoteCommand_extractcommand(vote_command, 3, argc);
-                                               
+
                                                if (!caller.vote_master) { print_to(caller, "^1You do not have vote master privelages."); }
                                                else if (!VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
                                                else if (!VoteCommand_parse(caller, vote_command, strcat(autocvar_sv_vote_commands, " ", autocvar_sv_vote_master_commands), 3, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); }
                                                if (!caller.vote_master) { print_to(caller, "^1You do not have vote master privelages."); }
                                                else if (!VoteCommand_checknasty(vote_command)) { print_to(caller, "^1Syntax error in command, see 'vhelp' for more info."); }
                                                else if (!VoteCommand_parse(caller, vote_command, strcat(autocvar_sv_vote_commands, " ", autocvar_sv_vote_master_commands), 3, argc)) { print_to(caller, "^1This command is not acceptable, see 'vhelp' for more info."); }
-                                               
+
                                                else // everything went okay, proceed with command
                                                {
                                                        localcmd(strcat(vote_parsed_command, "\n"));
                                                else // everything went okay, proceed with command
                                                {
                                                        localcmd(strcat(vote_parsed_command, "\n"));
@@ -859,10 +859,10 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co
                                                        bprint("\{1}^2* ^3", GetCallerName(caller), "^2 used their ^3master^2 status to do \"^2", vote_parsed_display, "^2\".\n");
                                                        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vdo:", ftos(caller.playerid), ":", vote_parsed_display)); }
                                                }
                                                        bprint("\{1}^2* ^3", GetCallerName(caller), "^2 used their ^3master^2 status to do \"^2", vote_parsed_display, "^2\".\n");
                                                        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vdo:", ftos(caller.playerid), ":", vote_parsed_display)); }
                                                }
-                                               
+
                                                return;
                                        }
                                                return;
                                        }
-                                       
+
                                        case "login":
                                        {
                                                if(autocvar_sv_vote_master_password == "") { print_to(caller, "^1Login to vote master is not allowed."); }
                                        case "login":
                                        {
                                                if(autocvar_sv_vote_master_password == "") { print_to(caller, "^1Login to vote master is not allowed."); }
@@ -876,21 +876,21 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co
                                                        bprint("\{1}^2* ^3", GetCallerName(caller), "^2 logged in as ^3master^2\n");
                                                        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vlogin:", ftos(caller.playerid))); }
                                                }
                                                        bprint("\{1}^2* ^3", GetCallerName(caller), "^2 logged in as ^3master^2\n");
                                                        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vlogin:", ftos(caller.playerid))); }
                                                }
-                                               
+
                                                return;
                                        }
                                                return;
                                        }
-                                       
+
                                        default: // calling a vote for master
                                        {
                                        default: // calling a vote for master
                                        {
-                                               float spectators_allowed = ((autocvar_sv_vote_nospectators != 2) 
-                                                       || ((autocvar_sv_vote_nospectators == 1) && warmup_stage) 
+                                               float spectators_allowed = ((autocvar_sv_vote_nospectators != 2)
+                                                       || ((autocvar_sv_vote_nospectators == 1) && warmup_stage)
                                                        || (autocvar_sv_vote_nospectators == 0));
                                                        || (autocvar_sv_vote_nospectators == 0));
-                                               
+
                                                if (!autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
                                                else if(vote_called) { print_to(caller, "^1There is already a vote called."); }
                                                else if(!spectators_allowed && (caller && !IS_PLAYER(caller))) { print_to(caller, "^1Only players can call a vote."); }
                                                else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); }
                                                if (!autocvar_sv_vote_master_callable) { print_to(caller, "^1Vote to become vote master is not allowed."); }
                                                else if(vote_called) { print_to(caller, "^1There is already a vote called."); }
                                                else if(!spectators_allowed && (caller && !IS_PLAYER(caller))) { print_to(caller, "^1Only players can call a vote."); }
                                                else if(timeout_status) { print_to(caller, "^1You can not call a vote while a timeout is active."); }
-                                               
+
                                                else // everything went okay, continue with creating vote
                                                {
                                                        vote_caller = caller;
                                                else // everything went okay, continue with creating vote
                                                {
                                                        vote_caller = caller;
@@ -898,25 +898,25 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co
                                                        vote_called_command = strzone("XXX");
                                                        vote_called_display = strzone("^3master");
                                                        vote_endtime = time + autocvar_sv_vote_timeout;
                                                        vote_called_command = strzone("XXX");
                                                        vote_called_display = strzone("^3master");
                                                        vote_endtime = time + autocvar_sv_vote_timeout;
-                                                       
+
                                                        caller.vote_selection = VOTE_SELECT_ACCEPT;
                                                        caller.vote_waittime = time + autocvar_sv_vote_wait;
                                                        caller.vote_selection = VOTE_SELECT_ACCEPT;
                                                        caller.vote_waittime = time + autocvar_sv_vote_wait;
-                                                       
+
                                                        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2 calls a vote to become ^3master^2.\n");
                                                        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); }
                                                        Nagger_VoteChanged();
                                                        VoteCount(TRUE); // needed if you are the only one
                                                }
                                                        bprint("\{1}^2* ^3", GetCallerName(vote_caller), "^2 calls a vote to become ^3master^2.\n");
                                                        if(autocvar_sv_eventlog) { GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display)); }
                                                        Nagger_VoteChanged();
                                                        VoteCount(TRUE); // needed if you are the only one
                                                }
-                                               
+
                                                return;
                                        }
                                }
                        }
                        else { print_to(caller, "^1Master control of voting is not allowed."); }
                                                return;
                                        }
                                }
                        }
                        else { print_to(caller, "^1Master control of voting is not allowed."); }
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -937,7 +937,7 @@ void VoteCommand_no(float request, entity caller) // CLIENT ONLY
                        if (!vote_called) { print_to(caller, "^1No vote called."); }
                        else if(caller.vote_selection != VOTE_SELECT_NULL && !autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
                        else if(((caller == vote_caller) || caller.vote_master) && autocvar_sv_vote_no_stops_vote) { VoteStop(caller); }
                        if (!vote_called) { print_to(caller, "^1No vote called."); }
                        else if(caller.vote_selection != VOTE_SELECT_NULL && !autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
                        else if(((caller == vote_caller) || caller.vote_master) && autocvar_sv_vote_no_stops_vote) { VoteStop(caller); }
-                       
+
                        else // everything went okay, continue changing vote
                        {
                                print_to(caller, "^1You rejected the vote.");
                        else // everything went okay, continue changing vote
                        {
                                print_to(caller, "^1You rejected the vote.");
@@ -945,10 +945,10 @@ void VoteCommand_no(float request, entity caller) // CLIENT ONLY
                                msg_entity = caller;
                                if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); }
                        }
                                msg_entity = caller;
                                if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); }
                        }
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -969,10 +969,10 @@ void VoteCommand_status(float request, entity caller) // BOTH
                                print_to(caller, strcat("^7Vote for ", vote_called_display, "^7 called by ^7", GetCallerName(vote_caller), "^7."));
                        else
                                print_to(caller, "^1No vote called.");
                                print_to(caller, strcat("^7Vote for ", vote_called_display, "^7 called by ^7", GetCallerName(vote_caller), "^7."));
                        else
                                print_to(caller, "^1No vote called.");
-                               
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -992,10 +992,10 @@ void VoteCommand_stop(float request, entity caller) // BOTH
                        if (!vote_called) { print_to(caller, "^1No vote called."); }
                        else if((caller == vote_caller) || !caller || caller.vote_master) { VoteStop(caller); }
                        else { print_to(caller, "^1You are not allowed to stop that vote."); }
                        if (!vote_called) { print_to(caller, "^1No vote called."); }
                        else if((caller == vote_caller) || !caller || caller.vote_master) { VoteStop(caller); }
                        else { print_to(caller, "^1You are not allowed to stop that vote."); }
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1014,7 +1014,7 @@ void VoteCommand_yes(float request, entity caller) // CLIENT ONLY
                {
                        if (!vote_called) { print_to(caller, "^1No vote called."); }
                        else if(caller.vote_selection != VOTE_SELECT_NULL && autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
                {
                        if (!vote_called) { print_to(caller, "^1No vote called."); }
                        else if(caller.vote_selection != VOTE_SELECT_NULL && autocvar_sv_vote_change) { print_to(caller, "^1You have already voted."); }
-                       
+
                        else // everything went okay, continue changing vote
                        {
                                print_to(caller, "^1You accepted the vote.");
                        else // everything went okay, continue changing vote
                        {
                                print_to(caller, "^1You accepted the vote.");
@@ -1022,10 +1022,10 @@ void VoteCommand_yes(float request, entity caller) // CLIENT ONLY
                                msg_entity = caller;
                                if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); }
                        }
                                msg_entity = caller;
                                if(!autocvar_sv_vote_singlecount) { VoteCount(FALSE); }
                        }
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1044,10 +1044,10 @@ void VoteCommand_(float request)
        {
                case CMD_REQUEST_COMMAND:
                {
        {
                case CMD_REQUEST_COMMAND:
                {
-                       
+
                        return;
                }
                        return;
                }
-                       
+
                default:
                case CMD_REQUEST_USAGE:
                {
                default:
                case CMD_REQUEST_USAGE:
                {
@@ -1085,10 +1085,10 @@ void VoteCommand_macro_help(entity caller, float argc)
                print_to(caller, "\nVoting commands:\n");
                #define VOTE_COMMAND(name,function,description,assignment) \
                        { if(Votecommand_check_assignment(caller, assignment)) { print_to(caller, strcat("  ^2", name, "^7: ", description)); } }
                print_to(caller, "\nVoting commands:\n");
                #define VOTE_COMMAND(name,function,description,assignment) \
                        { if(Votecommand_check_assignment(caller, assignment)) { print_to(caller, strcat("  ^2", name, "^7: ", description)); } }
-                       
+
                VOTE_COMMANDS(0, caller, 0, "")
                #undef VOTE_COMMAND
                VOTE_COMMANDS(0, caller, 0, "")
                #undef VOTE_COMMAND
-               
+
                print_to(caller, strcat("\nUsage:^3 ", command_origin, " vote COMMAND...^7, where possible commands are listed above.\n"));
                print_to(caller, strcat("For help about a specific command, type ", command_origin, " vote help COMMAND"));
                print_to(caller, strcat("\n^7You can call a vote for or execute these commands: ^3", autocvar_sv_vote_commands, "^7 and maybe further ^3arguments^7"));
                print_to(caller, strcat("\nUsage:^3 ", command_origin, " vote COMMAND...^7, where possible commands are listed above.\n"));
                print_to(caller, strcat("For help about a specific command, type ", command_origin, " vote help COMMAND"));
                print_to(caller, strcat("\n^7You can call a vote for or execute these commands: ^3", autocvar_sv_vote_commands, "^7 and maybe further ^3arguments^7"));
@@ -1097,11 +1097,11 @@ void VoteCommand_macro_help(entity caller, float argc)
        {
                #define VOTE_COMMAND(name,function,description,assignment) \
                        { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(2))) { function; return; } } }
        {
                #define VOTE_COMMAND(name,function,description,assignment) \
                        { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(2))) { function; return; } } }
-                       
+
                VOTE_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "")
                #undef VOTE_COMMAND
        }
                VOTE_COMMANDS(CMD_REQUEST_USAGE, caller, argc, "")
                #undef VOTE_COMMAND
        }
-       
+
        return;
 }
 
        return;
 }
 
@@ -1109,10 +1109,10 @@ float VoteCommand_macro_command(entity caller, float argc, string vote_command)
 {
        #define VOTE_COMMAND(name,function,description,assignment) \
                { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(1))) { function; return TRUE; } } }
 {
        #define VOTE_COMMAND(name,function,description,assignment) \
                { if(Votecommand_check_assignment(caller, assignment)) { if(name == strtolower(argv(1))) { function; return TRUE; } } }
-               
+
        VOTE_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, vote_command)
        #undef VOTE_COMMAND
        VOTE_COMMANDS(CMD_REQUEST_COMMAND, caller, argc, vote_command)
        #undef VOTE_COMMAND
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -1121,13 +1121,13 @@ float VoteCommand_macro_command(entity caller, float argc, string vote_command)
 //  Main function handling vote commands
 // ======================================
 
 //  Main function handling vote commands
 // ======================================
 
-void VoteCommand(float request, entity caller, float argc, string vote_command) 
+void VoteCommand(float request, entity caller, float argc, string vote_command)
 {
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
 {
        // 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
        // cmd     vote - master - login - password
-       
+
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
        switch(request)
        {
                case CMD_REQUEST_COMMAND:
@@ -1135,7 +1135,7 @@ void VoteCommand(float request, entity caller, float argc, string vote_command)
                        if(VoteCommand_macro_command(caller, argc, vote_command))
                                return;
                }
                        if(VoteCommand_macro_command(caller, argc, vote_command))
                                return;
                }
-                       
+
                default:
                        print_to(caller, strcat(((argv(1) != "") ? strcat("Unknown vote command \"", argv(1), "\"") : "No command provided"), ". For a list of supported commands, try ", GetCommandPrefix(caller), " vote help.\n"));
                case CMD_REQUEST_USAGE:
                default:
                        print_to(caller, strcat(((argv(1) != "") ? strcat("Unknown vote command \"", argv(1), "\"") : "No command provided"), ". For a list of supported commands, try ", GetCommandPrefix(caller), " vote help.\n"));
                case CMD_REQUEST_USAGE:
index 1225b6be582cecb5feb9ecb6a645d1fd161d0ab6..0386e1d5a187f033da2ffc6ab7a6f99ebf98a6e7 100644 (file)
@@ -27,7 +27,7 @@ float vote_accept_count; // total amount of players who accept the vote (counted
 float vote_reject_count; // same as above, but rejected
 float vote_abstain_count; // same as above, but abstained
 float vote_needed_overall; // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor)
 float vote_reject_count; // same as above, but rejected
 float vote_abstain_count; // same as above, but abstained
 float vote_needed_overall; // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor)
-.float vote_master; // flag for if the player has vote master privelages 
+.float vote_master; // flag for if the player has vote master privelages
 .float vote_waittime; // flag for how long the player must wait before they can vote again
 .float vote_selection; // flag for which vote selection the player has made (See VOTE_SELECT_*)
 string vote_called_command; // command sent by client
 .float vote_waittime; // flag for how long the player must wait before they can vote again
 .float vote_selection; // flag for which vote selection the player has made (See VOTE_SELECT_*)
 string vote_called_command; // command sent by client
index ac58a90c3e36715d3c020156d3a5dab3c9d69f47..4d208ebda808341f778f242ba0135d7255bd29d9 100644 (file)
@@ -52,7 +52,7 @@ float CSQCProjectile_SendEntity(entity to, float sf)
 
        if(sf & 2)
                WriteByte(MSG_ENTITY, self.csqcprojectile_type); // TODO maybe put this into sf?
 
        if(sf & 2)
                WriteByte(MSG_ENTITY, self.csqcprojectile_type); // TODO maybe put this into sf?
-       
+
        return 1;
 }
 
        return 1;
 }
 
@@ -69,9 +69,9 @@ void CSQCProjectile_Check(entity e)
 void CSQCProjectile(entity e, float clientanimate, float type, float docull)
 {
        Net_LinkEntity(e, docull, 0, CSQCProjectile_SendEntity);
 void CSQCProjectile(entity e, float clientanimate, float type, float docull)
 {
        Net_LinkEntity(e, docull, 0, CSQCProjectile_SendEntity);
-       
+
        e.csqcprojectile_clientanimate = clientanimate;
        e.csqcprojectile_clientanimate = clientanimate;
-       
+
        if(e.movetype == MOVETYPE_TOSS || e.movetype == MOVETYPE_BOUNCE)
        {
                if(e.gravity == 0)
        if(e.movetype == MOVETYPE_TOSS || e.movetype == MOVETYPE_BOUNCE)
        {
                if(e.gravity == 0)
index fe41a23fabc2f7585c3cef8a0d8bd9448b303226..cb58250118809bd9771b13c5c193e1314fa48e90 100644 (file)
@@ -55,7 +55,7 @@ float team1_score, team2_score, team3_score, team4_score;
 float maxclients;
 
 // flag set on worldspawn so that the code knows if it is dedicated or not
 float maxclients;
 
 // flag set on worldspawn so that the code knows if it is dedicated or not
-float server_is_dedicated; 
+float server_is_dedicated;
 
 // Fields
 
 
 // Fields
 
@@ -475,7 +475,7 @@ void target_voicescript_clear(entity pl);
 .float target_random;
 .float trigger_reverse;
 
 .float target_random;
 .float trigger_reverse;
 
-// Nexball 
+// Nexball
 .entity ballcarried; // Also used for keepaway
 .float metertime;
 float g_nexball_meter_period;
 .entity ballcarried; // Also used for keepaway
 .float metertime;
 float g_nexball_meter_period;
@@ -516,8 +516,8 @@ string matchid;
 
 .float last_pickup;
 
 
 .float last_pickup;
 
-.float hit_time; 
-.float typehit_time; 
+.float hit_time;
+.float typehit_time;
 
 .float stat_leadlimit;
 
 
 .float stat_leadlimit;
 
index b1394db07e17f9efb76c4e39afa9b4c31f68eb3a..195829b40d00c701f9e95d494b19178caeb1a815 100644 (file)
@@ -349,7 +349,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
                )
        );
        #endif
                )
        );
        #endif
-       
+
        // =======
        // SUICIDE
        // =======
        // =======
        // SUICIDE
        // =======
@@ -370,7 +370,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
                                                Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
                                                break;
                                        }
                                                Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
                                                break;
                                        }
-                                       
+
                                        default:
                                        {
                                                Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
                                        default:
                                        {
                                                Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
@@ -399,7 +399,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
                        GiveFrags(attacker, targ, -1, deathtype);
 
                        attacker.killcount = 0;
                        GiveFrags(attacker, targ, -1, deathtype);
 
                        attacker.killcount = 0;
-                       
+
                        Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAG, targ.netname);
                        Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAGGED, attacker.netname);
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM_4(targ.team, INFO_DEATH_TEAMKILL_), targ.netname, attacker.netname, deathlocation, targ.killcount);
                        Send_Notification(NOTIF_ONE, attacker, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAG, targ.netname);
                        Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_DEATH_TEAMKILL_FRAGGED, attacker.netname);
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM_4(targ.team, INFO_DEATH_TEAMKILL_), targ.netname, attacker.netname, deathlocation, targ.killcount);
@@ -527,7 +527,7 @@ void Obituary(entity attacker, entity inflictor, entity targ, float deathtype)
                                        0);
                                break;
                        }
                                        0);
                                break;
                        }
-                       
+
                        default:
                        {
                                Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
                        default:
                        {
                                Obituary_SpecialDeath(targ, FALSE, deathtype, targ.netname, deathlocation, "", targ.killcount, 0, 0);
@@ -558,7 +558,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 {
        float mirrordamage;
        float mirrorforce;
 {
        float mirrordamage;
        float mirrorforce;
-       float complainteamdamage = 0; 
+       float complainteamdamage = 0;
        entity attacker_save;
        mirrordamage = 0;
        mirrorforce = 0;
        entity attacker_save;
        mirrordamage = 0;
        mirrorforce = 0;
@@ -596,7 +596,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                // exit the vehicle before killing (fixes a crash)
                if(IS_PLAYER(targ) && targ.vehicle)
                        vehicles_exit(VHEF_RELESE);
                // exit the vehicle before killing (fixes a crash)
                if(IS_PLAYER(targ) && targ.vehicle)
                        vehicles_exit(VHEF_RELESE);
-       
+
                // These are ALWAYS lethal
                // No damage modification here
                // Instead, prepare the victim for his death...
                // These are ALWAYS lethal
                // No damage modification here
                // Instead, prepare the victim for his death...
@@ -677,7 +677,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        force = force * g_weaponforcefactor;
                        mirrorforce *= g_weaponforcefactor;
                }
                        force = force * g_weaponforcefactor;
                        mirrorforce *= g_weaponforcefactor;
                }
-               
+
                // should this be changed at all? If so, in what way?
                frag_attacker = attacker;
                frag_target = targ;
                // should this be changed at all? If so, in what way?
                frag_attacker = attacker;
                frag_target = targ;
@@ -689,7 +689,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                damage = frag_damage;
                mirrordamage = frag_mirrordamage;
                force = frag_force;
                damage = frag_damage;
                mirrordamage = frag_mirrordamage;
                force = frag_force;
-               
+
                if (!g_minstagib)
                {
                        // apply strength multiplier
                if (!g_minstagib)
                {
                        // apply strength multiplier
@@ -1098,7 +1098,7 @@ float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
                if(maxtime > mintime || maxdps > mindps)
                {
                        // Constraints:
                if(maxtime > mintime || maxdps > mindps)
                {
                        // Constraints:
-                       
+
                        // damage we have right now
                        mindamage = mindps * mintime;
 
                        // damage we have right now
                        mindamage = mindps * mintime;
 
index 76f7b5b99efa5c452f367b2a48ed6258b62f2668..0df6ba0aee59c4cc5a070ce9f20bdc6da263d50c 100644 (file)
@@ -274,12 +274,12 @@ void GrapplingHook_Damage (entity inflictor, entity attacker, float damage, floa
 {
        if(self.health <= 0)
                return;
 {
        if(self.health <= 0)
                return;
-               
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_balance_projectiledamage says to halt
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_balance_projectiledamage says to halt
-                       
+
        self.health = self.health - damage;
        self.health = self.health - damage;
-               
+
        if (self.health <= 0)
        {
                if(attacker != self.realowner)
        if (self.health <= 0)
        {
                if(attacker != self.realowner)
index 20a78b7c9dec1cb40a0a00bc3a4d395c1ca07dd0..8a2fe9ef3334faf5d067d2ca101ee235428f62df 100644 (file)
@@ -59,7 +59,7 @@ float g_clientmodel_genericsendentity (entity to, float sf)
                sf |= 0x40;
        if(self.lodmodelindex1)
                sf |= 0x80;
                sf |= 0x40;
        if(self.lodmodelindex1)
                sf |= 0x80;
-       
+
        WriteByte(MSG_ENTITY, ENT_CLIENT_WALL);
        WriteByte(MSG_ENTITY, sf);
 
        WriteByte(MSG_ENTITY, ENT_CLIENT_WALL);
        WriteByte(MSG_ENTITY, sf);
 
index d32ab2caf514ff586515a5244b3c4dff1b31ce57..834bb47116551b4a4e013d58189c78a37dc32838 100644 (file)
@@ -14,8 +14,8 @@ void spawnfunc_info_null (void)
 void setanim(entity e, vector anim, float looping, float override, float restart)
 {
        if (!anim)
 void setanim(entity e, vector anim, float looping, float override, float restart)
 {
        if (!anim)
-               return; // no animation was given to us! We can't use this. 
-               
+               return; // no animation was given to us! We can't use this.
+
        if (anim_x == e.animstate_startframe)
        if (anim_y == e.animstate_numframes)
        if (anim_z == e.animstate_framerate)
        if (anim_x == e.animstate_startframe)
        if (anim_y == e.animstate_numframes)
        if (anim_z == e.animstate_framerate)
@@ -294,7 +294,7 @@ void SUB_CalcMove_Bezier (vector tcontrol, vector tdest, float tspeedtype, float
        // the thinking is now done by the controller
        self.think = SUB_NullThink; // for PushMove
        self.nextthink = self.ltime + traveltime;
        // the thinking is now done by the controller
        self.think = SUB_NullThink; // for PushMove
        self.nextthink = self.ltime + traveltime;
-       
+
        // invoke controller
        self = controller;
        self.think();
        // invoke controller
        self = controller;
        self.think();
index 884c3e5b2b83e4c2d3b2e151f6c80b97ff415fbe..c0e81fa8916d66d961ac88c259dca131922c03b4 100644 (file)
@@ -441,7 +441,7 @@ void trigger_hurt_use()
 .float triggerhurttime;
 void trigger_hurt_touch()
 {
 .float triggerhurttime;
 void trigger_hurt_touch()
 {
-       if (self.active != ACTIVE_ACTIVE) 
+       if (self.active != ACTIVE_ACTIVE)
                return;
 
        if(self.team)
                return;
 
        if(self.team)
@@ -532,9 +532,9 @@ float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end)
 .float triggerhealtime;
 void trigger_heal_touch()
 {
 .float triggerhealtime;
 void trigger_heal_touch()
 {
-       if (self.active != ACTIVE_ACTIVE) 
+       if (self.active != ACTIVE_ACTIVE)
                return;
                return;
-       
+
        // only do the EXACTTRIGGER_TOUCH checks when really needed (saves some cpu)
        if (other.iscreature)
        {
        // only do the EXACTTRIGGER_TOUCH checks when really needed (saves some cpu)
        if (other.iscreature)
        {
@@ -544,7 +544,7 @@ void trigger_heal_touch()
                {
                        EXACTTRIGGER_TOUCH;
                        other.triggerhealtime = time + 1;
                {
                        EXACTTRIGGER_TOUCH;
                        other.triggerhealtime = time + 1;
-                       
+
                        if (other.health < self.max_health)
                        {
                                other.health = min(other.health + self.health, self.max_health);
                        if (other.health < self.max_health)
                        {
                                other.health = min(other.health + self.health, self.max_health);
@@ -558,7 +558,7 @@ void trigger_heal_touch()
 void spawnfunc_trigger_heal()
 {
        self.active = ACTIVE_ACTIVE;
 void spawnfunc_trigger_heal()
 {
        self.active = ACTIVE_ACTIVE;
-       
+
        EXACTTRIGGER_INIT;
        self.touch = trigger_heal_touch;
        if (!self.health)
        EXACTTRIGGER_INIT;
        self.touch = trigger_heal_touch;
        if (!self.health)
@@ -942,7 +942,7 @@ void spawnfunc_func_pointparticles()
                setmodel(self, self.model);
        if(self.noise != "")
                precache_sound (self.noise);
                setmodel(self, self.model);
        if(self.noise != "")
                precache_sound (self.noise);
-       
+
        if(!self.bgmscriptsustain)
                self.bgmscriptsustain = 1;
        else if(self.bgmscriptsustain < 0)
        if(!self.bgmscriptsustain)
                self.bgmscriptsustain = 1;
        else if(self.bgmscriptsustain < 0)
@@ -1369,7 +1369,7 @@ void trigger_impulse_touch1()
     float pushdeltatime;
     float str;
 
     float pushdeltatime;
     float str;
 
-       if (self.active != ACTIVE_ACTIVE) 
+       if (self.active != ACTIVE_ACTIVE)
                return;
 
        if (!isPushable(other))
                return;
 
        if (!isPushable(other))
@@ -1409,7 +1409,7 @@ void trigger_impulse_touch2()
 {
     float pushdeltatime;
 
 {
     float pushdeltatime;
 
-       if (self.active != ACTIVE_ACTIVE) 
+       if (self.active != ACTIVE_ACTIVE)
                return;
 
        if (!isPushable(other))
                return;
 
        if (!isPushable(other))
@@ -1433,7 +1433,7 @@ void trigger_impulse_touch3()
     float pushdeltatime;
     float str;
 
     float pushdeltatime;
     float str;
 
-       if (self.active != ACTIVE_ACTIVE) 
+       if (self.active != ACTIVE_ACTIVE)
                return;
 
        if (!isPushable(other))
                return;
 
        if (!isPushable(other))
@@ -1819,7 +1819,7 @@ void spawnfunc_target_voicescript()
        //          added after this message
        // wait: average time between messages
        // delay: initial delay before the first message
        //          added after this message
        // wait: average time between messages
        // delay: initial delay before the first message
-       
+
        float i, n;
        self.use = target_voicescript_use;
 
        float i, n;
        self.use = target_voicescript_use;
 
@@ -1970,7 +1970,7 @@ string trigger_magicear_processmessage(entity ear, entity source, float teamsay,
                        if(ear.spawnflags & 8)
                                return msgin;
        }
                        if(ear.spawnflags & 8)
                                return msgin;
        }
-       
+
        matchstart = -1;
        l = strlen(ear.message);
 
        matchstart = -1;
        l = strlen(ear.message);
 
@@ -2110,9 +2110,9 @@ void spawnfunc_trigger_magicear()
 void relay_activators_use()
 {
        entity trg, os;
 void relay_activators_use()
 {
        entity trg, os;
-       
+
        os = self;
        os = self;
-       
+
        for(trg = world; (trg = find(trg, targetname, os.target)); )
        {
                self = trg;
        for(trg = world; (trg = find(trg, targetname, os.target)); )
        {
                self = trg;
@@ -2124,11 +2124,11 @@ void relay_activators_use()
                        if(os.cnt == ACTIVE_TOGGLE)
                                if(trg.active == ACTIVE_ACTIVE)
                                        trg.active = ACTIVE_NOT;
                        if(os.cnt == ACTIVE_TOGGLE)
                                if(trg.active == ACTIVE_ACTIVE)
                                        trg.active = ACTIVE_NOT;
-                               else    
+                               else
                                        trg.active = ACTIVE_ACTIVE;
                        else
                                trg.active = os.cnt;
                                        trg.active = ACTIVE_ACTIVE;
                        else
                                trg.active = os.cnt;
-               }               
+               }
        }
        self = os;
 }
        }
        self = os;
 }
@@ -2142,13 +2142,13 @@ void spawnfunc_relay_activate()
 void spawnfunc_relay_deactivate()
 {
        self.cnt = ACTIVE_NOT;
 void spawnfunc_relay_deactivate()
 {
        self.cnt = ACTIVE_NOT;
-       self.use = relay_activators_use;        
+       self.use = relay_activators_use;
 }
 
 void spawnfunc_relay_activatetoggle()
 {
        self.cnt = ACTIVE_TOGGLE;
 }
 
 void spawnfunc_relay_activatetoggle()
 {
        self.cnt = ACTIVE_TOGGLE;
-       self.use = relay_activators_use;        
+       self.use = relay_activators_use;
 }
 
 .string chmap, gametype;
 }
 
 .string chmap, gametype;
index e91f52070270f0b5989bf108406dbd017deedc1b..b93d4f53d7aca7cdf52e922673067dd076cd3e90 100644 (file)
@@ -428,7 +428,7 @@ void cvar_changes_init()
                BADCVAR("g_nix");
                BADCVAR("g_grappling_hook");
                BADCVAR("g_jetpack");
                BADCVAR("g_nix");
                BADCVAR("g_grappling_hook");
                BADCVAR("g_jetpack");
-               
+
 #undef BADPREFIX
 #undef BADCVAR
 
 #undef BADPREFIX
 #undef BADCVAR
 
@@ -1514,7 +1514,7 @@ void NextLevel()
                PlayerStats_AddGlobalInfo(e);
        PlayerStats_Shutdown();
        WeaponStats_Shutdown();
                PlayerStats_AddGlobalInfo(e);
        PlayerStats_Shutdown();
        WeaponStats_Shutdown();
-       
+
        Kill_Notification(NOTIF_ALL, world, MSG_CENTER, 0); // kill all centerprints now
 
        if(autocvar_sv_eventlog)
        Kill_Notification(NOTIF_ALL, world, MSG_CENTER, 0); // kill all centerprints now
 
        if(autocvar_sv_eventlog)
index d3ab13459724c077296e352a248445f8d99f0300..a180547c0f97c09cb3632fdeb694e9bece0762a5 100644 (file)
@@ -8,7 +8,7 @@
  *     GET g_ban_sync_uri?action=unban&hostname=...&ip=xxx.xxx.xxx
  * - Querying the ban list
  *     GET g_ban_sync_uri?action=list&hostname=...&servers=xxx.xxx.xxx.xxx;xxx.xxx.xxx.xxx;...
  *     GET g_ban_sync_uri?action=unban&hostname=...&ip=xxx.xxx.xxx
  * - Querying the ban list
  *     GET g_ban_sync_uri?action=list&hostname=...&servers=xxx.xxx.xxx.xxx;xxx.xxx.xxx.xxx;...
- *     
+ *
  *     shows the bans from the listed servers, and possibly others.
  *     Format of a ban is ASCII plain text, four lines per ban, delimited by
  *     newline ONLY (no carriage return):
  *     shows the bans from the listed servers, and possibly others.
  *     Format of a ban is ASCII plain text, four lines per ban, delimited by
  *     newline ONLY (no carriage return):
@@ -114,7 +114,7 @@ void OnlineBanList_URI_Get_Callback(float id, float status, string data)
        }
        if(syncinterval > 0)
                syncinterval *= 60;
        }
        if(syncinterval > 0)
                syncinterval *= 60;
-       
+
        if(status != 0)
        {
                print("error: status is ", ftos(status), "\n");
        if(status != 0)
        {
                print("error: status is ", ftos(status), "\n");
@@ -193,7 +193,7 @@ void OnlineBanList_Think()
        float argc;
        string uri;
        float i, n;
        float argc;
        string uri;
        float i, n;
-       
+
        if(autocvar_g_ban_sync_uri == "")
                goto killme;
        if(autocvar_g_ban_sync_interval == 0) // < 0 is okay, it means "sync on level start only"
        if(autocvar_g_ban_sync_uri == "")
                goto killme;
        if(autocvar_g_ban_sync_interval == 0) // < 0 is okay, it means "sync on level start only"
@@ -208,7 +208,7 @@ void OnlineBanList_Think()
        for(i = 1; i < argc; ++i)
                OnlineBanList_Servers = strcat(OnlineBanList_Servers, ";", argv(i));
        OnlineBanList_Servers = strzone(OnlineBanList_Servers);
        for(i = 1; i < argc; ++i)
                OnlineBanList_Servers = strcat(OnlineBanList_Servers, ";", argv(i));
        OnlineBanList_Servers = strzone(OnlineBanList_Servers);
-       
+
        uri = strcat(     "action=list&hostname=", uri_escape(autocvar_hostname));
        uri = strcat(uri, "&servers=", uri_escape(OnlineBanList_Servers));
 
        uri = strcat(     "action=list&hostname=", uri_escape(autocvar_hostname));
        uri = strcat(uri, "&servers=", uri_escape(OnlineBanList_Servers));
 
@@ -227,7 +227,7 @@ void OnlineBanList_Think()
                else
                        uri_get(strcat(argv(i), "?", uri), URI_GET_IPBAN + i); // 1000 = "banlist" callback target
        }
                else
                        uri_get(strcat(argv(i), "?", uri), URI_GET_IPBAN + i); // 1000 = "banlist" callback target
        }
-       
+
        if(autocvar_g_ban_sync_interval > 0)
                self.nextthink = time + max(60, autocvar_g_ban_sync_interval * 60);
        else
        if(autocvar_g_ban_sync_interval > 0)
                self.nextthink = time + max(60, autocvar_g_ban_sync_interval * 60);
        else
@@ -321,24 +321,24 @@ void Ban_View()
 {
        float i, n;
        string msg;
 {
        float i, n;
        string msg;
-       
+
        print("^2Listing all existing active bans:\n");
        print("^2Listing all existing active bans:\n");
-       
+
        n = 0;
        for(i = 0; i < ban_count; ++i)
        {
                if(time > ban_expire[i])
                        continue;
        n = 0;
        for(i = 0; i < ban_count; ++i)
        {
                if(time > ban_expire[i])
                        continue;
-                       
+
                ++n; // total number of existing bans
                ++n; // total number of existing bans
-                       
+
                msg = strcat("#", ftos(i), ": ");
                msg = strcat(msg, ban_ip[i], " is still banned for ");
                msg = strcat(msg, ftos(ban_expire[i] - time), " seconds");
                msg = strcat("#", ftos(i), ": ");
                msg = strcat(msg, ban_ip[i], " is still banned for ");
                msg = strcat(msg, ftos(ban_expire[i] - time), " seconds");
-               
+
                print("  ", msg, "\n");
        }
                print("  ", msg, "\n");
        }
-       
+
        print("^2Done listing all active (", ftos(n), ") bans.\n");
 }
 
        print("^2Done listing all active (", ftos(n), ") bans.\n");
 }
 
@@ -367,7 +367,7 @@ float Ban_GetClientIP(entity client)
        i4 = strstrofs(s, ".", i3 + 1);
        if(i4 >= 0)
                s = substring(s, 0, i4);
        i4 = strstrofs(s, ".", i3 + 1);
        if(i4 >= 0)
                s = substring(s, 0, i4);
-       
+
        ban_ip1 = substring(s, 0, i1); // 8
        ban_ip2 = substring(s, 0, i2); // 16
        ban_ip3 = substring(s, 0, i3); // 24
        ban_ip1 = substring(s, 0, i1); // 8
        ban_ip2 = substring(s, 0, i2); // 16
        ban_ip3 = substring(s, 0, i3); // 24
index f6c8abce3c611a60328d721414af36aacece7d7c..f181f376448761b3aa8ffd169369d62ba84105c2 100644 (file)
@@ -9,7 +9,7 @@ TODO:
 
 float item_keys_usekey(entity l, entity p) {
        float valid = l.itemkeys & p.itemkeys;
 
 float item_keys_usekey(entity l, entity p) {
        float valid = l.itemkeys & p.itemkeys;
-       
+
        if (!valid) {
                // other has none of the needed keys
                return FALSE;
        if (!valid) {
                // other has none of the needed keys
                return FALSE;
@@ -27,15 +27,15 @@ float item_keys_usekey(entity l, entity p) {
 string item_keys_keylist(float keylist) {
        float base, l;
        string n;
 string item_keys_keylist(float keylist) {
        float base, l;
        string n;
-       
+
        // no keys
        if (!keylist)
                return "";
        // no keys
        if (!keylist)
                return "";
-       
+
        // one key
        if ((keylist & (keylist-1)) != 0)
                return strcat("the ", item_keys_names[lowestbit(keylist)]);
        // one key
        if ((keylist & (keylist-1)) != 0)
                return strcat("the ", item_keys_names[lowestbit(keylist)]);
-       
+
        n = "";
        base = 0;
        while (keylist) {
        n = "";
        base = 0;
        while (keylist) {
@@ -44,11 +44,11 @@ string item_keys_keylist(float keylist) {
                        n = strcat(n, ", the ", item_keys_names[base + l]);
                else
                        n = strcat("the ", item_keys_names[base + l]);
                        n = strcat(n, ", the ", item_keys_names[base + l]);
                else
                        n = strcat("the ", item_keys_names[base + l]);
-               
+
                keylist = bitshift(keylist,  -(l + 1));
                base+= l + 1;
        }
                keylist = bitshift(keylist,  -(l + 1));
                base+= l + 1;
        }
-       
+
        return n;
 }
 
        return n;
 }
 
@@ -65,14 +65,14 @@ item_key
 void item_key_touch(void) {
        if (!IS_PLAYER(other))
                return;
 void item_key_touch(void) {
        if (!IS_PLAYER(other))
                return;
-               
+
        // player already picked up this key
        if (other.itemkeys & self.itemkeys)
                return;
        // player already picked up this key
        if (other.itemkeys & self.itemkeys)
                return;
-       
+
        other.itemkeys |= self.itemkeys;
        play2(other, self.noise);
        other.itemkeys |= self.itemkeys;
        play2(other, self.noise);
-       
+
        centerprint(other, self.message);
 };
 
        centerprint(other, self.message);
 };
 
@@ -81,17 +81,17 @@ void item_key_touch(void) {
  */
 void spawn_item_key() {
        precache_model(self.model);
  */
 void spawn_item_key() {
        precache_model(self.model);
-       
+
        if (self.spawnflags & 1) // FLOATING
                self.noalign = 1;
        if (self.spawnflags & 1) // FLOATING
                self.noalign = 1;
-       
+
        if (self.noalign)
                self.movetype = MOVETYPE_NONE;
        else
                self.movetype = MOVETYPE_TOSS;
        if (self.noalign)
                self.movetype = MOVETYPE_NONE;
        else
                self.movetype = MOVETYPE_TOSS;
-               
+
        precache_sound(self.noise);
        precache_sound(self.noise);
-               
+
        self.mdl = self.model;
        self.effects = EF_LOWPRECISION;
        setmodel(self, self.model);
        self.mdl = self.model;
        self.effects = EF_LOWPRECISION;
        setmodel(self, self.model);
@@ -100,7 +100,7 @@ void spawn_item_key() {
        setsize(self, '-16 -16 -56', '16 16 0');
        self.modelflags |= MF_ROTATE;
        self.solid = SOLID_TRIGGER;
        setsize(self, '-16 -16 -56', '16 16 0');
        self.modelflags |= MF_ROTATE;
        self.solid = SOLID_TRIGGER;
-       
+
        if (!self.noalign)
        {
                // first nudge it off the floor a little bit to avoid math errors
        if (!self.noalign)
        {
                // first nudge it off the floor a little bit to avoid math errors
@@ -116,7 +116,7 @@ void spawn_item_key() {
 /*QUAKED item_key (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING
 A key entity.
 The itemkeys should contain one of the following key IDs:
 /*QUAKED item_key (0 .5 .8) (-16 -16 -24) (16 16 32) FLOATING
 A key entity.
 The itemkeys should contain one of the following key IDs:
-1 - GOLD key - 
+1 - GOLD key -
 2 - SILVER key
 4 - BRONZE key
 8 - RED keycard
 2 - SILVER key
 4 - BRONZE key
 8 - RED keycard
@@ -142,7 +142,7 @@ itemkeys MUST always have exactly one bit set.
 void spawnfunc_item_key() {
        local string _model, _netname;
        local vector _colormod;
 void spawnfunc_item_key() {
        local string _model, _netname;
        local vector _colormod;
-       
+
        // reject this entity if more than one key was set!
        if (self.itemkeys>0 && (self.itemkeys & (self.itemkeys-1)) != 0) {
                objerror("item_key.itemkeys must contain only 1 bit set specifying the key it represents!");
        // reject this entity if more than one key was set!
        if (self.itemkeys>0 && (self.itemkeys & (self.itemkeys-1)) != 0) {
                objerror("item_key.itemkeys must contain only 1 bit set specifying the key it represents!");
@@ -156,32 +156,32 @@ void spawnfunc_item_key() {
                _netname = "GOLD key";
                _colormod = '1 .9 0';
                break;
                _netname = "GOLD key";
                _colormod = '1 .9 0';
                break;
-               
+
        case 2:
                _netname = "SILVER key";
                _colormod = '.9 .9 .9';
                break;
        case 2:
                _netname = "SILVER key";
                _colormod = '.9 .9 .9';
                break;
-               
+
        case 4:
                _netname = "BRONZE key";
                _colormod = '.6 .25 0';
                break;
        case 4:
                _netname = "BRONZE key";
                _colormod = '.6 .25 0';
                break;
-               
+
        case 8:
                _netname = "RED keycard";
                _colormod = '.9 0 0';
                break;
        case 8:
                _netname = "RED keycard";
                _colormod = '.9 0 0';
                break;
-               
+
        case 16:
                _netname = "BLUE keycard";
                _colormod = '0 0 .9';
                break;
        case 16:
                _netname = "BLUE keycard";
                _colormod = '0 0 .9';
                break;
-               
+
        case 32:
                _netname = "GREEN keycard";
                _colormod = '0 .9 0';
                break;
        case 32:
                _netname = "GREEN keycard";
                _colormod = '0 .9 0';
                break;
-       
+
        default:
                _netname = "FLUFFY PINK keycard";
                _colormod = '1 1 1';
        default:
                _netname = "FLUFFY PINK keycard";
                _colormod = '1 1 1';
@@ -192,9 +192,9 @@ void spawnfunc_item_key() {
                        return;
                }
                break;
                        return;
                }
                break;
-               
+
        }
        }
-       
+
        // find default model
 #ifdef GMQCC
        _model = string_null;
        // find default model
 #ifdef GMQCC
        _model = string_null;
@@ -208,30 +208,30 @@ void spawnfunc_item_key() {
                remove(self);
                return;
        }
                remove(self);
                return;
        }
-       
+
        // set defailt netname
        if (self.netname == "")
                self.netname = _netname;
        // set defailt netname
        if (self.netname == "")
                self.netname = _netname;
-       
+
        // set default colormod
        if (!self.colormod)
                self.colormod = _colormod;
        // set default colormod
        if (!self.colormod)
                self.colormod = _colormod;
-       
+
        // set default model
        if (self.model == "")
                self.model = _model;
        // set default model
        if (self.model == "")
                self.model = _model;
-       
+
        // set default pickup message
        if (self.message == "")
                self.message = strzone(strcat("You've picked up the ", self.netname, "!"));
 
        if (self.noise == "")
                self.noise = "misc/itempickup.wav";
        // set default pickup message
        if (self.message == "")
                self.message = strzone(strcat("You've picked up the ", self.netname, "!"));
 
        if (self.noise == "")
                self.noise = "misc/itempickup.wav";
-       
+
        // save the name for later
        item_keys_names[lowestbit(self.itemkeys)] = self.netname;
 
        // save the name for later
        item_keys_names[lowestbit(self.itemkeys)] = self.netname;
 
-       // put the key on the map       
+       // put the key on the map
        spawn_item_key();
 }
 
        spawn_item_key();
 }
 
@@ -283,12 +283,12 @@ trigger_keylock
  */
 void trigger_keylock_trigger(string s) {
        local entity t, stemp, otemp, atemp;
  */
 void trigger_keylock_trigger(string s) {
        local entity t, stemp, otemp, atemp;
-       
+
        stemp = self;
        otemp = other;
        atemp = activator;
        stemp = self;
        otemp = other;
        atemp = activator;
-       
-       
+
+
        for(t = world; (t = find(t, targetname, s)); )
                if (t.use) {
                        self = t;
        for(t = world; (t = find(t, targetname, s)); )
                if (t.use) {
                        self = t;
@@ -296,7 +296,7 @@ void trigger_keylock_trigger(string s) {
                        activator = atemp;
                        self.use();
                }
                        activator = atemp;
                        self.use();
                }
-       
+
        self = stemp;
        other = otemp;
        activator = atemp;
        self = stemp;
        other = otemp;
        activator = atemp;
@@ -313,21 +313,21 @@ void trigger_keylock_kill(string s) {
 
 void trigger_keylock_touch(void) {
        local float key_used, started_delay;
 
 void trigger_keylock_touch(void) {
        local float key_used, started_delay;
-       
+
        key_used = FALSE;
        started_delay = FALSE;
        key_used = FALSE;
        started_delay = FALSE;
-       
+
        // only player may trigger the lock
        if (!IS_PLAYER(other))
                return;
        // only player may trigger the lock
        if (!IS_PLAYER(other))
                return;
-       
-       
+
+
        // check silver key
        if (self.itemkeys)
                key_used = item_keys_usekey(self, other);
        // check silver key
        if (self.itemkeys)
                key_used = item_keys_usekey(self, other);
-       
+
        activator = other;
        activator = other;
-       
+
        if (self.itemkeys) {
                // at least one of the keys is missing
                if (key_used) {
        if (self.itemkeys) {
                // at least one of the keys is missing
                if (key_used) {
@@ -341,7 +341,7 @@ void trigger_keylock_touch(void) {
                        centerprint(other, strcat("You need ", item_keys_keylist(self.itemkeys), "!"));
                        other.key_door_messagetime = time + 2;
                }
                        centerprint(other, strcat("You need ", item_keys_keylist(self.itemkeys), "!"));
                        other.key_door_messagetime = time + 2;
                }
-               
+
                // trigger target2
                if (self.delay <= time || started_delay == TRUE)
                if (self.target2) {
                // trigger target2
                if (self.delay <= time || started_delay == TRUE)
                if (self.target2) {
@@ -353,16 +353,16 @@ void trigger_keylock_touch(void) {
                // all keys were given!
                play2(other, self.noise);
                centerprint(other, self.message);
                // all keys were given!
                play2(other, self.noise);
                centerprint(other, self.message);
-               
+
                if (self.target)
                        trigger_keylock_trigger(self.target);
                if (self.target)
                        trigger_keylock_trigger(self.target);
-                       
+
                if (self.killtarget)
                        trigger_keylock_kill(self.killtarget);
                if (self.killtarget)
                        trigger_keylock_kill(self.killtarget);
-               
+
                remove(self);
        }
                remove(self);
        }
-       
+
 };
 
 /*QUAKED trigger_keylock (.0 .5 .8) ?
 };
 
 /*QUAKED trigger_keylock (.0 .5 .8) ?
@@ -390,10 +390,10 @@ void spawnfunc_trigger_keylock(void) {
                return;
        }
 
                return;
        }
 
-       // set unlocked message 
+       // set unlocked message
        if (self.message == "")
                self.message = "Unlocked!";
        if (self.message == "")
                self.message = "Unlocked!";
-       
+
        // set default unlock noise
        if (self.noise == "") {
                if (self.sounds == 1)
        // set default unlock noise
        if (self.noise == "") {
                if (self.sounds == 1)
@@ -403,26 +403,26 @@ void spawnfunc_trigger_keylock(void) {
                else //if (self.sounds == 3) {
                        self.noise = "misc/trigger1.wav";
        }
                else //if (self.sounds == 3) {
                        self.noise = "misc/trigger1.wav";
        }
-       
+
        // set default use key sound
        if (self.noise1 == "")
                self.noise1 = "misc/decreasevalue.wav";
        // set default use key sound
        if (self.noise1 == "")
                self.noise1 = "misc/decreasevalue.wav";
-       
+
        // set closed sourd
        if (self.noise2 == "")
                self.noise2 = "misc/talk.wav";
        // set closed sourd
        if (self.noise2 == "")
                self.noise2 = "misc/talk.wav";
-       
+
        // delay between triggering message2 and trigger2
        if (!self.wait)
                self.wait = 5;
        // delay between triggering message2 and trigger2
        if (!self.wait)
                self.wait = 5;
-       
+
        // precache sounds
        precache_sound(self.noise);
        precache_sound(self.noise1);
        precache_sound(self.noise2);
        // precache sounds
        precache_sound(self.noise);
        precache_sound(self.noise1);
        precache_sound(self.noise2);
-       
+
        EXACTTRIGGER_INIT;
        EXACTTRIGGER_INIT;
-       
+
        self.touch = trigger_keylock_touch;
 };
 
        self.touch = trigger_keylock_touch;
 };
 
index c1298d0e7f0f9853d7da7be2dc3730bdb7d22ae2..947a6b92aba7b31bc9926fc056b0f9a6c302c88d 100644 (file)
@@ -648,16 +648,16 @@ float want_weapon(string cvarprefix, entity weaponinfo, float allguns)
                d = 0; // weapon is set a few lines later
        else
                d = (i == WEP_LASER || i == WEP_SHOTGUN);
                d = 0; // weapon is set a few lines later
        else
                d = (i == WEP_LASER || i == WEP_SHOTGUN);
-               
+
        if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook
                d |= (i == WEP_HOOK);
        if(weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED) // never default mutator blocked guns
                d = 0;
 
        var float t = cvar(strcat(cvarprefix, weaponinfo.netname));
        if(g_grappling_hook) // if possible, redirect off-hand hook to on-hand hook
                d |= (i == WEP_HOOK);
        if(weaponinfo.spawnflags & WEP_FLAG_MUTATORBLOCKED) // never default mutator blocked guns
                d = 0;
 
        var float t = cvar(strcat(cvarprefix, weaponinfo.netname));
-       
+
        //print(strcat("want_weapon: ", weaponinfo.netname, " - d: ", ftos(d), ", t: ", ftos(t), ". \n"));
        //print(strcat("want_weapon: ", weaponinfo.netname, " - d: ", ftos(d), ", t: ", ftos(t), ". \n"));
-       
+
        // bit order in t:
        // 1: want or not
        // 2: is default?
        // bit order in t:
        // 1: want or not
        // 2: is default?
@@ -789,7 +789,7 @@ void readplayerstartcvars()
 
        if(!cvar("g_use_ammunition"))
                start_items |= IT_UNLIMITED_AMMO;
 
        if(!cvar("g_use_ammunition"))
                start_items |= IT_UNLIMITED_AMMO;
-       
+
        if(start_items & IT_UNLIMITED_WEAPON_AMMO)
        {
                start_ammo_rockets = 999;
        if(start_items & IT_UNLIMITED_WEAPON_AMMO)
        {
                start_ammo_rockets = 999;
@@ -907,7 +907,7 @@ void readlevelcvars(void)
        // load mutators
        #define CHECK_MUTATOR_ADD(mut_cvar,mut_name,dependence) \
                { if(cvar(mut_cvar) && dependence) { MUTATOR_ADD(mut_name); } }
        // load mutators
        #define CHECK_MUTATOR_ADD(mut_cvar,mut_name,dependence) \
                { if(cvar(mut_cvar) && dependence) { MUTATOR_ADD(mut_name); } }
-               
+
        CHECK_MUTATOR_ADD("g_dodging", mutator_dodging, 1);
        CHECK_MUTATOR_ADD("g_spawn_near_teammate", mutator_spawn_near_teammate, 1);
        CHECK_MUTATOR_ADD("g_physical_items", mutator_physical_items, 1);
        CHECK_MUTATOR_ADD("g_dodging", mutator_dodging, 1);
        CHECK_MUTATOR_ADD("g_spawn_near_teammate", mutator_spawn_near_teammate, 1);
        CHECK_MUTATOR_ADD("g_physical_items", mutator_physical_items, 1);
@@ -928,9 +928,9 @@ void readlevelcvars(void)
        CHECK_MUTATOR_ADD("g_nades", mutator_nades, 1);
        CHECK_MUTATOR_ADD("g_sandbox", sandbox, 1);
        CHECK_MUTATOR_ADD("g_campcheck", mutator_campcheck, 1);
        CHECK_MUTATOR_ADD("g_nades", mutator_nades, 1);
        CHECK_MUTATOR_ADD("g_sandbox", sandbox, 1);
        CHECK_MUTATOR_ADD("g_campcheck", mutator_campcheck, 1);
-       
+
        #undef CHECK_MUTATOR_ADD
        #undef CHECK_MUTATOR_ADD
-       
+
        if(cvar("sv_allow_fullbright"))
                serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
 
        if(cvar("sv_allow_fullbright"))
                serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
 
@@ -949,7 +949,7 @@ void readlevelcvars(void)
     g_bugrigs_speed_ref = cvar("g_bugrigs_speed_ref");
     g_bugrigs_speed_pow = cvar("g_bugrigs_speed_pow");
     g_bugrigs_steer = cvar("g_bugrigs_steer");
     g_bugrigs_speed_ref = cvar("g_bugrigs_speed_ref");
     g_bugrigs_speed_pow = cvar("g_bugrigs_speed_pow");
     g_bugrigs_steer = cvar("g_bugrigs_steer");
-       
+
        g_minstagib = cvar("g_minstagib");
 
        sv_clones = cvar("sv_clones");
        g_minstagib = cvar("g_minstagib");
 
        sv_clones = cvar("sv_clones");
@@ -1818,7 +1818,7 @@ string uid2name(string myuid) {
                        db_put(ServerProgsDB, strcat("uid2name", myuid), "");
                }
        }
                        db_put(ServerProgsDB, strcat("uid2name", myuid), "");
                }
        }
-       
+
        if(s == "")
                s = "^1Unregistered Player";
        return s;
        if(s == "")
                s = "^1Unregistered Player";
        return s;
index 9b9f7fde01abe5dc22dcd51310665c265aa15e6d..de82b16a8ab1f793623514e24cb38639430deb4f 100644 (file)
@@ -1,4 +1,4 @@
-#ifdef SVQC 
+#ifdef SVQC
 .vector moveto;
 
 /**
 .vector moveto;
 
 /**
index 98a44944dd7d7c84c3c4c0a478e97b14c02203d8..893ebb301ff439ffbed18757f6da29cc95cf92b8 100644 (file)
@@ -72,7 +72,7 @@ MUTATOR_HOOKABLE(PlayerDies);
                entity frag_attacker;
                entity frag_target; // same as self
                float frag_deathtype;
                entity frag_attacker;
                entity frag_target; // same as self
                float frag_deathtype;
-               
+
 MUTATOR_HOOKABLE(PlayerJump);
        // called when a player presses the jump key
        // INPUT, OUTPUT:
 MUTATOR_HOOKABLE(PlayerJump);
        // called when a player presses the jump key
        // INPUT, OUTPUT:
@@ -114,7 +114,7 @@ MUTATOR_HOOKABLE(BuildMutatorsPrettyString);
        // appends ", Mutator name" to ret_string for display
        // INPUT, OUTPUT:
                string ret_string;
        // appends ", Mutator name" to ret_string for display
        // INPUT, OUTPUT:
                string ret_string;
-               
+
 MUTATOR_HOOKABLE(CustomizeWaypoint);
        // called every frame
        // customizes the waypoint for spectators
 MUTATOR_HOOKABLE(CustomizeWaypoint);
        // called every frame
        // customizes the waypoint for spectators
@@ -127,7 +127,7 @@ MUTATOR_HOOKABLE(FilterItem);
 MUTATOR_HOOKABLE(TurretSpawn);
        // return error to request removal
        // INPUT: self - turret
 MUTATOR_HOOKABLE(TurretSpawn);
        // return error to request removal
        // INPUT: self - turret
-       
+
 MUTATOR_HOOKABLE(OnEntityPreSpawn);
        // return error to prevent entity spawn, or modify the entity
 
 MUTATOR_HOOKABLE(OnEntityPreSpawn);
        // return error to prevent entity spawn, or modify the entity
 
@@ -163,7 +163,7 @@ MUTATOR_HOOKABLE(PlayerDamage_SplitHealthArmor);
        // INPUT, OUTPUT:
                float damage_take;
                float damage_save;
        // INPUT, OUTPUT:
                float damage_take;
                float damage_save;
-               
+
 MUTATOR_HOOKABLE(PlayerDamage_Calculate);
        // called to adjust damage and force values which are applied to the player, used for e.g. strength damage/force multiplier
        // i'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).
 MUTATOR_HOOKABLE(PlayerDamage_Calculate);
        // called to adjust damage and force values which are applied to the player, used for e.g. strength damage/force multiplier
        // i'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).
@@ -180,7 +180,7 @@ MUTATOR_HOOKABLE(PlayerPowerups);
        // called at the end of player_powerups() in cl_client.qc, used for manipulating the values which are set by powerup items.
        // INPUT
        entity self;
        // called at the end of player_powerups() in cl_client.qc, used for manipulating the values which are set by powerup items.
        // INPUT
        entity self;
-       float olditems; // also technically output, but since it is at the end of the function it's useless for that :P 
+       float olditems; // also technically output, but since it is at the end of the function it's useless for that :P
 
 MUTATOR_HOOKABLE(PlayerUseKey);
        // called when the use key is pressed
 
 MUTATOR_HOOKABLE(PlayerUseKey);
        // called when the use key is pressed
@@ -231,7 +231,7 @@ MUTATOR_HOOKABLE(SV_StartFrame);
 MUTATOR_HOOKABLE(SetModname);
        // OUT
        string modname; // name of the mutator/mod if it warrants showing as such in the server browser
 MUTATOR_HOOKABLE(SetModname);
        // OUT
        string modname; // name of the mutator/mod if it warrants showing as such in the server browser
-       
+
 MUTATOR_HOOKABLE(Item_Spawn);
        // called for each item being spawned on a map, including dropped weapons
        // return 1 to remove an item
 MUTATOR_HOOKABLE(Item_Spawn);
        // called for each item being spawned on a map, including dropped weapons
        // return 1 to remove an item
@@ -244,13 +244,13 @@ MUTATOR_HOOKABLE(SetWeaponreplace);
                entity other; // weapon info
        // IN+OUT
                string ret_string;
                entity other; // weapon info
        // IN+OUT
                string ret_string;
-               
+
 MUTATOR_HOOKABLE(Item_RespawnCountdown);
        // called when an item is about to respawn
        // INPUT+OUTPUT:
        string item_name;
        vector item_color;
 MUTATOR_HOOKABLE(Item_RespawnCountdown);
        // called when an item is about to respawn
        // INPUT+OUTPUT:
        string item_name;
        vector item_color;
-               
+
 MUTATOR_HOOKABLE(BotShouldAttack);
        // called when a bot checks a target to attack
        // INPUT
 MUTATOR_HOOKABLE(BotShouldAttack);
        // called when a bot checks a target to attack
        // INPUT
@@ -261,7 +261,7 @@ MUTATOR_HOOKABLE(PortalTeleport);
        // allows you to strip a player of an item if they go through the teleporter to help prevent cheating
        // INPUT
        entity self;
        // allows you to strip a player of an item if they go through the teleporter to help prevent cheating
        // INPUT
        entity self;
-       
+
 MUTATOR_HOOKABLE(HelpMePing);
        // called whenever a player uses impulse 33 (help me) in cl_impulse.qc
        // normally help me ping uses self.waypointsprite_attachedforcarrier,
 MUTATOR_HOOKABLE(HelpMePing);
        // called whenever a player uses impulse 33 (help me) in cl_impulse.qc
        // normally help me ping uses self.waypointsprite_attachedforcarrier,
@@ -269,32 +269,32 @@ MUTATOR_HOOKABLE(HelpMePing);
        // in a special manner using this hook
        // INPUT
        entity self; // the player who pressed impulse 33
        // in a special manner using this hook
        // INPUT
        entity self; // the player who pressed impulse 33
-       
+
 MUTATOR_HOOKABLE(VehicleSpawn);
        // called when a vehicle initializes
        // return TRUE to remove the vehicle
 MUTATOR_HOOKABLE(VehicleSpawn);
        // called when a vehicle initializes
        // return TRUE to remove the vehicle
-       
+
 MUTATOR_HOOKABLE(VehicleEnter);
        // called when a player enters a vehicle
        // allows mutators to set special settings in this event
        // INPUT
        entity vh_player; // player
        entity vh_vehicle; // vehicle
 MUTATOR_HOOKABLE(VehicleEnter);
        // called when a player enters a vehicle
        // allows mutators to set special settings in this event
        // INPUT
        entity vh_player; // player
        entity vh_vehicle; // vehicle
-       
+
 MUTATOR_HOOKABLE(VehicleTouch);
        // called when a player touches a vehicle
        // return TRUE to stop player from entering the vehicle
        // INPUT
        entity self; // vehicle
        entity other; // player
 MUTATOR_HOOKABLE(VehicleTouch);
        // called when a player touches a vehicle
        // return TRUE to stop player from entering the vehicle
        // INPUT
        entity self; // vehicle
        entity other; // player
-       
+
 MUTATOR_HOOKABLE(VehicleExit);
        // called when a player exits a vehicle
        // allows mutators to set special settings in this event
        // INPUT
        entity vh_player; // player
        entity vh_vehicle; // vehicle
 MUTATOR_HOOKABLE(VehicleExit);
        // called when a player exits a vehicle
        // allows mutators to set special settings in this event
        // INPUT
        entity vh_player; // player
        entity vh_vehicle; // vehicle
-       
+
 MUTATOR_HOOKABLE(AbortSpeedrun);
        // called when a speedrun is aborted and the player is teleported back to start position
        // INPUT
 MUTATOR_HOOKABLE(AbortSpeedrun);
        // called when a speedrun is aborted and the player is teleported back to start position
        // INPUT
index bb6312ea1f7593f414977604b763e5c58e00543c..2a9e677a29d96e0075f70e2ca1281506f2cbb5ae 100644 (file)
@@ -242,7 +242,7 @@ MUTATOR_HOOKFUNCTION(arena_FilterItem)
        if(autocvar_g_powerups <= 0)
        if(self.flags & FL_POWERUP)
                return TRUE;
        if(autocvar_g_powerups <= 0)
        if(self.flags & FL_POWERUP)
                return TRUE;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
index ceeb51dd98f45886e97d2ffcfbd8609d238fae89..0325067f28fb396d795c693ba8608524ba473dc1 100644 (file)
@@ -267,7 +267,7 @@ void assault_new_round()
 void spawnfunc_info_player_attacker()
 {
        if (!g_assault) { remove(self); return; }
 void spawnfunc_info_player_attacker()
 {
        if (!g_assault) { remove(self); return; }
-       
+
        self.team = NUM_TEAM_1; // red, gets swapped every round
        spawnfunc_info_player_deathmatch();
 }
        self.team = NUM_TEAM_1; // red, gets swapped every round
        spawnfunc_info_player_deathmatch();
 }
@@ -275,7 +275,7 @@ void spawnfunc_info_player_attacker()
 void spawnfunc_info_player_defender()
 {
        if (!g_assault) { remove(self); return; }
 void spawnfunc_info_player_defender()
 {
        if (!g_assault) { remove(self); return; }
-       
+
        self.team = NUM_TEAM_2; // blue, gets swapped every round
        spawnfunc_info_player_deathmatch();
 }
        self.team = NUM_TEAM_2; // blue, gets swapped every round
        spawnfunc_info_player_deathmatch();
 }
@@ -283,7 +283,7 @@ void spawnfunc_info_player_defender()
 void spawnfunc_target_objective()
 {
        if (!g_assault) { remove(self); return; }
 void spawnfunc_target_objective()
 {
        if (!g_assault) { remove(self); return; }
-       
+
        self.classname = "target_objective";
        self.use = assault_objective_use;
        assault_objective_reset();
        self.classname = "target_objective";
        self.use = assault_objective_use;
        assault_objective_reset();
@@ -312,10 +312,10 @@ void spawnfunc_target_objective_decrease()
 void spawnfunc_func_assault_destructible()
 {
        if (!g_assault) { remove(self); return; }
 void spawnfunc_func_assault_destructible()
 {
        if (!g_assault) { remove(self); return; }
-       
+
        self.spawnflags = 3;
        self.classname = "func_assault_destructible";
        self.spawnflags = 3;
        self.classname = "func_assault_destructible";
-       
+
        if(assault_attacker_team == NUM_TEAM_1)
                self.team = NUM_TEAM_2;
        else
        if(assault_attacker_team == NUM_TEAM_1)
                self.team = NUM_TEAM_2;
        else
@@ -327,7 +327,7 @@ void spawnfunc_func_assault_destructible()
 void spawnfunc_func_assault_wall()
 {
        if (!g_assault) { remove(self); return; }
 void spawnfunc_func_assault_wall()
 {
        if (!g_assault) { remove(self); return; }
-       
+
        self.classname = "func_assault_wall";
        self.mdl = self.model;
        setmodel(self, self.mdl);
        self.classname = "func_assault_wall";
        self.mdl = self.model;
        setmodel(self, self.mdl);
@@ -351,7 +351,7 @@ void spawnfunc_target_assault_roundend()
 void spawnfunc_target_assault_roundstart()
 {
        if (!g_assault) { remove(self); return; }
 void spawnfunc_target_assault_roundstart()
 {
        if (!g_assault) { remove(self); return; }
-       
+
        assault_attacker_team = NUM_TEAM_1;
        self.classname = "target_assault_roundstart";
        self.use = assault_roundstart_use;
        assault_attacker_team = NUM_TEAM_1;
        self.classname = "target_assault_roundstart";
        self.use = assault_roundstart_use;
@@ -549,7 +549,7 @@ MUTATOR_HOOKFUNCTION(assault_PlayerSpawn)
                centerprint(self, "You are attacking!");
        else
                centerprint(self, "You are defending!");
                centerprint(self, "You are attacking!");
        else
                centerprint(self, "You are defending!");
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -589,7 +589,7 @@ MUTATOR_DEFINITION(gamemode_assault)
        MUTATOR_HOOK(TurretSpawn, assault_TurretSpawn, CBC_ORDER_ANY);
        MUTATOR_HOOK(VehicleSpawn, assault_VehicleSpawn, CBC_ORDER_ANY);
        MUTATOR_HOOK(HavocBot_ChooseRule, assault_BotRoles, CBC_ORDER_ANY);
        MUTATOR_HOOK(TurretSpawn, assault_TurretSpawn, CBC_ORDER_ANY);
        MUTATOR_HOOK(VehicleSpawn, assault_VehicleSpawn, CBC_ORDER_ANY);
        MUTATOR_HOOK(HavocBot_ChooseRule, assault_BotRoles, CBC_ORDER_ANY);
-       
+
        MUTATOR_ONADD
        {
                if(time > 1) // game loads at time 1
        MUTATOR_ONADD
        {
                if(time > 1) // game loads at time 1
index f55c46e00ad5e34468bdfaae2e614227e7702aba..9fbd483cabacd754e3fc22063d322533923aa9ae 100644 (file)
@@ -232,7 +232,7 @@ MUTATOR_HOOKFUNCTION(ca_SetStartItems)
        start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
        start_ammo_cells = cvar("g_lms_start_ammo_cells");
        start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
        start_ammo_rockets = cvar("g_lms_start_ammo_rockets");
        start_ammo_cells = cvar("g_lms_start_ammo_cells");
        start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
-       
+
        start_items &= ~IT_UNLIMITED_AMMO;
 
        return 0;
        start_items &= ~IT_UNLIMITED_AMMO;
 
        return 0;
@@ -244,9 +244,9 @@ MUTATOR_HOOKFUNCTION(ca_PlayerDamage)
        if(frag_target.deadflag == DEAD_NO)
        if(frag_target == frag_attacker || SAME_TEAM(frag_target, frag_attacker) || frag_deathtype == DEATH_FALL)
                frag_damage = 0;
        if(frag_target.deadflag == DEAD_NO)
        if(frag_target == frag_attacker || SAME_TEAM(frag_target, frag_attacker) || frag_deathtype == DEATH_FALL)
                frag_damage = 0;
-               
+
        frag_mirrordamage = 0;
        frag_mirrordamage = 0;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -255,20 +255,20 @@ MUTATOR_HOOKFUNCTION(ca_FilterItem)
        if(autocvar_g_powerups <= 0)
        if(self.flags & FL_POWERUP)
                return TRUE;
        if(autocvar_g_powerups <= 0)
        if(self.flags & FL_POWERUP)
                return TRUE;
-               
+
        if(autocvar_g_pickup_items <= 0)
                return TRUE;
        if(autocvar_g_pickup_items <= 0)
                return TRUE;
-               
+
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(ca_PlayerDamage_SplitHealthArmor)
 {
        float excess = max(0, frag_damage - damage_take - damage_save);
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(ca_PlayerDamage_SplitHealthArmor)
 {
        float excess = max(0, frag_damage - damage_take - damage_save);
-       
+
        if(frag_target != frag_attacker && IS_PLAYER(frag_attacker))
                PlayerTeamScore_Add(frag_attacker, SP_SCORE, ST_SCORE, (frag_damage - excess) * autocvar_g_ca_damage2score_multiplier);
        if(frag_target != frag_attacker && IS_PLAYER(frag_attacker))
                PlayerTeamScore_Add(frag_attacker, SP_SCORE, ST_SCORE, (frag_damage - excess) * autocvar_g_ca_damage2score_multiplier);
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
index 42e7b6294f0792de6b45a1eae4aeb7dd9191a539..19cc563f80358df8760b3e176adf7f4963ee0cfe 100644 (file)
@@ -25,20 +25,20 @@ void ctf_CaptureRecord(entity flag, entity player)
        float cap_record = ctf_captimerecord;
        float cap_time = (time - flag.ctf_pickuptime);
        string refername = db_get(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"));
        float cap_record = ctf_captimerecord;
        float cap_time = (time - flag.ctf_pickuptime);
        string refername = db_get(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"));
-       
+
        // notify about shit
        if(!ctf_captimerecord) { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_2(flag, CHOICE_CTF_CAPTURE_TIME_), player.netname, (cap_time * 100)); }
        else if(cap_time < cap_record) { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_2(flag, CHOICE_CTF_CAPTURE_BROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); }
        else { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_2(flag, CHOICE_CTF_CAPTURE_UNBROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); }
        // notify about shit
        if(!ctf_captimerecord) { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_2(flag, CHOICE_CTF_CAPTURE_TIME_), player.netname, (cap_time * 100)); }
        else if(cap_time < cap_record) { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_2(flag, CHOICE_CTF_CAPTURE_BROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); }
        else { Send_Notification(NOTIF_ALL, world, MSG_CHOICE, APP_TEAM_ENT_2(flag, CHOICE_CTF_CAPTURE_UNBROKEN_), player.netname, refername, (cap_time * 100), (cap_record * 100)); }
-       
+
        // write that shit in the database
        if((!ctf_captimerecord) || (cap_time < cap_record))
        {
                ctf_captimerecord = cap_time;
                db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/time"), ftos(cap_time));
                db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"), player.netname);
        // write that shit in the database
        if((!ctf_captimerecord) || (cap_time < cap_record))
        {
                ctf_captimerecord = cap_time;
                db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/time"), ftos(cap_time));
                db_put(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"), player.netname);
-               write_recordmarker(player, (time - cap_time), cap_time); 
-       } 
+               write_recordmarker(player, (time - cap_time), cap_time);
+       }
 }
 
 void ctf_FlagcarrierWaypoints(entity player)
 }
 
 void ctf_FlagcarrierWaypoints(entity player)
@@ -92,7 +92,7 @@ float ctf_CheckPassDirection(vector head_center, vector passer_center, vector pa
                float ang; // angle between shotdir and h
                float h; // hypotenuse, which is the distance between attacker to head
                float a; // adjacent side, which is the distance between attacker and the point on w_shotdir that is closest to head.origin
                float ang; // angle between shotdir and h
                float h; // hypotenuse, which is the distance between attacker to head
                float a; // adjacent side, which is the distance between attacker and the point on w_shotdir that is closest to head.origin
-               
+
                h = vlen(head_center - passer_center);
                ang = acos(dotproduct(normalize(head_center - passer_center), v_forward));
                a = h * cos(ang);
                h = vlen(head_center - passer_center);
                ang = acos(dotproduct(normalize(head_center - passer_center), v_forward));
                a = h * cos(ang);
@@ -113,10 +113,10 @@ float ctf_CheckPassDirection(vector head_center, vector passer_center, vector pa
 
 
 // =======================
 
 
 // =======================
-// CaptureShield Functions 
+// CaptureShield Functions
 // =======================
 
 // =======================
 
-float ctf_CaptureShield_CheckStatus(entity p) 
+float ctf_CaptureShield_CheckStatus(entity p)
 {
        float s, se;
        entity e;
 {
        float s, se;
        entity e;
@@ -142,7 +142,7 @@ float ctf_CaptureShield_CheckStatus(entity p)
 
        // player is in the worse half, if >= half the players are better than him, or consequently, if < half of the players are worse
        // use this rule here
 
        // player is in the worse half, if >= half the players are better than him, or consequently, if < half of the players are worse
        // use this rule here
-       
+
        if(players_worseeq >= players_total * ctf_captureshield_max_ratio)
                return FALSE;
 
        if(players_worseeq >= players_total * ctf_captureshield_max_ratio)
                return FALSE;
 
@@ -163,7 +163,7 @@ float ctf_CaptureShield_Customize()
 {
        if(!other.ctf_captureshielded) { return FALSE; }
        if(SAME_TEAM(self, other)) { return FALSE; }
 {
        if(!other.ctf_captureshielded) { return FALSE; }
        if(SAME_TEAM(self, other)) { return FALSE; }
-       
+
        return TRUE;
 }
 
        return TRUE;
 }
 
@@ -171,7 +171,7 @@ void ctf_CaptureShield_Touch()
 {
        if(!other.ctf_captureshielded) { return; }
        if(SAME_TEAM(self, other)) { return; }
 {
        if(!other.ctf_captureshielded) { return; }
        if(SAME_TEAM(self, other)) { return; }
-       
+
        vector mymid = (self.absmin + self.absmax) * 0.5;
        vector othermid = (other.absmin + other.absmax) * 0.5;
 
        vector mymid = (self.absmin + self.absmax) * 0.5;
        vector othermid = (other.absmin + other.absmax) * 0.5;
 
@@ -182,7 +182,7 @@ void ctf_CaptureShield_Touch()
 void ctf_CaptureShield_Spawn(entity flag)
 {
        entity shield = spawn();
 void ctf_CaptureShield_Spawn(entity flag)
 {
        entity shield = spawn();
-       
+
        shield.enemy = self;
        shield.team = self.team;
        shield.touch = ctf_CaptureShield_Touch;
        shield.enemy = self;
        shield.team = self.team;
        shield.touch = ctf_CaptureShield_Touch;
@@ -193,7 +193,7 @@ void ctf_CaptureShield_Spawn(entity flag)
        shield.solid = SOLID_TRIGGER;
        shield.avelocity = '7 0 11';
        shield.scale = 0.5;
        shield.solid = SOLID_TRIGGER;
        shield.avelocity = '7 0 11';
        shield.scale = 0.5;
-       
+
        setorigin(shield, self.origin);
        setmodel(shield, "models/ctf/shield.md3");
        setsize(shield, shield.scale * shield.mins, shield.scale * shield.maxs);
        setorigin(shield, self.origin);
        setmodel(shield, "models/ctf/shield.md3");
        setsize(shield, shield.scale * shield.mins, shield.scale * shield.maxs);
@@ -217,16 +217,16 @@ void ctf_Handle_Drop(entity flag, entity player, float droptype)
        flag.ctf_droptime = time;
        flag.ctf_dropper = player;
        flag.ctf_status = FLAG_DROPPED;
        flag.ctf_droptime = time;
        flag.ctf_dropper = player;
        flag.ctf_status = FLAG_DROPPED;
-       
+
        // messages and sounds
        Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_LOST_), player.netname);
        sound(flag, CH_TRIGGER, flag.snd_flag_dropped, VOL_BASE, ATTEN_NONE);
        ctf_EventLog("dropped", player.team, player);
 
        // scoring
        // messages and sounds
        Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_LOST_), player.netname);
        sound(flag, CH_TRIGGER, flag.snd_flag_dropped, VOL_BASE, ATTEN_NONE);
        ctf_EventLog("dropped", player.team, player);
 
        // scoring
-       PlayerTeamScore_AddScore(player, -autocvar_g_ctf_score_penalty_drop);   
+       PlayerTeamScore_AddScore(player, -autocvar_g_ctf_score_penalty_drop);
        PlayerScore_Add(player, SP_CTF_DROPS, 1);
        PlayerScore_Add(player, SP_CTF_DROPS, 1);
-       
+
        // waypoints
        if(autocvar_g_ctf_flag_dropped_waypoint)
                WaypointSprite_Spawn("flagdropped", 0, 0, flag, FLAG_WAYPOINT_OFFSET, world, ((autocvar_g_ctf_flag_dropped_waypoint == 2) ? 0 : player.team), flag, wps_flagdropped, TRUE, RADARICON_FLAG, WPCOLOR_DROPPEDFLAG(flag.team));
        // waypoints
        if(autocvar_g_ctf_flag_dropped_waypoint)
                WaypointSprite_Spawn("flagdropped", 0, 0, flag, FLAG_WAYPOINT_OFFSET, world, ((autocvar_g_ctf_flag_dropped_waypoint == 2) ? 0 : player.team), flag, wps_flagdropped, TRUE, RADARICON_FLAG, WPCOLOR_DROPPEDFLAG(flag.team));
@@ -236,9 +236,9 @@ void ctf_Handle_Drop(entity flag, entity player, float droptype)
                WaypointSprite_UpdateMaxHealth(flag.wps_flagdropped, flag.max_flag_health);
                WaypointSprite_UpdateHealth(flag.wps_flagdropped, flag.health);
        }
                WaypointSprite_UpdateMaxHealth(flag.wps_flagdropped, flag.max_flag_health);
                WaypointSprite_UpdateHealth(flag.wps_flagdropped, flag.health);
        }
-       
+
        player.throw_antispam = time + autocvar_g_ctf_pass_wait;
        player.throw_antispam = time + autocvar_g_ctf_pass_wait;
-       
+
        if(droptype == DROP_PASS)
        {
                flag.pass_distance = 0;
        if(droptype == DROP_PASS)
        {
                flag.pass_distance = 0;
@@ -251,11 +251,11 @@ void ctf_Handle_Retrieve(entity flag, entity player)
 {
        entity tmp_player; // temporary entity which the FOR_EACH_PLAYER loop uses to scan players
        entity sender = flag.pass_sender;
 {
        entity tmp_player; // temporary entity which the FOR_EACH_PLAYER loop uses to scan players
        entity sender = flag.pass_sender;
-       
+
        // transfer flag to player
        flag.owner = player;
        flag.owner.flagcarried = flag;
        // transfer flag to player
        flag.owner = player;
        flag.owner.flagcarried = flag;
-       
+
        // reset flag
        setattachment(flag, player, "");
        setorigin(flag, FLAG_CARRY_OFFSET);
        // reset flag
        setattachment(flag, player, "");
        setorigin(flag, FLAG_CARRY_OFFSET);
@@ -268,7 +268,7 @@ void ctf_Handle_Retrieve(entity flag, entity player)
        // messages and sounds
        sound(player, CH_TRIGGER, flag.snd_flag_pass, VOL_BASE, ATTEN_NORM);
        ctf_EventLog("receive", flag.team, player);
        // messages and sounds
        sound(player, CH_TRIGGER, flag.snd_flag_pass, VOL_BASE, ATTEN_NORM);
        ctf_EventLog("receive", flag.team, player);
-       
+
        FOR_EACH_REALPLAYER(tmp_player)
        {
                if(tmp_player == sender)
        FOR_EACH_REALPLAYER(tmp_player)
        {
                if(tmp_player == sender)
@@ -278,10 +278,10 @@ void ctf_Handle_Retrieve(entity flag, entity player)
                else if(SAME_TEAM(tmp_player, sender))
                        Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_OTHER_), sender.netname, player.netname);
        }
                else if(SAME_TEAM(tmp_player, sender))
                        Send_Notification(NOTIF_ONE, tmp_player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PASS_OTHER_), sender.netname, player.netname);
        }
-       
+
        // create new waypoint
        ctf_FlagcarrierWaypoints(player);
        // create new waypoint
        ctf_FlagcarrierWaypoints(player);
-       
+
        sender.throw_antispam = time + autocvar_g_ctf_pass_wait;
        player.throw_antispam = sender.throw_antispam;
 
        sender.throw_antispam = time + autocvar_g_ctf_pass_wait;
        player.throw_antispam = sender.throw_antispam;
 
@@ -294,12 +294,12 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype)
 {
        entity flag = player.flagcarried;
        vector targ_origin, flag_velocity;
 {
        entity flag = player.flagcarried;
        vector targ_origin, flag_velocity;
-       
+
        if(!flag) { return; }
        if((droptype == DROP_PASS) && !receiver) { return; }
        if(!flag) { return; }
        if((droptype == DROP_PASS) && !receiver) { return; }
-       
+
        if(flag.speedrunning) { ctf_RespawnFlag(flag); return; }
        if(flag.speedrunning) { ctf_RespawnFlag(flag); return; }
-       
+
        // reset the flag
        setattachment(flag, world, "");
        setorigin(flag, player.origin + FLAG_DROP_OFFSET);
        // reset the flag
        setattachment(flag, world, "");
        setorigin(flag, player.origin + FLAG_DROP_OFFSET);
@@ -308,9 +308,9 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype)
        flag.solid = SOLID_TRIGGER;
        flag.ctf_dropper = player;
        flag.ctf_droptime = time;
        flag.solid = SOLID_TRIGGER;
        flag.ctf_dropper = player;
        flag.ctf_droptime = time;
-       
+
        flag.flags = FL_ITEM | FL_NOTARGET; // clear FL_ONGROUND for MOVETYPE_TOSS
        flag.flags = FL_ITEM | FL_NOTARGET; // clear FL_ONGROUND for MOVETYPE_TOSS
-       
+
        switch(droptype)
        {
                case DROP_PASS:
        switch(droptype)
        {
                case DROP_PASS:
@@ -331,30 +331,30 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype)
                        flag.pass_sender = player;
                        flag.pass_target = receiver;
                        flag.ctf_status = FLAG_PASSING;
                        flag.pass_sender = player;
                        flag.pass_target = receiver;
                        flag.ctf_status = FLAG_PASSING;
-                       
+
                        // other
                        sound(player, CH_TRIGGER, flag.snd_flag_touch, VOL_BASE, ATTEN_NORM);
                        WarpZone_TrailParticles(world, particleeffectnum(flag.passeffect), player.origin, targ_origin);
                        ctf_EventLog("pass", flag.team, player);
                        break;
                }
                        // other
                        sound(player, CH_TRIGGER, flag.snd_flag_touch, VOL_BASE, ATTEN_NORM);
                        WarpZone_TrailParticles(world, particleeffectnum(flag.passeffect), player.origin, targ_origin);
                        ctf_EventLog("pass", flag.team, player);
                        break;
                }
-               
+
                case DROP_THROW:
                {
                        makevectors((player.v_angle_y * '0 1 0') + (bound(autocvar_g_ctf_throw_angle_min, player.v_angle_x, autocvar_g_ctf_throw_angle_max) * '1 0 0'));
                case DROP_THROW:
                {
                        makevectors((player.v_angle_y * '0 1 0') + (bound(autocvar_g_ctf_throw_angle_min, player.v_angle_x, autocvar_g_ctf_throw_angle_max) * '1 0 0'));
-                               
+
                        flag_velocity = (('0 0 1' * autocvar_g_ctf_throw_velocity_up) + ((v_forward * autocvar_g_ctf_throw_velocity_forward) * ((player.items & IT_STRENGTH) ? autocvar_g_ctf_throw_strengthmultiplier : 1)));
                        flag.velocity = W_CalculateProjectileVelocity(player.velocity, flag_velocity, FALSE);
                        ctf_Handle_Drop(flag, player, droptype);
                        break;
                }
                        flag_velocity = (('0 0 1' * autocvar_g_ctf_throw_velocity_up) + ((v_forward * autocvar_g_ctf_throw_velocity_forward) * ((player.items & IT_STRENGTH) ? autocvar_g_ctf_throw_strengthmultiplier : 1)));
                        flag.velocity = W_CalculateProjectileVelocity(player.velocity, flag_velocity, FALSE);
                        ctf_Handle_Drop(flag, player, droptype);
                        break;
                }
-               
+
                case DROP_RESET:
                {
                        flag.velocity = '0 0 0'; // do nothing
                        break;
                }
                case DROP_RESET:
                {
                        flag.velocity = '0 0 0'; // do nothing
                        break;
                }
-               
+
                default:
                case DROP_NORMAL:
                {
                default:
                case DROP_NORMAL:
                {
@@ -367,10 +367,10 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype)
        // kill old waypointsprite
        WaypointSprite_Ping(player.wps_flagcarrier);
        WaypointSprite_Kill(player.wps_flagcarrier);
        // kill old waypointsprite
        WaypointSprite_Ping(player.wps_flagcarrier);
        WaypointSprite_Kill(player.wps_flagcarrier);
-       
+
        if(player.wps_enemyflagcarrier)
                WaypointSprite_Kill(player.wps_enemyflagcarrier);
        if(player.wps_enemyflagcarrier)
                WaypointSprite_Kill(player.wps_enemyflagcarrier);
-       
+
        // captureshield
        ctf_CaptureShield_Update(player, 0); // shield player from picking up flag
 }
        // captureshield
        ctf_CaptureShield_Update(player, 0); // shield player from picking up flag
 }
@@ -384,22 +384,22 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype)
 {
        entity enemy_flag = ((capturetype == CAPTURE_NORMAL) ? toucher.flagcarried : toucher);
        entity player = ((capturetype == CAPTURE_NORMAL) ? toucher : enemy_flag.ctf_dropper);
 {
        entity enemy_flag = ((capturetype == CAPTURE_NORMAL) ? toucher.flagcarried : toucher);
        entity player = ((capturetype == CAPTURE_NORMAL) ? toucher : enemy_flag.ctf_dropper);
-       float old_time, new_time; 
-       
+       float old_time, new_time;
+
        if (!player) { return; } // without someone to give the reward to, we can't possibly cap
        if (!player) { return; } // without someone to give the reward to, we can't possibly cap
-       
+
        // messages and sounds
        Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(enemy_flag, CENTER_CTF_CAPTURE_));
        ctf_CaptureRecord(enemy_flag, player);
        sound(player, CH_TRIGGER, flag.snd_flag_capture, VOL_BASE, ATTEN_NONE);
        // messages and sounds
        Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(enemy_flag, CENTER_CTF_CAPTURE_));
        ctf_CaptureRecord(enemy_flag, player);
        sound(player, CH_TRIGGER, flag.snd_flag_capture, VOL_BASE, ATTEN_NONE);
-       
+
        switch(capturetype)
        {
                case CAPTURE_NORMAL: ctf_EventLog("capture", enemy_flag.team, player); break;
                case CAPTURE_DROPPED: ctf_EventLog("droppedcapture", enemy_flag.team, player); break;
                default: break;
        }
        switch(capturetype)
        {
                case CAPTURE_NORMAL: ctf_EventLog("capture", enemy_flag.team, player); break;
                case CAPTURE_DROPPED: ctf_EventLog("droppedcapture", enemy_flag.team, player); break;
                default: break;
        }
-       
+
        // scoring
        PlayerTeamScore_AddScore(player, autocvar_g_ctf_score_capture);
        PlayerTeamScore_Add(player, SP_CTF_CAPS, ST_CTF_CAPS, 1);
        // scoring
        PlayerTeamScore_AddScore(player, autocvar_g_ctf_score_capture);
        PlayerTeamScore_Add(player, SP_CTF_CAPS, ST_CTF_CAPS, 1);
@@ -418,11 +418,11 @@ void ctf_Handle_Capture(entity flag, entity toucher, float capturetype)
        {
                WaypointSprite_Kill(player.wps_flagcarrier);
                if(flag.speedrunning) { ctf_FakeTimeLimit(player, -1); }
        {
                WaypointSprite_Kill(player.wps_flagcarrier);
                if(flag.speedrunning) { ctf_FakeTimeLimit(player, -1); }
-               
+
                if((enemy_flag.ctf_dropper) && (player != enemy_flag.ctf_dropper))
                        { PlayerTeamScore_AddScore(enemy_flag.ctf_dropper, autocvar_g_ctf_score_capture_assist); }
        }
                if((enemy_flag.ctf_dropper) && (player != enemy_flag.ctf_dropper))
                        { PlayerTeamScore_AddScore(enemy_flag.ctf_dropper, autocvar_g_ctf_score_capture_assist); }
        }
-       
+
        // reset the flag
        player.next_take_time = time + autocvar_g_ctf_flag_collect_delay;
        ctf_RespawnFlag(enemy_flag);
        // reset the flag
        player.next_take_time = time + autocvar_g_ctf_flag_collect_delay;
        ctf_RespawnFlag(enemy_flag);
@@ -441,14 +441,14 @@ void ctf_Handle_Return(entity flag, entity player)
        PlayerScore_Add(player, SP_CTF_RETURNS, 1); // add to count of returns
 
        TeamScore_AddToTeam(flag.team, ST_SCORE, -autocvar_g_ctf_score_penalty_returned); // punish the team who was last carrying it
        PlayerScore_Add(player, SP_CTF_RETURNS, 1); // add to count of returns
 
        TeamScore_AddToTeam(flag.team, ST_SCORE, -autocvar_g_ctf_score_penalty_returned); // punish the team who was last carrying it
-       
-       if(flag.ctf_dropper) 
+
+       if(flag.ctf_dropper)
        {
                PlayerScore_Add(flag.ctf_dropper, SP_SCORE, -autocvar_g_ctf_score_penalty_returned); // punish the player who dropped the flag
        {
                PlayerScore_Add(flag.ctf_dropper, SP_SCORE, -autocvar_g_ctf_score_penalty_returned); // punish the player who dropped the flag
-               ctf_CaptureShield_Update(flag.ctf_dropper, 0); // shield player from picking up flag 
+               ctf_CaptureShield_Update(flag.ctf_dropper, 0); // shield player from picking up flag
                flag.ctf_dropper.next_take_time = time + autocvar_g_ctf_flag_collect_delay; // set next take time
        }
                flag.ctf_dropper.next_take_time = time + autocvar_g_ctf_flag_collect_delay; // set next take time
        }
-       
+
        // reset the flag
        ctf_RespawnFlag(flag);
 }
        // reset the flag
        ctf_RespawnFlag(flag);
 }
@@ -457,20 +457,20 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
 {
        // declarations
        float pickup_dropped_score; // used to calculate dropped pickup score
 {
        // declarations
        float pickup_dropped_score; // used to calculate dropped pickup score
-       
+
        // attach the flag to the player
        flag.owner = player;
        player.flagcarried = flag;
        setattachment(flag, player, "");
        setorigin(flag, FLAG_CARRY_OFFSET);
        // attach the flag to the player
        flag.owner = player;
        player.flagcarried = flag;
        setattachment(flag, player, "");
        setorigin(flag, FLAG_CARRY_OFFSET);
-       
+
        // flag setup
        flag.movetype = MOVETYPE_NONE;
        flag.takedamage = DAMAGE_NO;
        flag.solid = SOLID_NOT;
        flag.angles = '0 0 0';
        flag.ctf_status = FLAG_CARRY;
        // flag setup
        flag.movetype = MOVETYPE_NONE;
        flag.takedamage = DAMAGE_NO;
        flag.solid = SOLID_NOT;
        flag.angles = '0 0 0';
        flag.ctf_status = FLAG_CARRY;
-       
+
        switch(pickuptype)
        {
                case PICKUP_BASE: flag.ctf_pickuptime = time; break; // used for timing runs
        switch(pickuptype)
        {
                case PICKUP_BASE: flag.ctf_pickuptime = time; break; // used for timing runs
@@ -479,26 +479,26 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
        }
 
        // messages and sounds
        }
 
        // messages and sounds
-       Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_PICKUP_), player.netname);  
+       Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_PICKUP_), player.netname);
        Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_));
        if(ctf_stalemate) { Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER); }
        Send_Notification(NOTIF_ONE, player, MSG_CENTER, APP_TEAM_ENT_2(flag, CENTER_CTF_PICKUP_));
        if(ctf_stalemate) { Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_STALEMATE_CARRIER); }
-       
+
        Send_Notification(NOTIF_TEAM_EXCEPT, player, MSG_CHOICE, CHOICE_CTF_PICKUP_TEAM, Team_ColorCode(player.team), player.netname);
        Send_Notification(NOTIF_TEAM, flag, MSG_CHOICE, CHOICE_CTF_PICKUP_ENEMY, Team_ColorCode(player.team), player.netname);
        Send_Notification(NOTIF_TEAM_EXCEPT, player, MSG_CHOICE, CHOICE_CTF_PICKUP_TEAM, Team_ColorCode(player.team), player.netname);
        Send_Notification(NOTIF_TEAM, flag, MSG_CHOICE, CHOICE_CTF_PICKUP_ENEMY, Team_ColorCode(player.team), player.netname);
-       
+
        sound(player, CH_TRIGGER, flag.snd_flag_taken, VOL_BASE, ATTEN_NONE);
        sound(player, CH_TRIGGER, flag.snd_flag_taken, VOL_BASE, ATTEN_NONE);
-       
+
        // scoring
        PlayerScore_Add(player, SP_CTF_PICKUPS, 1);
        switch(pickuptype)
        // scoring
        PlayerScore_Add(player, SP_CTF_PICKUPS, 1);
        switch(pickuptype)
-       {               
+       {
                case PICKUP_BASE:
                {
                        PlayerTeamScore_AddScore(player, autocvar_g_ctf_score_pickup_base);
                        ctf_EventLog("steal", flag.team, player);
                        break;
                }
                case PICKUP_BASE:
                {
                        PlayerTeamScore_AddScore(player, autocvar_g_ctf_score_pickup_base);
                        ctf_EventLog("steal", flag.team, player);
                        break;
                }
-               
+
                case PICKUP_DROPPED:
                {
                        pickup_dropped_score = (autocvar_g_ctf_flag_return_time ? bound(0, ((flag.ctf_droptime + autocvar_g_ctf_flag_return_time) - time) / autocvar_g_ctf_flag_return_time, 1) : 1);
                case PICKUP_DROPPED:
                {
                        pickup_dropped_score = (autocvar_g_ctf_flag_return_time ? bound(0, ((flag.ctf_droptime + autocvar_g_ctf_flag_return_time) - time) / autocvar_g_ctf_flag_return_time, 1) : 1);
@@ -508,10 +508,10 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
                        ctf_EventLog("pickup", flag.team, player);
                        break;
                }
                        ctf_EventLog("pickup", flag.team, player);
                        break;
                }
-               
+
                default: break;
        }
                default: break;
        }
-       
+
        // speedrunning
        if(pickuptype == PICKUP_BASE)
        {
        // speedrunning
        if(pickuptype == PICKUP_BASE)
        {
@@ -519,11 +519,11 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype)
                if((player.speedrunning) && (ctf_captimerecord))
                        ctf_FakeTimeLimit(player, time + ctf_captimerecord);
        }
                if((player.speedrunning) && (ctf_captimerecord))
                        ctf_FakeTimeLimit(player, time + ctf_captimerecord);
        }
-               
+
        // effects
        pointparticles(particleeffectnum(flag.toucheffect), player.origin, '0 0 0', 1);
        // effects
        pointparticles(particleeffectnum(flag.toucheffect), player.origin, '0 0 0', 1);
-       
-       // waypoints 
+
+       // waypoints
        if(pickuptype == PICKUP_DROPPED) { WaypointSprite_Kill(flag.wps_flagdropped); }
        ctf_FlagcarrierWaypoints(player);
        WaypointSprite_Ping(player.wps_flagcarrier);
        if(pickuptype == PICKUP_DROPPED) { WaypointSprite_Kill(flag.wps_flagdropped); }
        ctf_FlagcarrierWaypoints(player);
        WaypointSprite_Ping(player.wps_flagcarrier);
@@ -539,7 +539,7 @@ void ctf_CheckFlagReturn(entity flag, float returntype)
        if((flag.ctf_status == FLAG_DROPPED) || (flag.ctf_status == FLAG_PASSING))
        {
                if(flag.wps_flagdropped) { WaypointSprite_UpdateHealth(flag.wps_flagdropped, flag.health); }
        if((flag.ctf_status == FLAG_DROPPED) || (flag.ctf_status == FLAG_PASSING))
        {
                if(flag.wps_flagdropped) { WaypointSprite_UpdateHealth(flag.wps_flagdropped, flag.health); }
-               
+
                if((flag.health <= 0) || (time >= flag.ctf_droptime + autocvar_g_ctf_flag_return_time))
                {
                        switch(returntype)
                if((flag.health <= 0) || (time >= flag.ctf_droptime + autocvar_g_ctf_flag_return_time))
                {
                        switch(returntype)
@@ -548,7 +548,7 @@ void ctf_CheckFlagReturn(entity flag, float returntype)
                                case RETURN_DAMAGE: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DAMAGED_)); break;
                                case RETURN_SPEEDRUN: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_SPEEDRUN_), ctf_captimerecord); break;
                                case RETURN_NEEDKILL: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_NEEDKILL_)); break;
                                case RETURN_DAMAGE: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_DAMAGED_)); break;
                                case RETURN_SPEEDRUN: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_SPEEDRUN_), ctf_captimerecord); break;
                                case RETURN_NEEDKILL: Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_NEEDKILL_)); break;
-                               
+
                                default:
                                case RETURN_TIMEOUT:
                                        { Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_TIMEOUT_)); break; }
                                default:
                                case RETURN_TIMEOUT:
                                        { Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_FLAGRETURN_TIMEOUT_)); break; }
@@ -577,7 +577,7 @@ void ctf_CheckStalemate(void)
                {
                        tmp_entity.ctf_staleflagnext = ctf_staleflaglist; // link flag into staleflaglist
                        ctf_staleflaglist = tmp_entity;
                {
                        tmp_entity.ctf_staleflagnext = ctf_staleflaglist; // link flag into staleflaglist
                        ctf_staleflaglist = tmp_entity;
-                       
+
                        switch(tmp_entity.team)
                        {
                                case NUM_TEAM_1: ++stale_red_flags; break;
                        switch(tmp_entity.team)
                        {
                                case NUM_TEAM_1: ++stale_red_flags; break;
@@ -592,7 +592,7 @@ void ctf_CheckStalemate(void)
                { ctf_stalemate = FALSE; wpforenemy_announced = FALSE; }
        else if((!stale_red_flags || !stale_blue_flags) && autocvar_g_ctf_stalemate_endcondition == 1)
                { ctf_stalemate = FALSE; wpforenemy_announced = FALSE; }
                { ctf_stalemate = FALSE; wpforenemy_announced = FALSE; }
        else if((!stale_red_flags || !stale_blue_flags) && autocvar_g_ctf_stalemate_endcondition == 1)
                { ctf_stalemate = FALSE; wpforenemy_announced = FALSE; }
-               
+
        // if sufficient stalemate, then set up the waypointsprite and announce the stalemate if necessary
        if(ctf_stalemate)
        {
        // if sufficient stalemate, then set up the waypointsprite and announce the stalemate if necessary
        if(ctf_stalemate)
        {
@@ -601,12 +601,12 @@ void ctf_CheckStalemate(void)
                        if((tmp_entity.owner) && (!tmp_entity.owner.wps_enemyflagcarrier))
                                WaypointSprite_Spawn("enemyflagcarrier", 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, world, tmp_entity.team, tmp_entity.owner, wps_enemyflagcarrier, TRUE, RADARICON_FLAG, WPCOLOR_ENEMYFC(tmp_entity.owner.team));
                }
                        if((tmp_entity.owner) && (!tmp_entity.owner.wps_enemyflagcarrier))
                                WaypointSprite_Spawn("enemyflagcarrier", 0, 0, tmp_entity.owner, FLAG_WAYPOINT_OFFSET, world, tmp_entity.team, tmp_entity.owner, wps_enemyflagcarrier, TRUE, RADARICON_FLAG, WPCOLOR_ENEMYFC(tmp_entity.owner.team));
                }
-               
+
                if (!wpforenemy_announced)
                {
                        FOR_EACH_REALPLAYER(tmp_entity)
                                Send_Notification(NOTIF_ONE, tmp_entity, MSG_CENTER, ((tmp_entity.flagcarried) ? CENTER_CTF_STALEMATE_CARRIER : CENTER_CTF_STALEMATE_OTHER));
                if (!wpforenemy_announced)
                {
                        FOR_EACH_REALPLAYER(tmp_entity)
                                Send_Notification(NOTIF_ONE, tmp_entity, MSG_CENTER, ((tmp_entity.flagcarried) ? CENTER_CTF_STALEMATE_CARRIER : CENTER_CTF_STALEMATE_OTHER));
-                       
+
                        wpforenemy_announced = TRUE;
                }
        }
                        wpforenemy_announced = TRUE;
                }
        }
@@ -621,7 +621,7 @@ void ctf_FlagDamage(entity inflictor, entity attacker, float damage, float death
                ctf_CheckFlagReturn(self, RETURN_NEEDKILL);
                return;
        }
                ctf_CheckFlagReturn(self, RETURN_NEEDKILL);
                return;
        }
-       if(autocvar_g_ctf_flag_return_damage) 
+       if(autocvar_g_ctf_flag_return_damage)
        {
                // reduce health and check if it should be returned
                self.health = self.health - damage;
        {
                // reduce health and check if it should be returned
                self.health = self.health - damage;
@@ -648,7 +648,7 @@ void ctf_FlagThink()
                tracebox(self.origin, FLAG_MIN, FLAG_MAX, self.origin, MOVE_NOMONSTERS, self);
                if(!trace_startsolid) // can we resize it without getting stuck?
                        setsize(self, FLAG_MIN, FLAG_MAX); }
                tracebox(self.origin, FLAG_MIN, FLAG_MAX, self.origin, MOVE_NOMONSTERS, self);
                if(!trace_startsolid) // can we resize it without getting stuck?
                        setsize(self, FLAG_MIN, FLAG_MAX); }
-                       
+
        switch(self.ctf_status) // reset flag angles in case warpzones adjust it
        {
                case FLAG_DROPPED:
        switch(self.ctf_status) // reset flag angles in case warpzones adjust it
        {
                case FLAG_DROPPED:
@@ -656,13 +656,13 @@ void ctf_FlagThink()
                        self.angles = '0 0 0';
                        break;
                }
                        self.angles = '0 0 0';
                        break;
                }
-               
+
                default: break;
        }
 
        // main think method
        switch(self.ctf_status)
                default: break;
        }
 
        // main think method
        switch(self.ctf_status)
-       {       
+       {
                case FLAG_BASE:
                {
                        if(autocvar_g_ctf_dropped_capture_radius)
                case FLAG_BASE:
                {
                        if(autocvar_g_ctf_dropped_capture_radius)
@@ -675,7 +675,7 @@ void ctf_FlagThink()
                        }
                        return;
                }
                        }
                        return;
                }
-               
+
                case FLAG_DROPPED:
                {
                        if(autocvar_g_ctf_flag_dropped_floatinwater)
                case FLAG_DROPPED:
                {
                        if(autocvar_g_ctf_flag_dropped_floatinwater)
@@ -684,7 +684,7 @@ void ctf_FlagThink()
                                if(pointcontents(midpoint) == CONTENT_WATER)
                                {
                                        self.velocity = self.velocity * 0.5;
                                if(pointcontents(midpoint) == CONTENT_WATER)
                                {
                                        self.velocity = self.velocity * 0.5;
-                                       
+
                                        if(pointcontents(midpoint + FLAG_FLOAT_OFFSET) == CONTENT_WATER)
                                                { self.velocity_z = autocvar_g_ctf_flag_dropped_floatinwater; }
                                        else
                                        if(pointcontents(midpoint + FLAG_FLOAT_OFFSET) == CONTENT_WATER)
                                                { self.velocity_z = autocvar_g_ctf_flag_dropped_floatinwater; }
                                        else
@@ -706,13 +706,13 @@ void ctf_FlagThink()
                                self.health -= ((self.max_flag_health / autocvar_g_ctf_flag_return_time) * FLAG_THINKRATE);
                                ctf_CheckFlagReturn(self, RETURN_TIMEOUT);
                                return;
                                self.health -= ((self.max_flag_health / autocvar_g_ctf_flag_return_time) * FLAG_THINKRATE);
                                ctf_CheckFlagReturn(self, RETURN_TIMEOUT);
                                return;
-                       } 
+                       }
                        return;
                }
                        return;
                }
-                       
+
                case FLAG_CARRY:
                {
                case FLAG_CARRY:
                {
-                       if(self.speedrunning && ctf_captimerecord && (time >= self.ctf_pickuptime + ctf_captimerecord)) 
+                       if(self.speedrunning && ctf_captimerecord && (time >= self.ctf_pickuptime + ctf_captimerecord))
                        {
                                self.health = 0;
                                ctf_CheckFlagReturn(self, RETURN_SPEEDRUN);
                        {
                                self.health = 0;
                                ctf_CheckFlagReturn(self, RETURN_SPEEDRUN);
@@ -733,13 +733,13 @@ void ctf_FlagThink()
                        }
                        return;
                }
                        }
                        return;
                }
-               
+
                case FLAG_PASSING:
                {
                        vector targ_origin = ((self.pass_target.absmin + self.pass_target.absmax) * 0.5);
                        targ_origin = WarpZone_RefSys_TransformOrigin(self.pass_target, self, targ_origin); // origin of target as seen by the flag (us)
                        WarpZone_TraceLine(self.origin, targ_origin, MOVE_NOMONSTERS, self);
                case FLAG_PASSING:
                {
                        vector targ_origin = ((self.pass_target.absmin + self.pass_target.absmax) * 0.5);
                        targ_origin = WarpZone_RefSys_TransformOrigin(self.pass_target, self, targ_origin); // origin of target as seen by the flag (us)
                        WarpZone_TraceLine(self.origin, targ_origin, MOVE_NOMONSTERS, self);
-                       
+
                        if((self.pass_target == world)
                                || (self.pass_target.deadflag != DEAD_NO)
                                || (vlen(self.origin - targ_origin) > autocvar_g_ctf_pass_radius)
                        if((self.pass_target == world)
                                || (self.pass_target.deadflag != DEAD_NO)
                                || (vlen(self.origin - targ_origin) > autocvar_g_ctf_pass_radius)
@@ -768,9 +768,9 @@ void ctf_FlagThink()
 void ctf_FlagTouch()
 {
        if(gameover) { return; }
 void ctf_FlagTouch()
 {
        if(gameover) { return; }
-       
+
        entity toucher = other;
        entity toucher = other;
-       
+
        // automatically kill the flag and return it if it touched lava/slime/nodrop surfaces
        if(ITEM_TOUCH_NEEDKILL())
        {
        // automatically kill the flag and return it if it touched lava/slime/nodrop surfaces
        if(ITEM_TOUCH_NEEDKILL())
        {
@@ -778,7 +778,7 @@ void ctf_FlagTouch()
                ctf_CheckFlagReturn(self, RETURN_NEEDKILL);
                return;
        }
                ctf_CheckFlagReturn(self, RETURN_NEEDKILL);
                return;
        }
-       
+
        // special touch behaviors
        if(toucher.vehicle_flags & VHF_ISVEHICLE)
        {
        // special touch behaviors
        if(toucher.vehicle_flags & VHF_ISVEHICLE)
        {
@@ -799,8 +799,8 @@ void ctf_FlagTouch()
        }
        else if(toucher.deadflag != DEAD_NO) { return; }
 
        }
        else if(toucher.deadflag != DEAD_NO) { return; }
 
-       switch(self.ctf_status) 
-       {       
+       switch(self.ctf_status)
+       {
                case FLAG_BASE:
                {
                        if(SAME_TEAM(toucher, self) && (toucher.flagcarried) && DIFF_TEAM(toucher.flagcarried, self))
                case FLAG_BASE:
                {
                        if(SAME_TEAM(toucher, self) && (toucher.flagcarried) && DIFF_TEAM(toucher.flagcarried, self))
@@ -809,7 +809,7 @@ void ctf_FlagTouch()
                                ctf_Handle_Pickup(self, toucher, PICKUP_BASE); // toucher just stole the enemies flag
                        break;
                }
                                ctf_Handle_Pickup(self, toucher, PICKUP_BASE); // toucher just stole the enemies flag
                        break;
                }
-               
+
                case FLAG_DROPPED:
                {
                        if(SAME_TEAM(toucher, self))
                case FLAG_DROPPED:
                {
                        if(SAME_TEAM(toucher, self))
@@ -818,13 +818,13 @@ void ctf_FlagTouch()
                                ctf_Handle_Pickup(self, toucher, PICKUP_DROPPED); // toucher just picked up a dropped enemy flag
                        break;
                }
                                ctf_Handle_Pickup(self, toucher, PICKUP_DROPPED); // toucher just picked up a dropped enemy flag
                        break;
                }
-                       
+
                case FLAG_CARRY:
                {
                        dprint("Someone touched a flag even though it was being carried?\n");
                        break;
                }
                case FLAG_CARRY:
                {
                        dprint("Someone touched a flag even though it was being carried?\n");
                        break;
                }
-               
+
                case FLAG_PASSING:
                {
                        if((IS_PLAYER(toucher)) && (toucher.deadflag == DEAD_NO) && (toucher != self.pass_sender))
                case FLAG_PASSING:
                {
                        if((IS_PLAYER(toucher)) && (toucher.deadflag == DEAD_NO) && (toucher != self.pass_sender))
@@ -847,15 +847,15 @@ void ctf_RespawnFlag(entity flag)
                { backtrace("flag respawn called twice quickly! please notify Samual about this..."); }
 
        flag.last_respawn = time;
                { backtrace("flag respawn called twice quickly! please notify Samual about this..."); }
 
        flag.last_respawn = time;
-       
+
        // reset the player (if there is one)
        if((flag.owner) && (flag.owner.flagcarried == flag))
        {
                if(flag.owner.wps_enemyflagcarrier)
                        WaypointSprite_Kill(flag.owner.wps_enemyflagcarrier);
        // reset the player (if there is one)
        if((flag.owner) && (flag.owner.flagcarried == flag))
        {
                if(flag.owner.wps_enemyflagcarrier)
                        WaypointSprite_Kill(flag.owner.wps_enemyflagcarrier);
-                       
+
                WaypointSprite_Kill(flag.wps_flagcarrier);
                WaypointSprite_Kill(flag.wps_flagcarrier);
-               
+
                flag.owner.flagcarried = world;
 
                if(flag.speedrunning)
                flag.owner.flagcarried = world;
 
                if(flag.speedrunning)
@@ -868,7 +868,7 @@ void ctf_RespawnFlag(entity flag)
        // reset the flag
        setattachment(flag, world, "");
        setorigin(flag, flag.ctf_spawnorigin);
        // reset the flag
        setattachment(flag, world, "");
        setorigin(flag, flag.ctf_spawnorigin);
-       
+
        flag.movetype = ((flag.noalign) ? MOVETYPE_NONE : MOVETYPE_TOSS);
        flag.takedamage = DAMAGE_NO;
        flag.health = flag.max_flag_health;
        flag.movetype = ((flag.noalign) ? MOVETYPE_NONE : MOVETYPE_TOSS);
        flag.takedamage = DAMAGE_NO;
        flag.health = flag.max_flag_health;
@@ -876,7 +876,7 @@ void ctf_RespawnFlag(entity flag)
        flag.velocity = '0 0 0';
        flag.angles = flag.mangle;
        flag.flags = FL_ITEM | FL_NOTARGET;
        flag.velocity = '0 0 0';
        flag.angles = flag.mangle;
        flag.flags = FL_ITEM | FL_NOTARGET;
-       
+
        flag.ctf_status = FLAG_BASE;
        flag.owner = world;
        flag.pass_distance = 0;
        flag.ctf_status = FLAG_BASE;
        flag.owner = world;
        flag.pass_distance = 0;
@@ -892,7 +892,7 @@ void ctf_Reset()
        if(self.owner)
                if(IS_PLAYER(self.owner))
                        ctf_Handle_Throw(self.owner, world, DROP_RESET);
        if(self.owner)
                if(IS_PLAYER(self.owner))
                        ctf_Handle_Throw(self.owner, world, DROP_RESET);
-                       
+
        ctf_RespawnFlag(self);
 }
 
        ctf_RespawnFlag(self);
 }
 
@@ -911,12 +911,12 @@ void ctf_DelayedFlagSetup(void) // called after a flag is placed on a map by ctf
        ctf_CaptureShield_Spawn(self);
 }
 
        ctf_CaptureShield_Spawn(self);
 }
 
-void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag entity on the map as a spawnfunc 
-{      
+void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag entity on the map as a spawnfunc
+{
        // declarations
        // declarations
-       teamnumber = fabs(teamnumber - bound(0, autocvar_g_ctf_reverse, 1)); // if we were originally 1, this will become 0. If we were originally 0, this will become 1. 
+       teamnumber = fabs(teamnumber - bound(0, autocvar_g_ctf_reverse, 1)); // if we were originally 1, this will become 0. If we were originally 0, this will become 1.
        self = flag; // for later usage with droptofloor()
        self = flag; // for later usage with droptofloor()
-       
+
        // main setup
        flag.ctf_worldflagnext = ctf_worldflaglist; // link flag into ctf_worldflaglist
        ctf_worldflaglist = flag;
        // main setup
        flag.ctf_worldflagnext = ctf_worldflaglist; // link flag into ctf_worldflaglist
        ctf_worldflaglist = flag;
@@ -931,7 +931,7 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag
        flag.flags = FL_ITEM | FL_NOTARGET;
        flag.solid = SOLID_TRIGGER;
        flag.takedamage = DAMAGE_NO;
        flag.flags = FL_ITEM | FL_NOTARGET;
        flag.solid = SOLID_TRIGGER;
        flag.takedamage = DAMAGE_NO;
-       flag.damageforcescale = autocvar_g_ctf_flag_damageforcescale;   
+       flag.damageforcescale = autocvar_g_ctf_flag_damageforcescale;
        flag.max_flag_health = ((autocvar_g_ctf_flag_return_damage && autocvar_g_ctf_flag_health) ? autocvar_g_ctf_flag_health : 100);
        flag.health = flag.max_flag_health;
        flag.event_damage = ctf_FlagDamage;
        flag.max_flag_health = ((autocvar_g_ctf_flag_return_damage && autocvar_g_ctf_flag_health) ? autocvar_g_ctf_flag_health : 100);
        flag.health = flag.max_flag_health;
        flag.event_damage = ctf_FlagDamage;
@@ -954,8 +954,8 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag
        if(flag.toucheffect == "") { flag.toucheffect = ((teamnumber) ? "redflag_touch" : "blueflag_touch"); }
        if(flag.passeffect == "")  { flag.passeffect = ((teamnumber) ? "red_pass" : "blue_pass"); }
        if(flag.capeffect == "")   { flag.capeffect = ((teamnumber) ? "red_cap" : "blue_cap"); }
        if(flag.toucheffect == "") { flag.toucheffect = ((teamnumber) ? "redflag_touch" : "blueflag_touch"); }
        if(flag.passeffect == "")  { flag.passeffect = ((teamnumber) ? "red_pass" : "blue_pass"); }
        if(flag.capeffect == "")   { flag.capeffect = ((teamnumber) ? "red_cap" : "blue_cap"); }
-       
-       // sound 
+
+       // sound
        if(flag.snd_flag_taken == "")    { flag.snd_flag_taken  = ((teamnumber) ? "ctf/red_taken.wav" : "ctf/blue_taken.wav"); }
        if(flag.snd_flag_returned == "") { flag.snd_flag_returned = ((teamnumber) ? "ctf/red_returned.wav" : "ctf/blue_returned.wav"); }
        if(flag.snd_flag_capture == "")  { flag.snd_flag_capture = ((teamnumber) ? "ctf/red_capture.wav" : "ctf/blue_capture.wav"); } // blue team scores by capturing the red flag
        if(flag.snd_flag_taken == "")    { flag.snd_flag_taken  = ((teamnumber) ? "ctf/red_taken.wav" : "ctf/blue_taken.wav"); }
        if(flag.snd_flag_returned == "") { flag.snd_flag_returned = ((teamnumber) ? "ctf/red_returned.wav" : "ctf/blue_returned.wav"); }
        if(flag.snd_flag_capture == "")  { flag.snd_flag_capture = ((teamnumber) ? "ctf/red_capture.wav" : "ctf/blue_capture.wav"); } // blue team scores by capturing the red flag
@@ -963,7 +963,7 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag
        if(flag.snd_flag_dropped == "")  { flag.snd_flag_dropped = ((teamnumber) ? "ctf/red_dropped.wav" : "ctf/blue_dropped.wav"); }
        if(flag.snd_flag_touch == "")    { flag.snd_flag_touch = "ctf/touch.wav"; } // again has no team-based sound
        if(flag.snd_flag_pass == "")     { flag.snd_flag_pass = "ctf/pass.wav"; } // same story here
        if(flag.snd_flag_dropped == "")  { flag.snd_flag_dropped = ((teamnumber) ? "ctf/red_dropped.wav" : "ctf/blue_dropped.wav"); }
        if(flag.snd_flag_touch == "")    { flag.snd_flag_touch = "ctf/touch.wav"; } // again has no team-based sound
        if(flag.snd_flag_pass == "")     { flag.snd_flag_pass = "ctf/pass.wav"; } // same story here
-       
+
        // precache
        precache_sound(flag.snd_flag_taken);
        precache_sound(flag.snd_flag_returned);
        // precache
        precache_sound(flag.snd_flag_taken);
        precache_sound(flag.snd_flag_returned);
@@ -980,33 +980,33 @@ void ctf_FlagSetup(float teamnumber, entity flag) // called when spawning a flag
        setmodel(flag, flag.model); // precision set below
        setsize(flag, FLAG_MIN, FLAG_MAX);
        setorigin(flag, (flag.origin + FLAG_SPAWN_OFFSET));
        setmodel(flag, flag.model); // precision set below
        setsize(flag, FLAG_MIN, FLAG_MAX);
        setorigin(flag, (flag.origin + FLAG_SPAWN_OFFSET));
-       
+
        if(autocvar_g_ctf_flag_glowtrails)
        {
                flag.glow_color = ((teamnumber) ? 251 : 210); // 251: red - 210: blue
                flag.glow_size = 25;
                flag.glow_trail = 1;
        }
        if(autocvar_g_ctf_flag_glowtrails)
        {
                flag.glow_color = ((teamnumber) ? 251 : 210); // 251: red - 210: blue
                flag.glow_size = 25;
                flag.glow_trail = 1;
        }
-       
+
        flag.effects |= EF_LOWPRECISION;
        if(autocvar_g_ctf_fullbrightflags) { flag.effects |= EF_FULLBRIGHT; }
        if(autocvar_g_ctf_dynamiclights)   { flag.effects |= ((teamnumber) ? EF_RED : EF_BLUE); }
        flag.effects |= EF_LOWPRECISION;
        if(autocvar_g_ctf_fullbrightflags) { flag.effects |= EF_FULLBRIGHT; }
        if(autocvar_g_ctf_dynamiclights)   { flag.effects |= ((teamnumber) ? EF_RED : EF_BLUE); }
-       
+
        // flag placement
        if((flag.spawnflags & 1) || flag.noalign) // don't drop to floor, just stay at fixed location
        // flag placement
        if((flag.spawnflags & 1) || flag.noalign) // don't drop to floor, just stay at fixed location
-       {       
-               flag.dropped_origin = flag.origin; 
+       {
+               flag.dropped_origin = flag.origin;
                flag.noalign = TRUE;
                flag.movetype = MOVETYPE_NONE;
        }
        else // drop to floor, automatically find a platform and set that as spawn origin
                flag.noalign = TRUE;
                flag.movetype = MOVETYPE_NONE;
        }
        else // drop to floor, automatically find a platform and set that as spawn origin
-       { 
+       {
                flag.noalign = FALSE;
                self = flag;
                droptofloor();
                flag.noalign = FALSE;
                self = flag;
                droptofloor();
-               flag.movetype = MOVETYPE_TOSS; 
-       }       
-       
+               flag.movetype = MOVETYPE_TOSS;
+       }
+
        InitializeEntity(flag, ctf_DelayedFlagSetup, INITPRIO_SETLOCATION);
 }
 
        InitializeEntity(flag, ctf_DelayedFlagSetup, INITPRIO_SETLOCATION);
 }
 
@@ -1675,12 +1675,12 @@ void havocbot_role_ctf_setrole(entity bot, float role)
 MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink)
 {
        entity flag;
 MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink)
 {
        entity flag;
-       
+
        // initially clear items so they can be set as necessary later.
        self.items &= ~(IT_RED_FLAG_CARRYING | IT_RED_FLAG_TAKEN | IT_RED_FLAG_LOST
                | IT_BLUE_FLAG_CARRYING | IT_BLUE_FLAG_TAKEN | IT_BLUE_FLAG_LOST | IT_CTF_SHIELDED);
 
        // initially clear items so they can be set as necessary later.
        self.items &= ~(IT_RED_FLAG_CARRYING | IT_RED_FLAG_TAKEN | IT_RED_FLAG_LOST
                | IT_BLUE_FLAG_CARRYING | IT_BLUE_FLAG_TAKEN | IT_BLUE_FLAG_LOST | IT_CTF_SHIELDED);
 
-       // scan through all the flags and notify the client about them 
+       // scan through all the flags and notify the client about them
        for(flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext)
        {
                switch(flag.ctf_status)
        for(flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext)
        {
                switch(flag.ctf_status)
@@ -1690,7 +1690,7 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink)
                        {
                                if((flag.owner == self) || (flag.pass_sender == self))
                                        self.items |= ((flag.items & IT_KEY2) ? IT_RED_FLAG_CARRYING : IT_BLUE_FLAG_CARRYING); // carrying: self is currently carrying the flag
                        {
                                if((flag.owner == self) || (flag.pass_sender == self))
                                        self.items |= ((flag.items & IT_KEY2) ? IT_RED_FLAG_CARRYING : IT_BLUE_FLAG_CARRYING); // carrying: self is currently carrying the flag
-                               else 
+                               else
                                        self.items |= ((flag.items & IT_KEY2) ? IT_RED_FLAG_TAKEN : IT_BLUE_FLAG_TAKEN); // taken: someone on self's team is carrying the flag
                                break;
                        }
                                        self.items |= ((flag.items & IT_KEY2) ? IT_RED_FLAG_TAKEN : IT_BLUE_FLAG_TAKEN); // taken: someone on self's team is carrying the flag
                                break;
                        }
@@ -1701,15 +1701,15 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerPreThink)
                        }
                }
        }
                        }
                }
        }
-       
+
        // item for stopping players from capturing the flag too often
        if(self.ctf_captureshielded)
                self.items |= IT_CTF_SHIELDED;
        // item for stopping players from capturing the flag too often
        if(self.ctf_captureshielded)
                self.items |= IT_CTF_SHIELDED;
-       
+
        // update the health of the flag carrier waypointsprite
        // update the health of the flag carrier waypointsprite
-       if(self.wps_flagcarrier) 
+       if(self.wps_flagcarrier)
                WaypointSprite_UpdateHealth(self.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
                WaypointSprite_UpdateHealth(self.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(self.health, self.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON));
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -1748,10 +1748,10 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerDies)
                PlayerTeamScore_AddScore(frag_attacker, autocvar_g_ctf_score_kill);
                PlayerScore_Add(frag_attacker, SP_CTF_FCKILLS, 1);
        }
                PlayerTeamScore_AddScore(frag_attacker, autocvar_g_ctf_score_kill);
                PlayerScore_Add(frag_attacker, SP_CTF_FCKILLS, 1);
        }
-                               
+
        if(frag_target.flagcarried)
                { ctf_Handle_Throw(frag_target, world, DROP_NORMAL); }
        if(frag_target.flagcarried)
                { ctf_Handle_Throw(frag_target, world, DROP_NORMAL); }
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -1764,23 +1764,23 @@ MUTATOR_HOOKFUNCTION(ctf_GiveFragsForKill)
 MUTATOR_HOOKFUNCTION(ctf_RemovePlayer)
 {
        entity flag; // temporary entity for the search method
 MUTATOR_HOOKFUNCTION(ctf_RemovePlayer)
 {
        entity flag; // temporary entity for the search method
-       
+
        if(self.flagcarried)
                { ctf_Handle_Throw(self, world, DROP_NORMAL); }
        if(self.flagcarried)
                { ctf_Handle_Throw(self, world, DROP_NORMAL); }
-       
+
        for(flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext)
        {
                if(flag.pass_sender == self) { flag.pass_sender = world; }
                if(flag.pass_target == self) { flag.pass_target = world; }
                if(flag.ctf_dropper == self) { flag.ctf_dropper = world; }
        }
        for(flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext)
        {
                if(flag.pass_sender == self) { flag.pass_sender = world; }
                if(flag.pass_target == self) { flag.pass_target = world; }
                if(flag.ctf_dropper == self) { flag.ctf_dropper = world; }
        }
-               
+
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(ctf_PortalTeleport)
 {
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(ctf_PortalTeleport)
 {
-       if(self.flagcarried) 
+       if(self.flagcarried)
        if(!autocvar_g_ctf_portalteleport)
                { ctf_Handle_Throw(self, world, DROP_NORMAL); }
 
        if(!autocvar_g_ctf_portalteleport)
                { ctf_Handle_Throw(self, world, DROP_NORMAL); }
 
@@ -1790,7 +1790,7 @@ MUTATOR_HOOKFUNCTION(ctf_PortalTeleport)
 MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
 {
        if(MUTATOR_RETURNVALUE || gameover) { return FALSE; }
 MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
 {
        if(MUTATOR_RETURNVALUE || gameover) { return FALSE; }
-       
+
        entity player = self;
 
        if((time > player.throw_antispam) && (player.deadflag == DEAD_NO) && !player.speedrunning && (!player.vehicle || autocvar_g_ctf_allow_vehicle_touch))
        entity player = self;
 
        if((time > player.throw_antispam) && (player.deadflag == DEAD_NO) && !player.speedrunning && (!player.vehicle || autocvar_g_ctf_allow_vehicle_touch))
@@ -1800,21 +1800,21 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
                {
                        entity head, closest_target = world;
                        head = WarpZone_FindRadius(player.origin, autocvar_g_ctf_pass_radius, TRUE);
                {
                        entity head, closest_target = world;
                        head = WarpZone_FindRadius(player.origin, autocvar_g_ctf_pass_radius, TRUE);
-                       
+
                        while(head) // find the closest acceptable target to pass to
                        {
                                if(IS_PLAYER(head) && head.deadflag == DEAD_NO)
                                if(head != player && SAME_TEAM(head, player))
                                if(!head.speedrunning && !head.vehicle)
                                {
                        while(head) // find the closest acceptable target to pass to
                        {
                                if(IS_PLAYER(head) && head.deadflag == DEAD_NO)
                                if(head != player && SAME_TEAM(head, player))
                                if(!head.speedrunning && !head.vehicle)
                                {
-                                       // if it's a player, use the view origin as reference (stolen from RadiusDamage functions in g_damage.qc) 
+                                       // if it's a player, use the view origin as reference (stolen from RadiusDamage functions in g_damage.qc)
                                        vector head_center = WarpZone_UnTransformOrigin(head, CENTER_OR_VIEWOFS(head));
                                        vector passer_center = CENTER_OR_VIEWOFS(player);
                                        vector head_center = WarpZone_UnTransformOrigin(head, CENTER_OR_VIEWOFS(head));
                                        vector passer_center = CENTER_OR_VIEWOFS(player);
-                                       
+
                                        if(ctf_CheckPassDirection(head_center, passer_center, player.v_angle, head.WarpZone_findradius_nearest))
                                        {
                                        if(ctf_CheckPassDirection(head_center, passer_center, player.v_angle, head.WarpZone_findradius_nearest))
                                        {
-                                               if(autocvar_g_ctf_pass_request && !player.flagcarried && head.flagcarried) 
-                                               { 
+                                               if(autocvar_g_ctf_pass_request && !player.flagcarried && head.flagcarried)
+                                               {
                                                        if(IS_BOT_CLIENT(head))
                                                        {
                                                                Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
                                                        if(IS_BOT_CLIENT(head))
                                                        {
                                                                Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
@@ -1825,8 +1825,8 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
                                                                Send_Notification(NOTIF_ONE, head, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname);
                                                                Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
                                                        }
                                                                Send_Notification(NOTIF_ONE, head, MSG_CENTER, CENTER_CTF_PASS_REQUESTED, player.netname);
                                                                Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_CTF_PASS_REQUESTING, head.netname);
                                                        }
-                                                       player.throw_antispam = time + autocvar_g_ctf_pass_wait; 
-                                                       return TRUE; 
+                                                       player.throw_antispam = time + autocvar_g_ctf_pass_wait;
+                                                       return TRUE;
                                                }
                                                else if(player.flagcarried)
                                                {
                                                }
                                                else if(player.flagcarried)
                                                {
@@ -1842,10 +1842,10 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
                                }
                                head = head.chain;
                        }
                                }
                                head = head.chain;
                        }
-                       
+
                        if(closest_target) { ctf_Handle_Throw(player, closest_target, DROP_PASS); return TRUE; }
                }
                        if(closest_target) { ctf_Handle_Throw(player, closest_target, DROP_PASS); return TRUE; }
                }
-               
+
                // throw the flag in front of you
                if(autocvar_g_ctf_throw && player.flagcarried)
                {
                // throw the flag in front of you
                if(autocvar_g_ctf_throw && player.flagcarried)
                {
@@ -1869,14 +1869,14 @@ MUTATOR_HOOKFUNCTION(ctf_PlayerUseKey)
                                if(time > player.throw_prevtime + autocvar_g_ctf_throw_punish_time) { player.throw_count = 1; }
                                else { player.throw_count += 1; }
                                if(player.throw_count >= autocvar_g_ctf_throw_punish_count) { player.throw_count = -1; }
                                if(time > player.throw_prevtime + autocvar_g_ctf_throw_punish_time) { player.throw_count = 1; }
                                else { player.throw_count += 1; }
                                if(player.throw_count >= autocvar_g_ctf_throw_punish_count) { player.throw_count = -1; }
-                                       
+
                                player.throw_prevtime = time;
                                ctf_Handle_Throw(player, world, DROP_THROW);
                                return TRUE;
                        }
                }
        }
                                player.throw_prevtime = time;
                                ctf_Handle_Throw(player, world, DROP_THROW);
                                return TRUE;
                        }
                }
        }
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -1886,7 +1886,7 @@ MUTATOR_HOOKFUNCTION(ctf_HelpMePing)
        {
                self.wps_helpme_time = time;
                WaypointSprite_HelpMePing(self.wps_flagcarrier);
        {
                self.wps_helpme_time = time;
                WaypointSprite_HelpMePing(self.wps_flagcarrier);
-       } 
+       }
        else // create a normal help me waypointsprite
        {
                WaypointSprite_Spawn("helpme", waypointsprite_deployed_lifetime, waypointsprite_limitedrange, self, FLAG_WAYPOINT_OFFSET, world, self.team, self, wps_helpme, FALSE, RADARICON_HELPME, '1 0.5 0');
        else // create a normal help me waypointsprite
        {
                WaypointSprite_Spawn("helpme", waypointsprite_deployed_lifetime, waypointsprite_limitedrange, self, FLAG_WAYPOINT_OFFSET, world, self.team, self, wps_helpme, FALSE, RADARICON_HELPME, '1 0.5 0');
@@ -1905,15 +1905,15 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleEnter)
                        ctf_Handle_Throw(vh_player, world, DROP_NORMAL);
                }
                else
                        ctf_Handle_Throw(vh_player, world, DROP_NORMAL);
                }
                else
-               {            
-                       setattachment(vh_player.flagcarried, vh_vehicle, ""); 
+               {
+                       setattachment(vh_player.flagcarried, vh_vehicle, "");
                        setorigin(vh_player.flagcarried, VEHICLE_FLAG_OFFSET);
                        vh_player.flagcarried.scale = VEHICLE_FLAG_SCALE;
                        setorigin(vh_player.flagcarried, VEHICLE_FLAG_OFFSET);
                        vh_player.flagcarried.scale = VEHICLE_FLAG_SCALE;
-                       //vh_player.flagcarried.angles = '0 0 0';       
+                       //vh_player.flagcarried.angles = '0 0 0';
                }
                return TRUE;
        }
                }
                return TRUE;
        }
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -1921,7 +1921,7 @@ MUTATOR_HOOKFUNCTION(ctf_VehicleExit)
 {
        if(vh_player.flagcarried)
        {
 {
        if(vh_player.flagcarried)
        {
-               setattachment(vh_player.flagcarried, vh_player, ""); 
+               setattachment(vh_player.flagcarried, vh_player, "");
                setorigin(vh_player.flagcarried, FLAG_CARRY_OFFSET);
                vh_player.flagcarried.scale = FLAG_SCALE;
                vh_player.flagcarried.angles = '0 0 0';
                setorigin(vh_player.flagcarried, FLAG_CARRY_OFFSET);
                vh_player.flagcarried.scale = FLAG_SCALE;
                vh_player.flagcarried.angles = '0 0 0';
@@ -1939,14 +1939,14 @@ MUTATOR_HOOKFUNCTION(ctf_AbortSpeedrun)
                ctf_RespawnFlag(self.flagcarried);
                return TRUE;
        }
                ctf_RespawnFlag(self.flagcarried);
                return TRUE;
        }
-       
+
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(ctf_MatchEnd)
 {
        entity flag; // temporary entity for the search method
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(ctf_MatchEnd)
 {
        entity flag; // temporary entity for the search method
-       
+
        for(flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext)
        {
                switch(flag.ctf_status)
        for(flag = ctf_worldflaglist; flag; flag = flag.ctf_worldflagnext)
        {
                switch(flag.ctf_status)
@@ -1959,11 +1959,11 @@ MUTATOR_HOOKFUNCTION(ctf_MatchEnd)
                                flag.takedamage = DAMAGE_NO;
                                flag.solid = SOLID_NOT;
                                flag.nextthink = FALSE; // stop thinking
                                flag.takedamage = DAMAGE_NO;
                                flag.solid = SOLID_NOT;
                                flag.nextthink = FALSE; // stop thinking
-                               
+
                                //dprint("stopping the ", flag.netname, " from moving.\n");
                                break;
                        }
                                //dprint("stopping the ", flag.netname, " from moving.\n");
                                break;
                        }
-                       
+
                        default:
                        case FLAG_BASE:
                        case FLAG_CARRY:
                        default:
                        case FLAG_BASE:
                        case FLAG_CARRY:
@@ -1973,7 +1973,7 @@ MUTATOR_HOOKFUNCTION(ctf_MatchEnd)
                        }
                }
        }
                        }
                }
        }
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -1994,7 +1994,7 @@ Keys: "angle" viewing angle when spawning. */
 void spawnfunc_info_player_team1()
 {
        if(g_assault) { remove(self); return; }
 void spawnfunc_info_player_team1()
 {
        if(g_assault) { remove(self); return; }
-       
+
        self.team = NUM_TEAM_1; // red
        spawnfunc_info_player_deathmatch();
 }
        self.team = NUM_TEAM_1; // red
        spawnfunc_info_player_deathmatch();
 }
@@ -2006,7 +2006,7 @@ Keys: "angle" viewing angle when spawning. */
 void spawnfunc_info_player_team2()
 {
        if(g_assault) { remove(self); return; }
 void spawnfunc_info_player_team2()
 {
        if(g_assault) { remove(self); return; }
-       
+
        self.team = NUM_TEAM_2; // blue
        spawnfunc_info_player_deathmatch();
 }
        self.team = NUM_TEAM_2; // blue
        spawnfunc_info_player_deathmatch();
 }
@@ -2017,7 +2017,7 @@ Keys: "angle" viewing angle when spawning. */
 void spawnfunc_info_player_team3()
 {
        if(g_assault) { remove(self); return; }
 void spawnfunc_info_player_team3()
 {
        if(g_assault) { remove(self); return; }
-       
+
        self.team = NUM_TEAM_3; // yellow
        spawnfunc_info_player_deathmatch();
 }
        self.team = NUM_TEAM_3; // yellow
        spawnfunc_info_player_deathmatch();
 }
@@ -2029,20 +2029,20 @@ Keys: "angle" viewing angle when spawning. */
 void spawnfunc_info_player_team4()
 {
        if(g_assault) { remove(self); return; }
 void spawnfunc_info_player_team4()
 {
        if(g_assault) { remove(self); return; }
-       
+
        self.team = NUM_TEAM_4; // purple
        spawnfunc_info_player_deathmatch();
 }
 
 /*QUAKED spawnfunc_item_flag_team1 (0 0.5 0.8) (-48 -48 -37) (48 48 37)
 CTF flag for team one (Red).
        self.team = NUM_TEAM_4; // purple
        spawnfunc_info_player_deathmatch();
 }
 
 /*QUAKED spawnfunc_item_flag_team1 (0 0.5 0.8) (-48 -48 -37) (48 48 37)
 CTF flag for team one (Red).
-Keys: 
-"angle" Angle the flag will point (minus 90 degrees)... 
+Keys:
+"angle" Angle the flag will point (minus 90 degrees)...
 "model" model to use, note this needs red and blue as skins 0 and 1...
 "noise" sound played when flag is picked up...
 "noise1" sound played when flag is returned by a teammate...
 "noise2" sound played when flag is captured...
 "model" model to use, note this needs red and blue as skins 0 and 1...
 "noise" sound played when flag is picked up...
 "noise1" sound played when flag is returned by a teammate...
 "noise2" sound played when flag is captured...
-"noise3" sound played when flag is lost in the field and respawns itself... 
+"noise3" sound played when flag is lost in the field and respawns itself...
 "noise4" sound played when flag is dropped by a player...
 "noise5" sound played when flag touches the ground... */
 void spawnfunc_item_flag_team1()
 "noise4" sound played when flag is dropped by a player...
 "noise5" sound played when flag touches the ground... */
 void spawnfunc_item_flag_team1()
@@ -2054,13 +2054,13 @@ void spawnfunc_item_flag_team1()
 
 /*QUAKED spawnfunc_item_flag_team2 (0 0.5 0.8) (-48 -48 -37) (48 48 37)
 CTF flag for team two (Blue).
 
 /*QUAKED spawnfunc_item_flag_team2 (0 0.5 0.8) (-48 -48 -37) (48 48 37)
 CTF flag for team two (Blue).
-Keys: 
-"angle" Angle the flag will point (minus 90 degrees)... 
+Keys:
+"angle" Angle the flag will point (minus 90 degrees)...
 "model" model to use, note this needs red and blue as skins 0 and 1...
 "noise" sound played when flag is picked up...
 "noise1" sound played when flag is returned by a teammate...
 "noise2" sound played when flag is captured...
 "model" model to use, note this needs red and blue as skins 0 and 1...
 "noise" sound played when flag is picked up...
 "noise1" sound played when flag is returned by a teammate...
 "noise2" sound played when flag is captured...
-"noise3" sound played when flag is lost in the field and respawns itself... 
+"noise3" sound played when flag is lost in the field and respawns itself...
 "noise4" sound played when flag is dropped by a player...
 "noise5" sound played when flag touches the ground... */
 void spawnfunc_item_flag_team2()
 "noise4" sound played when flag is dropped by a player...
 "noise5" sound played when flag touches the ground... */
 void spawnfunc_item_flag_team2()
@@ -2079,7 +2079,7 @@ Keys:
 void spawnfunc_ctf_team()
 {
        if(!g_ctf) { remove(self); return; }
 void spawnfunc_ctf_team()
 {
        if(!g_ctf) { remove(self); return; }
-       
+
        self.classname = "ctf_team";
        self.team = self.cnt + 1;
 }
        self.classname = "ctf_team";
        self.team = self.cnt + 1;
 }
@@ -2135,7 +2135,7 @@ void ctf_DelayedInit() // Do this check with a delay so we can wait for teams to
                ctf_SpawnTeam("Red", NUM_TEAM_1 - 1);
                ctf_SpawnTeam("Blue", NUM_TEAM_2 - 1);
        }
                ctf_SpawnTeam("Red", NUM_TEAM_1 - 1);
                ctf_SpawnTeam("Blue", NUM_TEAM_2 - 1);
        }
-       
+
        ctf_ScoreRules();
 }
 
        ctf_ScoreRules();
 }
 
@@ -2146,7 +2146,7 @@ void ctf_Initialize()
        ctf_captureshield_min_negscore = autocvar_g_ctf_shield_min_negscore;
        ctf_captureshield_max_ratio = autocvar_g_ctf_shield_max_ratio;
        ctf_captureshield_force = autocvar_g_ctf_shield_force;
        ctf_captureshield_min_negscore = autocvar_g_ctf_shield_min_negscore;
        ctf_captureshield_max_ratio = autocvar_g_ctf_shield_max_ratio;
        ctf_captureshield_force = autocvar_g_ctf_shield_force;
-       
+
        InitializeEntity(world, ctf_DelayedInit, INITPRIO_GAMETYPE);
 }
 
        InitializeEntity(world, ctf_DelayedInit, INITPRIO_GAMETYPE);
 }
 
@@ -2167,7 +2167,7 @@ MUTATOR_DEFINITION(gamemode_ctf)
        MUTATOR_HOOK(VehicleExit, ctf_VehicleExit, CBC_ORDER_ANY);
        MUTATOR_HOOK(AbortSpeedrun, ctf_AbortSpeedrun, CBC_ORDER_ANY);
        MUTATOR_HOOK(HavocBot_ChooseRule, ctf_BotRoles, CBC_ORDER_ANY);
        MUTATOR_HOOK(VehicleExit, ctf_VehicleExit, CBC_ORDER_ANY);
        MUTATOR_HOOK(AbortSpeedrun, ctf_AbortSpeedrun, CBC_ORDER_ANY);
        MUTATOR_HOOK(HavocBot_ChooseRule, ctf_BotRoles, CBC_ORDER_ANY);
-       
+
        MUTATOR_ONADD
        {
                if(time > 1) // game loads at time 1
        MUTATOR_ONADD
        {
                if(time > 1) // game loads at time 1
index 58699208e502280984a37c070ff332d066ab8b2f..ca4961eddc24231a6056943a0b2bffcdb5dcec06 100644 (file)
@@ -38,7 +38,7 @@ void ctf_RespawnFlag(entity flag);
 #define WPCOLOR_FLAGCARRIER(t) ('0.8 0.8 0')
 #define WPCOLOR_DROPPEDFLAG(t) (('0.25 0.25 0.25' + colormapPaletteColor(t - 1, FALSE)) * 0.5)
 
 #define WPCOLOR_FLAGCARRIER(t) ('0.8 0.8 0')
 #define WPCOLOR_DROPPEDFLAG(t) (('0.25 0.25 0.25' + colormapPaletteColor(t - 1, FALSE)) * 0.5)
 
-// sounds 
+// sounds
 #define snd_flag_taken noise
 #define snd_flag_returned noise1
 #define snd_flag_capture noise2
 #define snd_flag_taken noise
 #define snd_flag_returned noise1
 #define snd_flag_capture noise2
@@ -60,7 +60,7 @@ entity ctf_worldflaglist;
 // waypoint sprites
 .entity bot_basewaypoint; // flag waypointsprite
 .entity wps_helpme;
 // waypoint sprites
 .entity bot_basewaypoint; // flag waypointsprite
 .entity wps_helpme;
-.entity wps_flagbase; 
+.entity wps_flagbase;
 .entity wps_flagcarrier;
 .entity wps_flagdropped;
 .entity wps_enemyflagcarrier;
 .entity wps_flagcarrier;
 .entity wps_flagdropped;
 .entity wps_enemyflagcarrier;
index f0e4955b2d0eb849a146b5dbc68ce6f292171054..89e6fe485d8efba5489b687e4d38e5888946cade 100644 (file)
@@ -34,7 +34,7 @@ void dompoint_captured ()
        self.model = head.mdl;
        self.modelindex = head.dmg;
        self.skin = head.skin;
        self.model = head.mdl;
        self.modelindex = head.dmg;
        self.skin = head.skin;
-       
+
        float points, wait_time;
        if (autocvar_g_domination_point_amt)
                points = autocvar_g_domination_point_amt;
        float points, wait_time;
        if (autocvar_g_domination_point_amt)
                points = autocvar_g_domination_point_amt;
@@ -75,7 +75,7 @@ void dompoint_captured ()
        SUB_UseTargets ();
        self.delay = old_delay;
        self.team = old_team;
        SUB_UseTargets ();
        self.delay = old_delay;
        self.team = old_team;
-       
+
        switch(self.team)
        {
                case NUM_TEAM_1: msg = "dom-red"; break;
        switch(self.team)
        {
                case NUM_TEAM_1: msg = "dom-red"; break;
@@ -85,7 +85,7 @@ void dompoint_captured ()
        }
 
        WaypointSprite_UpdateSprites(self.sprite, msg, "", "");
        }
 
        WaypointSprite_UpdateSprites(self.sprite, msg, "", "");
-       
+
        total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
        for(head = world; (head = find(head, classname, "dom_controlpoint")) != world; )
        {
        total_pps = 0, pps_red = 0, pps_blue = 0, pps_yellow = 0, pps_pink = 0;
        for(head = world; (head = find(head, classname, "dom_controlpoint")) != world; )
        {
@@ -467,7 +467,7 @@ void dom_DelayedInit() // Do this check with a delay so we can wait for teams to
                print("No ""dom_team"" entities found on this map, creating them anyway.\n");
                dom_spawnteams();
        }
                print("No ""dom_team"" entities found on this map, creating them anyway.\n");
                dom_spawnteams();
        }
-       
+
        ScoreRules_dom();
 }
 
        ScoreRules_dom();
 }
 
@@ -479,13 +479,13 @@ void dom_Initialize()
        precache_model("models/domination/dom_pink.md3");
        precache_model("models/domination/dom_unclaimed.md3");
        precache_sound("domination/claim.wav");
        precache_model("models/domination/dom_pink.md3");
        precache_model("models/domination/dom_unclaimed.md3");
        precache_sound("domination/claim.wav");
-       
+
        addstat(STAT_DOM_TOTAL_PPS, AS_FLOAT, dom_total_pps);
        addstat(STAT_DOM_PPS_RED, AS_FLOAT, dom_pps_red);
        addstat(STAT_DOM_PPS_BLUE, AS_FLOAT, dom_pps_blue);
        if(c3 >= 0) addstat(STAT_DOM_PPS_YELLOW, AS_FLOAT, dom_pps_yellow);
        if(c4 >= 0) addstat(STAT_DOM_PPS_PINK, AS_FLOAT, dom_pps_pink);
        addstat(STAT_DOM_TOTAL_PPS, AS_FLOAT, dom_total_pps);
        addstat(STAT_DOM_PPS_RED, AS_FLOAT, dom_pps_red);
        addstat(STAT_DOM_PPS_BLUE, AS_FLOAT, dom_pps_blue);
        if(c3 >= 0) addstat(STAT_DOM_PPS_YELLOW, AS_FLOAT, dom_pps_yellow);
        if(c4 >= 0) addstat(STAT_DOM_PPS_PINK, AS_FLOAT, dom_pps_pink);
-       
+
        InitializeEntity(world, dom_DelayedInit, INITPRIO_GAMETYPE);
 }
 
        InitializeEntity(world, dom_DelayedInit, INITPRIO_GAMETYPE);
 }
 
@@ -494,7 +494,7 @@ MUTATOR_DEFINITION(gamemode_domination)
 {
        MUTATOR_HOOK(ClientConnect, dom_ClientConnect, CBC_ORDER_ANY);
        MUTATOR_HOOK(HavocBot_ChooseRule, dom_BotRoles, CBC_ORDER_ANY);
 {
        MUTATOR_HOOK(ClientConnect, dom_ClientConnect, CBC_ORDER_ANY);
        MUTATOR_HOOK(HavocBot_ChooseRule, dom_BotRoles, CBC_ORDER_ANY);
-       
+
        MUTATOR_ONADD
        {
                if(time > 1) // game loads at time 1
        MUTATOR_ONADD
        {
                if(time > 1) // game loads at time 1
index 38465aca706fddf5b67fa870e07f8c013ed09138..9bc06522374aaae4e22b810d3c1a73afbaf3b46c 100644 (file)
@@ -531,7 +531,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPhysics)
                }
                else
                        self.movement = '0 0 0';
                }
                else
                        self.movement = '0 0 0';
-                       
+
                self.disableclientprediction = 1;
        }
        return 1;
                self.disableclientprediction = 1;
        }
        return 1;
@@ -551,7 +551,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDamage_Calculate)
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_FALL, frag_target.netname);
                        Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_REVIVE_FALL);
                }
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_FALL, frag_target.netname);
                        Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_FREEZETAG_REVIVE_FALL);
                }
-       
+
                frag_damage = 0;
                frag_force = frag_force * autocvar_g_freezetag_frozen_force;
        }
                frag_damage = 0;
                frag_force = frag_force * autocvar_g_freezetag_frozen_force;
        }
@@ -562,7 +562,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerJump)
 {
        if(self.freezetag_frozen)
                return TRUE; // no jumping in freezetag when frozen
 {
        if(self.freezetag_frozen)
                return TRUE; // no jumping in freezetag when frozen
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -614,7 +614,7 @@ MUTATOR_HOOKFUNCTION(freezetag_VehicleTouch)
 {
        if(other.freezetag_frozen)
                return TRUE;
 {
        if(other.freezetag_frozen)
                return TRUE;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
index 98695f69352568aef4895b49dee981eb14eebf04..ec6ee8cd4c6d83b60ef19dec2e9d575439fb9127 100644 (file)
@@ -3,12 +3,12 @@
 //  Last updated: September, 2012
 // ===========================================================
 
 //  Last updated: September, 2012
 // ===========================================================
 
-float ka_ballcarrier_waypointsprite_visible_for_player(entity e) // runs on waypoints which are attached to ballcarriers, updates once per frame 
+float ka_ballcarrier_waypointsprite_visible_for_player(entity e) // runs on waypoints which are attached to ballcarriers, updates once per frame
 {
        if(e.ballcarried)
 {
        if(e.ballcarried)
-               if(IS_SPEC(other)) 
+               if(IS_SPEC(other))
                        return FALSE; // we don't want spectators of the ballcarrier to see the attached waypoint on the top of their screen
                        return FALSE; // we don't want spectators of the ballcarrier to see the attached waypoint on the top of their screen
-               
+
        // TODO: Make the ballcarrier lack a waypointsprite whenever they have the invisibility powerup
 
        return TRUE;
        // TODO: Make the ballcarrier lack a waypointsprite whenever they have the invisibility powerup
 
        return TRUE;
@@ -24,7 +24,7 @@ void ka_RespawnBall() // runs whenever the ball needs to be relocated
 {
        if(gameover) { return; }
        vector oldballorigin = self.origin;
 {
        if(gameover) { return; }
        vector oldballorigin = self.origin;
-       
+
        if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256))
        {
                makevectors(self.angles);
        if(MoveToRandomMapLocation(self, DPCONTENTS_SOLID | DPCONTENTS_CORPSE | DPCONTENTS_PLAYERCLIP, DPCONTENTS_SLIME | DPCONTENTS_LAVA | DPCONTENTS_SKY | DPCONTENTS_BODY | DPCONTENTS_DONOTENTER, Q3SURFACEFLAG_SKY, 10, 1024, 256))
        {
                makevectors(self.angles);
@@ -34,18 +34,18 @@ void ka_RespawnBall() // runs whenever the ball needs to be relocated
                self.effects = autocvar_g_keepawayball_effects;
                self.think = ka_RespawnBall;
                self.nextthink = time + autocvar_g_keepawayball_respawntime;
                self.effects = autocvar_g_keepawayball_effects;
                self.think = ka_RespawnBall;
                self.nextthink = time + autocvar_g_keepawayball_respawntime;
-               
+
                pointparticles(particleeffectnum("electro_combo"), oldballorigin, '0 0 0', 1);
                pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 1);
 
                WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1');
                pointparticles(particleeffectnum("electro_combo"), oldballorigin, '0 0 0', 1);
                pointparticles(particleeffectnum("electro_combo"), self.origin, '0 0 0', 1);
 
                WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1');
-               WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);    
+               WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);
 
 
-               sound(self, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere) 
+               sound(self, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
        }
        else
        {
        }
        else
        {
-               ka_RespawnBall(); // finding a location failed, retry 
+               ka_RespawnBall(); // finding a location failed, retry
        }
 }
 
        }
 }
 
@@ -55,7 +55,7 @@ void ka_TimeScoring()
        { // add points for holding the ball after a certain amount of time
                if(autocvar_g_keepaway_score_timepoints)
                        PlayerScore_Add(self.owner, SP_SCORE, autocvar_g_keepaway_score_timepoints);
        { // add points for holding the ball after a certain amount of time
                if(autocvar_g_keepaway_score_timepoints)
                        PlayerScore_Add(self.owner, SP_SCORE, autocvar_g_keepaway_score_timepoints);
-                       
+
                PlayerScore_Add(self.owner, SP_KEEPAWAY_BCTIME, (autocvar_g_keepaway_score_timeinterval / 1)); // interval is divided by 1 so that time always shows "seconds"
                self.nextthink = time + autocvar_g_keepaway_score_timeinterval;
        }
                PlayerScore_Add(self.owner, SP_KEEPAWAY_BCTIME, (autocvar_g_keepaway_score_timeinterval / 1)); // interval is divided by 1 so that time always shows "seconds"
                self.nextthink = time + autocvar_g_keepaway_score_timeinterval;
        }
@@ -71,11 +71,11 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
                return;
        }
        if(other.deadflag != DEAD_NO) { return; }
                return;
        }
        if(other.deadflag != DEAD_NO) { return; }
-       if (!IS_PLAYER(other)) 
+       if (!IS_PLAYER(other))
        {  // The ball just touched an object, most likely the world
                pointparticles(particleeffectnum("kaball_sparks"), self.origin, '0 0 0', 1);
                sound(self, CH_TRIGGER, "keepaway/touch.wav", VOL_BASE, ATTEN_NORM);
        {  // The ball just touched an object, most likely the world
                pointparticles(particleeffectnum("kaball_sparks"), self.origin, '0 0 0', 1);
                sound(self, CH_TRIGGER, "keepaway/touch.wav", VOL_BASE, ATTEN_NORM);
-               return; 
+               return;
        }
        else if(self.wait > time) { return; }
 
        }
        else if(self.wait > time) { return; }
 
@@ -84,7 +84,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        other.ballcarried = self;
        setattachment(self, other, "");
        setorigin(self, '0 0 0');
        other.ballcarried = self;
        setattachment(self, other, "");
        setorigin(self, '0 0 0');
-       
+
        // make the ball invisible/unable to do anything/set up time scoring
        self.velocity = '0 0 0';
        self.movetype = MOVETYPE_NONE;
        // make the ball invisible/unable to do anything/set up time scoring
        self.velocity = '0 0 0';
        self.movetype = MOVETYPE_NONE;
@@ -98,13 +98,13 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        other.glow_color = autocvar_g_keepawayball_trail_color;
        other.glow_trail = TRUE;
        other.effects |= autocvar_g_keepaway_ballcarrier_effects;
        other.glow_color = autocvar_g_keepawayball_trail_color;
        other.glow_trail = TRUE;
        other.effects |= autocvar_g_keepaway_ballcarrier_effects;
-       
+
        // messages and sounds
        ka_EventLog("pickup", other);
        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_KEEPAWAY_PICKUP, other.netname);
        Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, other.netname);
        // messages and sounds
        ka_EventLog("pickup", other);
        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_KEEPAWAY_PICKUP, other.netname);
        Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEEPAWAY_PICKUP, other.netname);
-       sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere) 
-       
+       sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
+
        // scoring
        PlayerScore_Add(other, SP_KEEPAWAY_PICKUPS, 1);
 
        // scoring
        PlayerScore_Add(other, SP_KEEPAWAY_PICKUPS, 1);
 
@@ -112,7 +112,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        WaypointSprite_AttachCarrier("ka-ballcarrier", other, RADARICON_FLAGCARRIER, '1 0 0');
        other.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = ka_ballcarrier_waypointsprite_visible_for_player;
        WaypointSprite_UpdateRule(other.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
        WaypointSprite_AttachCarrier("ka-ballcarrier", other, RADARICON_FLAGCARRIER, '1 0 0');
        other.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = ka_ballcarrier_waypointsprite_visible_for_player;
        WaypointSprite_UpdateRule(other.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
-       WaypointSprite_Ping(other.waypointsprite_attachedforcarrier);   
+       WaypointSprite_Ping(other.waypointsprite_attachedforcarrier);
        WaypointSprite_Kill(self.waypointsprite_attachedforcarrier);
 }
 
        WaypointSprite_Kill(self.waypointsprite_attachedforcarrier);
 }
 
@@ -122,21 +122,21 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los
        ball = plyr.ballcarried;
 
        if(!ball) { return; }
        ball = plyr.ballcarried;
 
        if(!ball) { return; }
-       
+
        // reset the ball
        setattachment(ball, world, "");
        ball.movetype = MOVETYPE_BOUNCE;
        // reset the ball
        setattachment(ball, world, "");
        ball.movetype = MOVETYPE_BOUNCE;
-       ball.wait = time + 1; 
+       ball.wait = time + 1;
        ball.touch = ka_TouchEvent;
        ball.think = ka_RespawnBall;
        ball.nextthink = time + autocvar_g_keepawayball_respawntime;
        ball.takedamage = DAMAGE_YES;
        ball.touch = ka_TouchEvent;
        ball.think = ka_RespawnBall;
        ball.nextthink = time + autocvar_g_keepawayball_respawntime;
        ball.takedamage = DAMAGE_YES;
-       ball.effects &= ~EF_NODRAW; 
+       ball.effects &= ~EF_NODRAW;
        setorigin(ball, plyr.origin + '0 0 10');
        ball.velocity = '0 0 200' + '0 100 0'*crandom() + '100 0 0'*crandom();
        setorigin(ball, plyr.origin + '0 0 10');
        ball.velocity = '0 0 200' + '0 100 0'*crandom() + '100 0 0'*crandom();
-       ball.owner.ballcarried = world; // I hope nothing checks to see if the world has the ball in the rest of my code :P 
+       ball.owner.ballcarried = world; // I hope nothing checks to see if the world has the ball in the rest of my code :P
        ball.owner = world;
        ball.owner = world;
-       
+
        // reset the player effects
        plyr.glow_trail = FALSE;
        plyr.effects &= ~autocvar_g_keepaway_ballcarrier_effects;
        // reset the player effects
        plyr.glow_trail = FALSE;
        plyr.effects &= ~autocvar_g_keepaway_ballcarrier_effects;
@@ -145,15 +145,15 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los
        ka_EventLog("dropped", plyr);
        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_KEEPAWAY_DROPPED, plyr.netname);
        Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEEPAWAY_DROPPED, plyr.netname);
        ka_EventLog("dropped", plyr);
        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_KEEPAWAY_DROPPED, plyr.netname);
        Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEEPAWAY_DROPPED, plyr.netname);
-       sound(other, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere) 
-       
+       sound(other, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTEN_NONE); // ATTEN_NONE (it's a sound intended to be heard anywhere)
+
        // scoring
        // PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless.
        // scoring
        // PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless.
-       
+
        // waypoints
        WaypointSprite_Spawn("ka-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1');
        WaypointSprite_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
        // waypoints
        WaypointSprite_Spawn("ka-ball", 0, 0, ball, '0 0 64', world, ball.team, ball, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1');
        WaypointSprite_UpdateRule(ball.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
-       WaypointSprite_Ping(ball.waypointsprite_attachedforcarrier);    
+       WaypointSprite_Ping(ball.waypointsprite_attachedforcarrier);
        WaypointSprite_Kill(plyr.waypointsprite_attachedforcarrier);
 }
 
        WaypointSprite_Kill(plyr.waypointsprite_attachedforcarrier);
 }
 
@@ -265,14 +265,14 @@ MUTATOR_HOOKFUNCTION(ka_Scoring)
 MUTATOR_HOOKFUNCTION(ka_GiveFragsForKill)
 {
        frag_score = 0; // no frags counted in keepaway
 MUTATOR_HOOKFUNCTION(ka_GiveFragsForKill)
 {
        frag_score = 0; // no frags counted in keepaway
-       return 1; // you deceptive little bugger ;3 This needs to be true in order for this function to even count. 
+       return 1; // you deceptive little bugger ;3 This needs to be true in order for this function to even count.
 }
 
 MUTATOR_HOOKFUNCTION(ka_PlayerPreThink)
 {
        // clear the item used for the ball in keepaway
        self.items &= ~IT_KEY1;
 }
 
 MUTATOR_HOOKFUNCTION(ka_PlayerPreThink)
 {
        // clear the item used for the ball in keepaway
        self.items &= ~IT_KEY1;
-       
+
        // if the player has the ball, make sure they have the item for it (Used for HUD primarily)
        if(self.ballcarried)
                self.items |= IT_KEY1;
        // if the player has the ball, make sure they have the item for it (Used for HUD primarily)
        if(self.ballcarried)
                self.items |= IT_KEY1;
@@ -331,13 +331,13 @@ MUTATOR_HOOKFUNCTION(ka_RemovePlayer)
 MUTATOR_HOOKFUNCTION(ka_PlayerPowerups)
 {
        // In the future this hook is supposed to allow me to do some extra stuff with waypointsprites and invisibility powerup
 MUTATOR_HOOKFUNCTION(ka_PlayerPowerups)
 {
        // In the future this hook is supposed to allow me to do some extra stuff with waypointsprites and invisibility powerup
-       // So bare with me until I can fix a certain bug with ka_ballcarrier_waypointsprite_visible_for_player() 
-       
+       // So bare with me until I can fix a certain bug with ka_ballcarrier_waypointsprite_visible_for_player()
+
        self.effects &= ~autocvar_g_keepaway_ballcarrier_effects;
 
        if(self.ballcarried)
                self.effects |= autocvar_g_keepaway_ballcarrier_effects;
        self.effects &= ~autocvar_g_keepaway_ballcarrier_effects;
 
        if(self.ballcarried)
                self.effects |= autocvar_g_keepaway_ballcarrier_effects;
-       
+
        return 0;
 }
 
        return 0;
 }
 
@@ -358,10 +358,10 @@ MUTATOR_HOOKFUNCTION(ka_BotRoles)
 void ka_SpawnBall() // loads various values for the ball, runs only once at start of match
 {
        if(!g_keepaway) { return; }
 void ka_SpawnBall() // loads various values for the ball, runs only once at start of match
 {
        if(!g_keepaway) { return; }
-       
+
        entity e;
        e = spawn();
        entity e;
        e = spawn();
-       e.model = "models/orbs/orbblue.md3";    
+       e.model = "models/orbs/orbblue.md3";
        precache_model(e.model);
        setmodel(e, e.model);
        setsize(e, '-16 -16 -20', '16 16 20'); // 20 20 20 was too big, player is only 16 16 24... gotta cheat with the Z (20) axis so that the particle isn't cut off
        precache_model(e.model);
        setmodel(e, e.model);
        setsize(e, '-16 -16 -20', '16 16 20'); // 20 20 20 was too big, player is only 16 16 24... gotta cheat with the Z (20) axis so that the particle isn't cut off
@@ -378,7 +378,7 @@ void ka_SpawnBall() // loads various values for the ball, runs only once at star
        e.owner = world;
        ka_ball = e;
 
        e.owner = world;
        ka_ball = e;
 
-       InitializeEntity(e, ka_RespawnBall, INITPRIO_SETLOCATION); // is this the right priority? Neh, I have no idea.. Well-- it works! So. 
+       InitializeEntity(e, ka_RespawnBall, INITPRIO_SETLOCATION); // is this the right priority? Neh, I have no idea.. Well-- it works! So.
 }
 
 void ka_ScoreRules()
 }
 
 void ka_ScoreRules()
@@ -394,7 +394,7 @@ void ka_Initialize() // run at the start of a match, initiates game mode
 {
        if(!g_keepaway)
                return;
 {
        if(!g_keepaway)
                return;
-               
+
        precache_sound("keepaway/pickedup.wav");
        precache_sound("keepaway/dropped.wav");
        precache_sound("keepaway/respawn.wav");
        precache_sound("keepaway/pickedup.wav");
        precache_sound("keepaway/dropped.wav");
        precache_sound("keepaway/respawn.wav");
index 138f161442012ce9834681c22e28e47b25c26c79..34d87f97bb677aaaa3c87c99a1b4a808938df8f3 100644 (file)
@@ -627,9 +627,9 @@ void kh_LoserTeam(float teem, entity lostkey)  // runs when a player pushes a fl
                        --j;
                }
        }
                        --j;
                }
        }
-       
+
        Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_4(lostkey, INFO_KEYHUNT_LOST_), lostkey.kh_previous_owner.netname);
        Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_4(lostkey, INFO_KEYHUNT_LOST_), lostkey.kh_previous_owner.netname);
-       
+
        play2all(kh_sound_destroy);
        te_tarexplosion(lostkey.origin);
 
        play2all(kh_sound_destroy);
        te_tarexplosion(lostkey.origin);
 
@@ -790,7 +790,7 @@ void kh_Key_DropOne(entity key)
        kh_Scores_Event(player, key, "dropkey", 0, 0);
        PlayerScore_Add(player, SP_KH_LOSSES, 1);
        Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_4(key, INFO_KEYHUNT_DROP_), player.netname);
        kh_Scores_Event(player, key, "dropkey", 0, 0);
        PlayerScore_Add(player, SP_KH_LOSSES, 1);
        Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_ENT_4(key, INFO_KEYHUNT_DROP_), player.netname);
-       
+
        kh_Key_AssignTo(key, world);
        makevectors(player.v_angle);
        key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_throwvelocity * v_forward, FALSE);
        kh_Key_AssignTo(key, world);
        makevectors(player.v_angle);
        key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_throwvelocity * v_forward, FALSE);
@@ -840,7 +840,7 @@ float kh_CheckPlayers(float num)
                                if(!tmp_player.BUTTON_CHAT)
                                        if(tmp_player.team == t_team)
                                                ++players;
                                if(!tmp_player.BUTTON_CHAT)
                                        if(tmp_player.team == t_team)
                                                ++players;
-               
+
                if (!players) { return t_team; }
        }
        return 0;
                if (!players) { return t_team; }
        }
        return 0;
@@ -893,7 +893,7 @@ void kh_StartRound()  // runs at the start of each round
                Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_WAIT, p1, p2, p3, p4);
                return;
        }
                Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_WAIT, p1, p2, p3, p4);
                return;
        }
-       
+
        Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT);
        Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT_OTHER);
 
        Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT);
        Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT_OTHER);
 
index f980607a7e5b71c2332707d07fc5827b4cd9633d..928c78b349470e078d3f22eacf4a2ffb377cd6b0 100644 (file)
@@ -22,7 +22,7 @@ MUTATOR_HOOKFUNCTION(lms_ResetMap)
 {
        lms_lowest_lives = 999;
        lms_next_place = player_count;
 {
        lms_lowest_lives = 999;
        lms_next_place = player_count;
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -32,7 +32,7 @@ MUTATOR_HOOKFUNCTION(lms_ResetPlayers)
        FOR_EACH_CLIENT(self)
        if(IS_PLAYER(self))
                PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives());
        FOR_EACH_CLIENT(self)
        if(IS_PLAYER(self))
                PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives());
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -49,7 +49,7 @@ MUTATOR_HOOKFUNCTION(lms_PlayerPreSpawn)
 MUTATOR_HOOKFUNCTION(lms_PlayerDies)
 {
        self.respawn_flags |= RESPAWN_FORCE;
 MUTATOR_HOOKFUNCTION(lms_PlayerDies)
 {
        self.respawn_flags |= RESPAWN_FORCE;
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -60,13 +60,13 @@ MUTATOR_HOOKFUNCTION(lms_RemovePlayer)
                self.frags = FRAGS_SPECTATOR;
        else
                self.frags = FRAGS_LMS_LOSER;
                self.frags = FRAGS_SPECTATOR;
        else
                self.frags = FRAGS_LMS_LOSER;
-               
+
        if(self.killcount != -666)
                if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0 && self.lms_spectate_warning != 2)
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_NOLIVES, self.netname);
                else
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_FORFEIT, self.netname);
        if(self.killcount != -666)
                if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0 && self.lms_spectate_warning != 2)
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_NOLIVES, self.netname);
                else
                        Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_LMS_FORFEIT, self.netname);
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -74,13 +74,13 @@ MUTATOR_HOOKFUNCTION(lms_ClientConnect)
 {
        self.classname = "player";
        campaign_bots_may_start = 1;
 {
        self.classname = "player";
        campaign_bots_may_start = 1;
-       
+
        if(PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives()) <= 0)
        {
                PlayerScore_Add(self, SP_LMS_RANK, 666);
                self.frags = FRAGS_SPECTATOR;
        }
        if(PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives()) <= 0)
        {
                PlayerScore_Add(self, SP_LMS_RANK, 666);
                self.frags = FRAGS_SPECTATOR;
        }
-                       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -88,7 +88,7 @@ MUTATOR_HOOKFUNCTION(lms_PlayerThink)
 {
        if(self.deadflag == DEAD_DYING)
                self.deadflag = DEAD_RESPAWNING;
 {
        if(self.deadflag == DEAD_DYING)
                self.deadflag = DEAD_RESPAWNING;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -115,7 +115,7 @@ MUTATOR_HOOKFUNCTION(lms_GiveFragsForKill)
                --lms_next_place;
        }
        frag_score = 0;
                --lms_next_place;
        }
        frag_score = 0;
-               
+
        return TRUE;
 }
 
        return TRUE;
 }
 
@@ -147,7 +147,7 @@ MUTATOR_HOOKFUNCTION(lms_FilterItem)
                self.max_health = 1;
                return FALSE;
        }
                self.max_health = 1;
                return FALSE;
        }
-       
+
        return TRUE;
 }
 
        return TRUE;
 }
 
@@ -159,7 +159,7 @@ MUTATOR_HOOKFUNCTION(lms_ItemTouch)
                Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES);
                PlayerScore_Add(other, SP_LMS_LIVES, autocvar_g_lms_extra_lives);
        }
                Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES);
                PlayerScore_Add(other, SP_LMS_LIVES, autocvar_g_lms_extra_lives);
        }
-       
+
        return MUT_ITEMTOUCH_CONTINUE;
 }
 
        return MUT_ITEMTOUCH_CONTINUE;
 }
 
@@ -176,7 +176,7 @@ void lms_Initialize()
 {
        lms_lowest_lives = 9999;
        lms_next_place = 0;
 {
        lms_lowest_lives = 9999;
        lms_next_place = 0;
-       
+
        lms_ScoreRules();
 }
 
        lms_ScoreRules();
 }
 
index 75dc8fda5bdaaf9addbe7293ebe24fffea4704b0..2d2c857e90dbff166c673e53f05488bb6970e878 100644 (file)
@@ -107,7 +107,7 @@ void GiveBall(entity plyr, entity ball)
        {
                WaypointSprite_Kill(ball.waypointsprite_attachedforcarrier);
        }
        {
                WaypointSprite_Kill(ball.waypointsprite_attachedforcarrier);
        }
-       
+
        //setattachment(ball, plyr, "");
        setorigin(ball, plyr.origin + plyr.view_ofs);
 
        //setattachment(ball, plyr, "");
        setorigin(ball, plyr.origin + plyr.view_ofs);
 
@@ -136,9 +136,9 @@ void GiveBall(entity plyr, entity ball)
                ball.think = DropOwner;
                ball.nextthink = time + autocvar_g_nexball_basketball_delay_hold;
        }
                ball.think = DropOwner;
                ball.nextthink = time + autocvar_g_nexball_basketball_delay_hold;
        }
-       
+
        ownr = self;
        ownr = self;
-       self = plyr;    
+       self = plyr;
        self.weaponentity.weapons = self.weapons;
        self.weaponentity.switchweapon = self.weapon;
        self.weapons = WEPSET_PORTO;
        self.weaponentity.weapons = self.weapons;
        self.weaponentity.switchweapon = self.weapon;
        self.weapons = WEPSET_PORTO;
@@ -655,13 +655,13 @@ void W_Nexball_Think()
        //dprint("W_Nexball_Think\n");
        //vector new_dir = steerlib_arrive(self.enemy.origin, 2500);
        vector new_dir = normalize(self.enemy.origin + '0 0 50' - self.origin);
        //dprint("W_Nexball_Think\n");
        //vector new_dir = steerlib_arrive(self.enemy.origin, 2500);
        vector new_dir = normalize(self.enemy.origin + '0 0 50' - self.origin);
-       vector old_dir = normalize(self.velocity);       
-       float _speed = vlen(self.velocity);     
+       vector old_dir = normalize(self.velocity);
+       float _speed = vlen(self.velocity);
        vector new_vel = normalize(old_dir + (new_dir * autocvar_g_nexball_safepass_turnrate)) * _speed;
        //vector new_vel = (new_dir * autocvar_g_nexball_safepass_turnrate
        vector new_vel = normalize(old_dir + (new_dir * autocvar_g_nexball_safepass_turnrate)) * _speed;
        //vector new_vel = (new_dir * autocvar_g_nexball_safepass_turnrate
-       
+
        self.velocity = new_vel;
        self.velocity = new_vel;
-       
+
        self.nextthink = time;
 }
 
        self.nextthink = time;
 }
 
@@ -671,7 +671,7 @@ void W_Nexball_Touch(void)
        attacker = self.owner;
        //self.think = func_null;
        //self.enemy = world;
        attacker = self.owner;
        //self.think = func_null;
        //self.enemy = world;
-       
+
        PROJECTILE_TOUCH;
        if(attacker.team != other.team || autocvar_g_nexball_basketball_teamsteal)
                if((ball = other.ballcarried) && (IS_PLAYER(attacker)))
        PROJECTILE_TOUCH;
        if(attacker.team != other.team || autocvar_g_nexball_basketball_teamsteal)
                if((ball = other.ballcarried) && (IS_PLAYER(attacker)))
@@ -725,9 +725,9 @@ void W_Nexball_Attack(float t)
                        mul = 2 - mul;
                mul = mi + (ma - mi) * mul; // range from the minimal power to the maximal power
        }
                        mul = 2 - mul;
                mul = mi + (ma - mi) * mul; // range from the minimal power to the maximal power
        }
-       
+
        DropBall(ball, w_shotorg, W_CalculateProjectileVelocity(self.velocity, w_shotdir * autocvar_g_balance_nexball_primary_speed * mul, FALSE));
        DropBall(ball, w_shotorg, W_CalculateProjectileVelocity(self.velocity, w_shotdir * autocvar_g_balance_nexball_primary_speed * mul, FALSE));
-       
+
 
        //TODO: use the speed_up cvar too ??
 }
 
        //TODO: use the speed_up cvar too ??
 }
@@ -743,10 +743,10 @@ void W_Nexball_Attack2(void)
                _ball.nextthink = time;
                return;
        }
                _ball.nextthink = time;
                return;
        }
-       
+
        if(!autocvar_g_nexball_tackling)
                return;
        if(!autocvar_g_nexball_tackling)
                return;
-       
+
        entity missile;
        if(!(balls & BALL_BASKET))
                return;
        entity missile;
        if(!(balls & BALL_BASKET))
                return;
@@ -782,8 +782,8 @@ float ball_customize()
                self.scale = 1;
                self.customizeentityforclient = func_null;
                return TRUE;
                self.scale = 1;
                self.customizeentityforclient = func_null;
                return TRUE;
-       }               
-       
+       }
+
        if(other == self.owner)
        {
                self.scale = autocvar_g_nexball_viewmodel_scale;
        if(other == self.owner)
        {
                self.scale = autocvar_g_nexball_viewmodel_scale;
@@ -791,13 +791,13 @@ float ball_customize()
                        self.effects |= EF_FLAME;
                else
                        self.effects &= ~EF_FLAME;
                        self.effects |= EF_FLAME;
                else
                        self.effects &= ~EF_FLAME;
-       }       
+       }
        else
        {
                self.effects &= ~EF_FLAME;
                self.scale = 1;
        }
        else
        {
                self.effects &= ~EF_FLAME;
                self.scale = 1;
        }
-               
+
        return TRUE;
 }
 
        return TRUE;
 }
 
@@ -875,18 +875,18 @@ MUTATOR_HOOKFUNCTION(nexball_PlayerPreThink)
 {
        makevectors(self.v_angle);
        if(nexball_mode & NBM_BASKETBALL)
 {
        makevectors(self.v_angle);
        if(nexball_mode & NBM_BASKETBALL)
-       {               
+       {
                if(self.ballcarried)
                {
                        // 'view ball'
                if(self.ballcarried)
                {
                        // 'view ball'
-                       self.ballcarried.velocity = self.velocity;                      
+                       self.ballcarried.velocity = self.velocity;
                        self.ballcarried.customizeentityforclient = ball_customize;
                        self.ballcarried.customizeentityforclient = ball_customize;
-                       
-                       setorigin(self.ballcarried, self.origin + self.view_ofs + 
-                                         v_forward * autocvar_g_nexball_viewmodel_offset_x + 
-                                         v_right * autocvar_g_nexball_viewmodel_offset_y + 
-                                         v_up * autocvar_g_nexball_viewmodel_offset_z);        
-                                         
+
+                       setorigin(self.ballcarried, self.origin + self.view_ofs +
+                                         v_forward * autocvar_g_nexball_viewmodel_offset_x +
+                                         v_right * autocvar_g_nexball_viewmodel_offset_y +
+                                         v_up * autocvar_g_nexball_viewmodel_offset_z);
+
                        // 'safe passing'
                        if(autocvar_g_nexball_safepass_maxdist)
                        {
                        // 'safe passing'
                        if(autocvar_g_nexball_safepass_maxdist)
                        {
@@ -895,50 +895,50 @@ MUTATOR_HOOKFUNCTION(nexball_PlayerPreThink)
                                        //centerprint(self, sprintf("Lost lock on %s", self.ballcarried.enemy.netname));
                                        self.ballcarried.enemy = world;
                                }
                                        //centerprint(self, sprintf("Lost lock on %s", self.ballcarried.enemy.netname));
                                        self.ballcarried.enemy = world;
                                }
-                                       
-                               
+
+
                                //tracebox(self.origin + self.view_ofs, '-2 -2 -2', '2 2 2', self.origin + self.view_ofs + v_forward * autocvar_g_nexball_safepass_maxdist);
                                crosshair_trace(self);
                                //tracebox(self.origin + self.view_ofs, '-2 -2 -2', '2 2 2', self.origin + self.view_ofs + v_forward * autocvar_g_nexball_safepass_maxdist);
                                crosshair_trace(self);
-                               if( trace_ent && 
+                               if( trace_ent &&
                                        IS_CLIENT(trace_ent) &&
                                        trace_ent.deadflag == DEAD_NO &&
                                        trace_ent.team == self.team &&
                                        vlen(trace_ent.origin - self.origin) <= autocvar_g_nexball_safepass_maxdist )
                                {
                                        IS_CLIENT(trace_ent) &&
                                        trace_ent.deadflag == DEAD_NO &&
                                        trace_ent.team == self.team &&
                                        vlen(trace_ent.origin - self.origin) <= autocvar_g_nexball_safepass_maxdist )
                                {
-                                       
+
                                        //if(self.ballcarried.enemy != trace_ent)
                                        //      centerprint(self, sprintf("Locked to %s", trace_ent.netname));
                                        self.ballcarried.enemy = trace_ent;
                                        self.ballcarried.wait = time + autocvar_g_nexball_safepass_holdtime;
                                        //if(self.ballcarried.enemy != trace_ent)
                                        //      centerprint(self, sprintf("Locked to %s", trace_ent.netname));
                                        self.ballcarried.enemy = trace_ent;
                                        self.ballcarried.wait = time + autocvar_g_nexball_safepass_holdtime;
-                                       
-                                       
+
+
                                }
                        }
                }
                else
                                }
                        }
                }
                else
-               {                       
+               {
                        if(self.weaponentity.weapons)
                        {
                                self.weapons = self.weaponentity.weapons;
                                weapon_action(WEP_PORTO, WR_RESETPLAYER);
                                self.switchweapon = self.weaponentity.switchweapon;
                                W_SwitchWeapon(self.switchweapon);
                        if(self.weaponentity.weapons)
                        {
                                self.weapons = self.weaponentity.weapons;
                                weapon_action(WEP_PORTO, WR_RESETPLAYER);
                                self.switchweapon = self.weaponentity.switchweapon;
                                W_SwitchWeapon(self.switchweapon);
-                               
+
                self.weaponentity.weapons = '0 0 0';
                        }
                }
                self.weaponentity.weapons = '0 0 0';
                        }
                }
-               
+
        }
        }
-       
+
        nexball_setstatus();
        nexball_setstatus();
-       
+
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(nexball_PlayerSpawn)
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(nexball_PlayerSpawn)
-{      
+{
        self.weaponentity.weapons = '0 0 0';
        self.weaponentity.weapons = '0 0 0';
-       
+
        if(nexball_mode & NBM_BASKETBALL)
                self.weapons |= WEPSET_PORTO;
        else
        if(nexball_mode & NBM_BASKETBALL)
                self.weapons |= WEPSET_PORTO;
        else
@@ -950,7 +950,7 @@ MUTATOR_HOOKFUNCTION(nexball_PlayerSpawn)
 MUTATOR_HOOKFUNCTION(nexball_SetStartItems)
 {
        start_items |= IT_UNLIMITED_SUPERWEAPONS; // FIXME BAD BAD BAD BAD HACK, NEXBALL SHOULDN'T ABUSE PORTO'S WEAPON SLOT
 MUTATOR_HOOKFUNCTION(nexball_SetStartItems)
 {
        start_items |= IT_UNLIMITED_SUPERWEAPONS; // FIXME BAD BAD BAD BAD HACK, NEXBALL SHOULDN'T ABUSE PORTO'S WEAPON SLOT
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
index a419d7b1f3b416525f2839ecc4f218d98aef9483..fa82cabb218873ca8f1e2679757fd3602af0f5c4 100644 (file)
@@ -407,12 +407,12 @@ void onslaught_generator_think()
                                                d = d + 1;
                                e = e.chain;
                        }
                                                d = d + 1;
                                e = e.chain;
                        }
-                       
+
                        if(autocvar_g_campaign && autocvar__campaign_testrun)
                                d = d * self.max_health;
                        else
                                d = d * self.max_health / max(30, 60 * autocvar_timelimit_suddendeath);
                        if(autocvar_g_campaign && autocvar__campaign_testrun)
                                d = d * self.max_health;
                        else
                                d = d * self.max_health / max(30, 60 * autocvar_timelimit_suddendeath);
-                       
+
                        Damage(self, self, self, d, DEATH_HURTTRIGGER, self.origin, '0 0 0');
                }
                else if (overtime_msg_time)
                        Damage(self, self, self, d, DEATH_HURTTRIGGER, self.origin, '0 0 0');
                }
                else if (overtime_msg_time)
@@ -910,13 +910,13 @@ void spawnfunc_onslaught_generator()
        precache_sound("onslaught/electricity_explode.wav");
        if (!self.team)
                objerror("team must be set");
        precache_sound("onslaught/electricity_explode.wav");
        if (!self.team)
                objerror("team must be set");
-       
+
        if(self.team == NUM_TEAM_1)
         ons_red_generator = self;
 
        if(self.team == NUM_TEAM_2)
         ons_blue_generator = self;
        if(self.team == NUM_TEAM_1)
         ons_red_generator = self;
 
        if(self.team == NUM_TEAM_2)
         ons_blue_generator = self;
-        
+
        self.team_saved = self.team;
        self.colormap = 1024 + (self.team - 1) * 17;
        self.solid = SOLID_BBOX;
        self.team_saved = self.team;
        self.colormap = 1024 + (self.team - 1) * 17;
        self.solid = SOLID_BBOX;
@@ -956,7 +956,7 @@ void spawnfunc_onslaught_generator()
        waypoint_spawnforitem(self);
 
        onslaught_updatelinks();
        waypoint_spawnforitem(self);
 
        onslaught_updatelinks();
-       
+
        self.reset = onslaught_generator_reset;
 }
 
        self.reset = onslaught_generator_reset;
 }
 
@@ -1084,7 +1084,7 @@ void onslaught_controlpoint_icon_think()
         float _friendly_count = 0;
         float _dist;
         entity _player;
         float _friendly_count = 0;
         float _dist;
         entity _player;
-        
+
         FOR_EACH_PLAYER(_player)
         {
             if(!_player.deadflag)
         FOR_EACH_PLAYER(_player)
         {
             if(!_player.deadflag)
@@ -1226,7 +1226,7 @@ void onslaught_controlpoint_icon_buildthink()
        a = onslaught_controlpoint_can_be_linked(self.owner, self.owner.team);
        if(!a)
                return;
        a = onslaught_controlpoint_can_be_linked(self.owner, self.owner.team);
        if(!a)
                return;
-    
+
        self.health = self.health + self.count;
 
        if (self.health >= self.max_health)
        self.health = self.health + self.count;
 
        if (self.health >= self.max_health)
@@ -1524,24 +1524,24 @@ MUTATOR_HOOKFUNCTION(ons_BuildMutatorsPrettyString)
 
 MUTATOR_HOOKFUNCTION(ons_Spawn_Score)
 {
 
 MUTATOR_HOOKFUNCTION(ons_Spawn_Score)
 {
-    
+
     /*
     float _neer_home = (random() > 0.5 ? TRUE : FALSE);
     /*
     float _neer_home = (random() > 0.5 ? TRUE : FALSE);
-    
+
        RandomSelection_Init();
        RandomSelection_Init();
-       
+
        if(self.team == NUM_TEAM_1)
         RandomSelection_Add(ons_red_generator, 0, string_null, 1, 1);
        if(self.team == NUM_TEAM_1)
         RandomSelection_Add(ons_red_generator, 0, string_null, 1, 1);
-       
+
        if(self.team == NUM_TEAM_2)
         RandomSelection_Add(ons_blue_generator, 0, string_null, 1, 1);
        if(self.team == NUM_TEAM_2)
         RandomSelection_Add(ons_blue_generator, 0, string_null, 1, 1);
-       
+
        entity _cp = findchain(classname, "onslaught_controlpoint"):
        while _cp;
        {
        entity _cp = findchain(classname, "onslaught_controlpoint"):
        while _cp;
        {
-           if(_cp.team == self.team)            
+           if(_cp.team == self.team)
             RandomSelection_Add(_cp, 0, string_null, 1, 1);
             RandomSelection_Add(_cp, 0, string_null, 1, 1);
-               
+
                _cp = _cp.chain;
        }
 
                _cp = _cp.chain;
        }
 
@@ -1552,9 +1552,9 @@ MUTATOR_HOOKFUNCTION(ons_Spawn_Score)
        }
        else if(self.team == spawn_spot.team)
                spawn_score_x += SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM; // prefer same team, if we can't find a spawn near teammate
        }
        else if(self.team == spawn_spot.team)
                spawn_score_x += SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM; // prefer same team, if we can't find a spawn near teammate
-    
+
     */
     */
-    
+
        return 0;
 }
 
        return 0;
 }
 
@@ -1562,55 +1562,55 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn)
 {
     if(!autocvar_g_onslaught_spawn_at_controlpoints)
         return 0;
 {
     if(!autocvar_g_onslaught_spawn_at_controlpoints)
         return 0;
-        
+
     if(random() < 0.5)  // 50/50 chane to use default spawnsystem.
         return 0;
     if(random() < 0.5)  // 50/50 chane to use default spawnsystem.
         return 0;
-    
+
     float _close_to_home = ((random() > 0.5) ? TRUE : FALSE);
     entity _best = world, _trg_gen = world;
     float _score, _best_score = MAX_SHOT_DISTANCE;
     float _close_to_home = ((random() > 0.5) ? TRUE : FALSE);
     entity _best = world, _trg_gen = world;
     float _score, _best_score = MAX_SHOT_DISTANCE;
-    
+
        RandomSelection_Init();
        RandomSelection_Init();
-    
+
        if(self.team == NUM_TEAM_1)
        {
            if(!_close_to_home)
             _trg_gen = ons_blue_generator;
        if(self.team == NUM_TEAM_1)
        {
            if(!_close_to_home)
             _trg_gen = ons_blue_generator;
-        else    
-            _trg_gen  = ons_red_generator;        
+        else
+            _trg_gen  = ons_red_generator;
        }
        }
-       
+
        if(self.team == NUM_TEAM_2)
        {
            if(_close_to_home)
             _trg_gen = ons_blue_generator;
        if(self.team == NUM_TEAM_2)
        {
            if(_close_to_home)
             _trg_gen = ons_blue_generator;
-        else    
-            _trg_gen  = ons_red_generator;        
+        else
+            _trg_gen  = ons_red_generator;
        }
        }
-       
+
        entity _cp = findchain(classname, "onslaught_controlpoint");
        while(_cp)
        {
        entity _cp = findchain(classname, "onslaught_controlpoint");
        while(_cp)
        {
-           if(_cp.team == self.team)            
-        {            
+           if(_cp.team == self.team)
+        {
             _score = vlen(_trg_gen.origin - _cp.origin);
             if(_score < _best_score)
             {
                 _best = _cp;
             _score = vlen(_trg_gen.origin - _cp.origin);
             if(_score < _best_score)
             {
                 _best = _cp;
-                _best_score = _score;            
+                _best_score = _score;
             }
             }
-        }              
+        }
                _cp = _cp.chain;
        }
                _cp = _cp.chain;
        }
-       
-    vector _loc;        
-    float i;    
+
+    vector _loc;
+    float i;
     if(_best)
     {
         for(i = 0; i < 10; ++i)
         {
             _loc = _best.origin + '0 0 96';
     if(_best)
     {
         for(i = 0; i < 10; ++i)
         {
             _loc = _best.origin + '0 0 96';
-            _loc += ('0 1 0' * random()) * 128; 
+            _loc += ('0 1 0' * random()) * 128;
             tracebox(_loc, PL_MIN, PL_MAX, _loc, MOVE_NORMAL, self);
             if(trace_fraction == 1.0 && !trace_startsolid)
             {
             tracebox(_loc, PL_MIN, PL_MAX, _loc, MOVE_NORMAL, self);
             if(trace_fraction == 1.0 && !trace_startsolid)
             {
@@ -1624,13 +1624,13 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn)
     {
         if(!autocvar_g_onslaught_spawn_at_generator)
             return 0;
     {
         if(!autocvar_g_onslaught_spawn_at_generator)
             return 0;
-        
+
         _trg_gen = ((self.team == NUM_TEAM_1) ? ons_red_generator : ons_blue_generator);
         _trg_gen = ((self.team == NUM_TEAM_1) ? ons_red_generator : ons_blue_generator);
-        
+
         for(i = 0; i < 10; ++i)
         {
             _loc = _trg_gen.origin + '0 0 96';
         for(i = 0; i < 10; ++i)
         {
             _loc = _trg_gen.origin + '0 0 96';
-            _loc += ('0 1 0' * random()) * 128; 
+            _loc += ('0 1 0' * random()) * 128;
             tracebox(_loc, PL_MIN, PL_MAX, _loc, MOVE_NORMAL, self);
             if(trace_fraction == 1.0 && !trace_startsolid)
             {
             tracebox(_loc, PL_MIN, PL_MAX, _loc, MOVE_NORMAL, self);
             if(trace_fraction == 1.0 && !trace_startsolid)
             {
@@ -1640,7 +1640,7 @@ MUTATOR_HOOKFUNCTION(ons_PlayerSpawn)
             }
         }
     }
             }
         }
     }
-    
+
     return 0;
 }
 
     return 0;
 }
 
index adffdece9b84ea040b7fd2735dc57f3a6c733b16..4d990b3cf50608d151a22d771d8b660f54a790f5 100644 (file)
@@ -6,14 +6,14 @@ MUTATOR_HOOKFUNCTION(bloodloss_PlayerThink)
        if(self.health <= autocvar_g_bloodloss && self.deadflag == DEAD_NO)
        {
                self.BUTTON_CROUCH = TRUE;
        if(self.health <= autocvar_g_bloodloss && self.deadflag == DEAD_NO)
        {
                self.BUTTON_CROUCH = TRUE;
-               
+
                if(time >= self.bloodloss_timer)
                {
                        self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
                        self.bloodloss_timer = time + 0.5 + random() * 0.5;
                }
        }
                if(time >= self.bloodloss_timer)
                {
                        self.event_damage(self, self, 1, DEATH_ROT, self.origin, '0 0 0');
                        self.bloodloss_timer = time + 0.5 + random() * 0.5;
                }
        }
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -21,7 +21,7 @@ MUTATOR_HOOKFUNCTION(bloodloss_PlayerJump)
 {
        if(self.health <= autocvar_g_bloodloss)
                return TRUE;
 {
        if(self.health <= autocvar_g_bloodloss)
                return TRUE;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
index d9d219c5adad4b8a50b8b6c764b754c7442247c2..fb20d1cff2ea83e829708ba30bd999f2518bb7b5 100644 (file)
@@ -4,7 +4,7 @@
 MUTATOR_HOOKFUNCTION(campcheck_PlayerDies)
 {
        Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_CAMPCHECK);
 MUTATOR_HOOKFUNCTION(campcheck_PlayerDies)
 {
        Kill_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER_CPID, CPID_CAMPCHECK);
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -17,7 +17,7 @@ MUTATOR_HOOKFUNCTION(campcheck_PlayerDamage)
                frag_target.campcheck_traveled_distance = autocvar_g_campcheck_distance;
                frag_attacker.campcheck_traveled_distance = autocvar_g_campcheck_distance;
        }
                frag_target.campcheck_traveled_distance = autocvar_g_campcheck_distance;
                frag_attacker.campcheck_traveled_distance = autocvar_g_campcheck_distance;
        }
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -62,7 +62,7 @@ MUTATOR_HOOKFUNCTION(campcheck_PlayerSpawn)
 {
        self.campcheck_nextcheck = time + autocvar_g_campcheck_interval * 2;
        self.campcheck_traveled_distance = 0;
 {
        self.campcheck_nextcheck = time + autocvar_g_campcheck_interval * 2;
        self.campcheck_traveled_distance = 0;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
index 2eaa5f0b24725c5b2c1adc133c4ce0dd2267e057..3f808499a8d4a5bd015b28ceec3a86d62797b3b2 100644 (file)
@@ -34,7 +34,7 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) {
        float velocity_difference;
        float clean_up_and_do_nothing;
        float horiz_speed = autocvar_sv_dodging_horiz_speed;
        float velocity_difference;
        float clean_up_and_do_nothing;
        float horiz_speed = autocvar_sv_dodging_horiz_speed;
-       
+
        if(self.freezetag_frozen)
                horiz_speed = autocvar_sv_dodging_horiz_speed_frozen;
 
        if(self.freezetag_frozen)
                horiz_speed = autocvar_sv_dodging_horiz_speed_frozen;
 
@@ -61,13 +61,13 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) {
        // make sure v_up, v_right and v_forward are sane
        makevectors(self.angles);
 
        // make sure v_up, v_right and v_forward are sane
        makevectors(self.angles);
 
-       // if we have e.g. 0.5 sec ramptime and a frametime of 0.25, then the ramp code 
-       // will be called ramp_time/frametime times = 2 times. so, we need to 
+       // if we have e.g. 0.5 sec ramptime and a frametime of 0.25, then the ramp code
+       // will be called ramp_time/frametime times = 2 times. so, we need to
        // add 0.5 * the total speed each frame until the dodge action is done..
        common_factor = sys_frametime / autocvar_sv_dodging_ramp_time;
 
        // if ramp time is smaller than frametime we get problems ;D
        // add 0.5 * the total speed each frame until the dodge action is done..
        common_factor = sys_frametime / autocvar_sv_dodging_ramp_time;
 
        // if ramp time is smaller than frametime we get problems ;D
-       if (common_factor > 1) 
+       if (common_factor > 1)
                common_factor = 1;
 
        new_velocity_gain = self.dodging_velocity_gain - (common_factor * horiz_speed);
                common_factor = 1;
 
        new_velocity_gain = self.dodging_velocity_gain - (common_factor * horiz_speed);
@@ -81,8 +81,8 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) {
                //disable jump key during dodge accel phase
                if (self.movement_z > 0) self.movement_z = 0;
 
                //disable jump key during dodge accel phase
                if (self.movement_z > 0) self.movement_z = 0;
 
-               self.velocity = 
-                         self.velocity 
+               self.velocity =
+                         self.velocity
                        + ((self.dodging_direction_y * velocity_difference) * v_right)
                        + ((self.dodging_direction_x * velocity_difference) * v_forward);
 
                        + ((self.dodging_direction_y * velocity_difference) * v_right)
                        + ((self.dodging_direction_x * velocity_difference) * v_forward);
 
@@ -93,8 +93,8 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) {
        if (self.dodging_single_action == 1) {
                self.flags &= ~FL_ONGROUND;
 
        if (self.dodging_single_action == 1) {
                self.flags &= ~FL_ONGROUND;
 
-               self.velocity = 
-                         self.velocity 
+               self.velocity =
+                         self.velocity
                        + (autocvar_sv_dodging_up_speed * v_up);
 
                if (autocvar_sv_dodging_sound == 1)
                        + (autocvar_sv_dodging_up_speed * v_up);
 
                if (autocvar_sv_dodging_sound == 1)
@@ -168,7 +168,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
 
        tap_direction_x = 0;
        tap_direction_y = 0;
 
        tap_direction_x = 0;
        tap_direction_y = 0;
-       
+
        float frozen_dodging;
        frozen_dodging = (self.freezetag_frozen && autocvar_sv_dodging_frozen);
 
        float frozen_dodging;
        frozen_dodging = (self.freezetag_frozen && autocvar_sv_dodging_frozen);
 
@@ -182,14 +182,14 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
        if ((time - self.last_dodging_time) < autocvar_sv_dodging_delay)
                return 0;
 
        if ((time - self.last_dodging_time) < autocvar_sv_dodging_delay)
                return 0;
 
-       if (check_close_to_ground(autocvar_sv_dodging_height_threshold) != 1 
+       if (check_close_to_ground(autocvar_sv_dodging_height_threshold) != 1
                && check_close_to_wall(autocvar_sv_dodging_wall_distance_threshold) != 1)
                return 0;
 
        if (self.movement_x > 0) {
                // is this a state change?
                if (!(self.pressedkeys & KEY_FORWARD) || frozen_dodging) {
                && check_close_to_wall(autocvar_sv_dodging_wall_distance_threshold) != 1)
                return 0;
 
        if (self.movement_x > 0) {
                // is this a state change?
                if (!(self.pressedkeys & KEY_FORWARD) || frozen_dodging) {
-                       if ((time - self.last_FORWARD_KEY_time) < self.cvar_cl_dodging_timeout) { 
+                       if ((time - self.last_FORWARD_KEY_time) < self.cvar_cl_dodging_timeout) {
                                tap_direction_x = 1.0;
                                dodge_detected = 1;
                        }
                                tap_direction_x = 1.0;
                                dodge_detected = 1;
                        }
@@ -201,7 +201,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
                // is this a state change?
                if (!(self.pressedkeys & KEY_BACKWARD) || frozen_dodging) {
                        tap_direction_x = -1.0;
                // is this a state change?
                if (!(self.pressedkeys & KEY_BACKWARD) || frozen_dodging) {
                        tap_direction_x = -1.0;
-                       if ((time - self.last_BACKWARD_KEY_time) < self.cvar_cl_dodging_timeout)        { 
+                       if ((time - self.last_BACKWARD_KEY_time) < self.cvar_cl_dodging_timeout)        {
                                dodge_detected = 1;
                        }
                        self.last_BACKWARD_KEY_time = time;
                                dodge_detected = 1;
                        }
                        self.last_BACKWARD_KEY_time = time;
@@ -212,7 +212,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
                // is this a state change?
                if (!(self.pressedkeys & KEY_RIGHT) || frozen_dodging) {
                        tap_direction_y = 1.0;
                // is this a state change?
                if (!(self.pressedkeys & KEY_RIGHT) || frozen_dodging) {
                        tap_direction_y = 1.0;
-                       if ((time - self.last_RIGHT_KEY_time) < self.cvar_cl_dodging_timeout)   { 
+                       if ((time - self.last_RIGHT_KEY_time) < self.cvar_cl_dodging_timeout)   {
                                dodge_detected = 1;
                        }
                        self.last_RIGHT_KEY_time = time;
                                dodge_detected = 1;
                        }
                        self.last_RIGHT_KEY_time = time;
@@ -223,7 +223,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
                // is this a state change?
                if (!(self.pressedkeys & KEY_LEFT) || frozen_dodging) {
                        tap_direction_y = -1.0;
                // is this a state change?
                if (!(self.pressedkeys & KEY_LEFT) || frozen_dodging) {
                        tap_direction_y = -1.0;
-                       if ((time - self.last_LEFT_KEY_time) < self.cvar_cl_dodging_timeout)    { 
+                       if ((time - self.last_LEFT_KEY_time) < self.cvar_cl_dodging_timeout)    {
                                dodge_detected = 1;
                        }
                        self.last_LEFT_KEY_time = time;
                                dodge_detected = 1;
                        }
                        self.last_LEFT_KEY_time = time;
index 33d0e27b6b64734daf57dc385cdce6d15a4c1399..73b7dd949939c691173ebf0b683dfd451f72238b 100644 (file)
@@ -2,10 +2,10 @@ MUTATOR_HOOKFUNCTION(melee_SetStartItems)
 {
        start_ammo_shells = 0;
        warmup_start_ammo_shells = 0;
 {
        start_ammo_shells = 0;
        warmup_start_ammo_shells = 0;
-       
+
        start_weapons = WEPSET_SHOTGUN;
        warmup_start_weapons = WEPSET_SHOTGUN;
        start_weapons = WEPSET_SHOTGUN;
        warmup_start_weapons = WEPSET_SHOTGUN;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -17,7 +17,7 @@ MUTATOR_HOOKFUNCTION(melee_FilterItem)
                case IT_ARMOR_SHARD:
                        return FALSE;
        }
                case IT_ARMOR_SHARD:
                        return FALSE;
        }
-       
+
        return TRUE;
 }
 
        return TRUE;
 }
 
index 0d48fef9d06951a59e31721f6901b2127908cd05..f13ae5c8abeb8468ba895ac36b27a10bdef1ec81 100644 (file)
@@ -18,7 +18,7 @@ MUTATOR_HOOKFUNCTION(midair_PlayerPowerups)
                self.effects |= (EF_ADDITIVE | EF_FULLBRIGHT);
                self.midair_shieldtime = max(self.midair_shieldtime, time + autocvar_g_midair_shieldtime);
        }
                self.effects |= (EF_ADDITIVE | EF_FULLBRIGHT);
                self.midair_shieldtime = max(self.midair_shieldtime, time + autocvar_g_midair_shieldtime);
        }
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
index 26dfb5a4d136f8723a594f9c19660c6986500cce..ac6e158ed4c824c2b8f41fb9d5422211c413ea14 100644 (file)
@@ -1,9 +1,9 @@
-void spawnfunc_item_minst_cells (void) 
+void spawnfunc_item_minst_cells (void)
 {
        if (!g_minstagib) { remove(self); return; }
        if (!self.ammo_cells)
                self.ammo_cells = autocvar_g_minstagib_ammo_drop;
 {
        if (!g_minstagib) { remove(self); return; }
        if (!self.ammo_cells)
                self.ammo_cells = autocvar_g_minstagib_ammo_drop;
-               
+
        StartItem ("models/items/a_cells.md3",
                           "misc/itempickup.wav", 45, 0,
                           "MinstaNex Ammo", IT_CELLS, 0, 0, generic_pickupevalfunc, 100);
        StartItem ("models/items/a_cells.md3",
                           "misc/itempickup.wav", 45, 0,
                           "MinstaNex Ammo", IT_CELLS, 0, 0, generic_pickupevalfunc, 100);
@@ -105,7 +105,7 @@ MUTATOR_HOOKFUNCTION(minstagib_MatchEnd)
        entity head;
        FOR_EACH_PLAYER(head)
                minstagib_stop_countdown(head);
        entity head;
        FOR_EACH_PLAYER(head)
                minstagib_stop_countdown(head);
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -113,7 +113,7 @@ MUTATOR_HOOKFUNCTION(minstagib_BotShouldAttack)
 {
        if(checkentity.items & IT_STRENGTH)
                return TRUE;
 {
        if(checkentity.items & IT_STRENGTH)
                return TRUE;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -188,7 +188,7 @@ MUTATOR_HOOKFUNCTION(minstagib_PlayerPhysics)
 {
        if(self.items & IT_INVINCIBLE)
                self.stat_sv_maxspeed = self.stat_sv_maxspeed * autocvar_g_minstagib_speed_highspeed;
 {
        if(self.items & IT_INVINCIBLE)
                self.stat_sv_maxspeed = self.stat_sv_maxspeed * autocvar_g_minstagib_speed_highspeed;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -196,7 +196,7 @@ MUTATOR_HOOKFUNCTION(minstagib_SplitHealthArmor)
 {
        damage_save = 0;
        damage_take = frag_damage;
 {
        damage_save = 0;
        damage_take = frag_damage;
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -212,7 +212,7 @@ MUTATOR_HOOKFUNCTION(minstagib_PlayerDamage)
 {
        if(autocvar_g_friendlyfire == 0 && SAME_TEAM(frag_target, frag_attacker) && IS_PLAYER(frag_target) && IS_PLAYER(frag_attacker))
                frag_damage = 0;
 {
        if(autocvar_g_friendlyfire == 0 && SAME_TEAM(frag_target, frag_attacker) && IS_PLAYER(frag_target) && IS_PLAYER(frag_attacker))
                frag_damage = 0;
-               
+
        if(IS_PLAYER(frag_target))
        {
                if ((frag_deathtype == DEATH_FALL)  ||
        if(IS_PLAYER(frag_target))
        {
                if ((frag_deathtype == DEATH_FALL)  ||
@@ -222,7 +222,7 @@ MUTATOR_HOOKFUNCTION(minstagib_PlayerDamage)
                {
                        frag_damage = 0;
                }
                {
                        frag_damage = 0;
                }
-               
+
                if(IS_PLAYER(frag_attacker))
                if(DEATH_ISWEAPON(frag_deathtype, WEP_MINSTANEX))
                if(frag_target.armorvalue)
                if(IS_PLAYER(frag_attacker))
                if(DEATH_ISWEAPON(frag_deathtype, WEP_MINSTANEX))
                if(frag_target.armorvalue)
@@ -233,7 +233,7 @@ MUTATOR_HOOKFUNCTION(minstagib_PlayerDamage)
                        frag_target.hitsound += 1;
                        frag_attacker.hitsound += 1; // TODO change this to a future specific hitsound for armor hit
                }
                        frag_target.hitsound += 1;
                        frag_attacker.hitsound += 1; // TODO change this to a future specific hitsound for armor hit
                }
-               
+
                if(IS_PLAYER(frag_attacker))
                if (DEATH_ISWEAPON(frag_deathtype, WEP_LASER))
                {
                if(IS_PLAYER(frag_attacker))
                if (DEATH_ISWEAPON(frag_deathtype, WEP_LASER))
                {
@@ -249,7 +249,7 @@ MUTATOR_HOOKFUNCTION(minstagib_PlayerDamage)
                        }
                }
        }
                        }
                }
        }
-       
+
        if(IS_PLAYER(frag_attacker))
        if(frag_mirrordamage > 0)
        {
        if(IS_PLAYER(frag_attacker))
        if(frag_mirrordamage > 0)
        {
@@ -262,23 +262,23 @@ MUTATOR_HOOKFUNCTION(minstagib_PlayerDamage)
                }
                frag_mirrordamage = 0;
        }
                }
                frag_mirrordamage = 0;
        }
-       
+
        if(frag_target.items & IT_STRENGTH)
                yoda = 1;
        if(frag_target.items & IT_STRENGTH)
                yoda = 1;
-               
+
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(minstagib_SetStartItems)
 {
        start_ammo_cells = cvar("g_minstagib_ammo_start");
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(minstagib_SetStartItems)
 {
        start_ammo_cells = cvar("g_minstagib_ammo_start");
-       
+
        start_health = 100;
        start_armorvalue = 0;
        start_weapons = WEPSET_MINSTANEX;
        warmup_start_weapons = WEPSET_MINSTANEX;
        start_items |= IT_UNLIMITED_SUPERWEAPONS;
        start_health = 100;
        start_armorvalue = 0;
        start_weapons = WEPSET_MINSTANEX;
        warmup_start_weapons = WEPSET_MINSTANEX;
        start_items |= IT_UNLIMITED_SUPERWEAPONS;
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -286,13 +286,13 @@ MUTATOR_HOOKFUNCTION(minstagib_FilterItem)
 {
        if(self.classname == "item_cells")
                return TRUE; // no normal cells?
 {
        if(self.classname == "item_cells")
                return TRUE; // no normal cells?
-               
+
        if(self.weapon == WEP_MINSTANEX && self.classname == "droppedweapon")
        {
                self.ammo_cells = autocvar_g_minstagib_ammo_drop;
                return FALSE;
        }
        if(self.weapon == WEP_MINSTANEX && self.classname == "droppedweapon")
        {
                self.ammo_cells = autocvar_g_minstagib_ammo_drop;
                return FALSE;
        }
-       
+
        if(self.weapon == WEP_ROCKET_LAUNCHER || self.weapon == WEP_NEX)
        {
                entity e = spawn();
        if(self.weapon == WEP_ROCKET_LAUNCHER || self.weapon == WEP_NEX)
        {
                entity e = spawn();
@@ -304,29 +304,29 @@ MUTATOR_HOOKFUNCTION(minstagib_FilterItem)
                self = oldself;
                return TRUE;
        }
                self = oldself;
                return TRUE;
        }
-               
+
        if(self.flags & FL_POWERUP)
                return FALSE;
        if(self.flags & FL_POWERUP)
                return FALSE;
-               
+
        if(self.ammo_cells > autocvar_g_minstagib_ammo_drop && self.classname != "item_minst_cells")
                self.ammo_cells = autocvar_g_minstagib_ammo_drop;
        if(self.ammo_cells > autocvar_g_minstagib_ammo_drop && self.classname != "item_minst_cells")
                self.ammo_cells = autocvar_g_minstagib_ammo_drop;
-               
+
        if(self.ammo_cells && !self.weapon)
                return FALSE;
        if(self.ammo_cells && !self.weapon)
                return FALSE;
-               
+
        return TRUE;
 }
 
 MUTATOR_HOOKFUNCTION(minstagib_CustomizeWaypoint)
 {
        entity e = WaypointSprite_getviewentity(other);
        return TRUE;
 }
 
 MUTATOR_HOOKFUNCTION(minstagib_CustomizeWaypoint)
 {
        entity e = WaypointSprite_getviewentity(other);
-       
+
        // if you have the invisibility powerup, sprites ALWAYS are restricted to your team
        // but only apply this to real players, not to spectators
        if((self.owner.flags & FL_CLIENT) && (self.owner.items & IT_STRENGTH) && (e == other))
        if(DIFF_TEAM(self.owner, e))
                return TRUE;
        // if you have the invisibility powerup, sprites ALWAYS are restricted to your team
        // but only apply this to real players, not to spectators
        if((self.owner.flags & FL_CLIENT) && (self.owner.items & IT_STRENGTH) && (e == other))
        if(DIFF_TEAM(self.owner, e))
                return TRUE;
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -359,14 +359,14 @@ MUTATOR_HOOKFUNCTION(minstagib_ItemTouch)
 
                return MUT_ITEMTOUCH_CONTINUE;
        }
 
                return MUT_ITEMTOUCH_CONTINUE;
        }
-       
+
        if(self.max_health)
        {
                other.armorvalue = bound(other.armorvalue, 999, other.armorvalue + autocvar_g_minstagib_extralives);
                Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES);
                return MUT_ITEMTOUCH_PICKUP;
        }
        if(self.max_health)
        {
                other.armorvalue = bound(other.armorvalue, 999, other.armorvalue + autocvar_g_minstagib_extralives);
                Send_Notification(NOTIF_ONE, other, MSG_CENTER, CENTER_EXTRALIVES);
                return MUT_ITEMTOUCH_PICKUP;
        }
-               
+
        return MUT_ITEMTOUCH_CONTINUE;
 }
 
        return MUT_ITEMTOUCH_CONTINUE;
 }
 
@@ -375,21 +375,21 @@ MUTATOR_HOOKFUNCTION(minstagib_OnEntityPreSpawn)
        if (!autocvar_g_powerups) { return FALSE; }
        if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega"))
                return FALSE;
        if (!autocvar_g_powerups) { return FALSE; }
        if (!(self.classname == "item_strength" || self.classname == "item_invincible" || self.classname == "item_health_mega"))
                return FALSE;
-       
+
        entity e = spawn();
        entity e = spawn();
-       
+
        if(random() < 0.3)
                e.think = spawnfunc_item_strength;
        else if(random() < 0.6)
                e.think = minstagib_health_mega;
        else
                e.think = spawnfunc_item_invincible;
        if(random() < 0.3)
                e.think = spawnfunc_item_strength;
        else if(random() < 0.6)
                e.think = minstagib_health_mega;
        else
                e.think = spawnfunc_item_invincible;
-               
+
        e.nextthink = time + 0.1;
        e.spawnflags = self.spawnflags;
        e.noalign = self.noalign;
        setorigin(e, self.origin);
        e.nextthink = time + 0.1;
        e.spawnflags = self.spawnflags;
        e.noalign = self.noalign;
        setorigin(e, self.origin);
-       
+
        return TRUE;
 }
 
        return TRUE;
 }
 
index c945e1c2f4dc948c657fe1509b269c636dbf70e4..50741dc20b4f3cadd1d2d75ff1b0ce1f5180a4c5 100644 (file)
@@ -10,7 +10,7 @@ MUTATOR_HOOKFUNCTION(multijump_PlayerPhysics)
                else
                        self.multijump_count = -2; // the cvar value for infinite jumps is -1, so this needs to be smaller
        }
                else
                        self.multijump_count = -2; // the cvar value for infinite jumps is -1, so this needs to be smaller
        }
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -20,7 +20,7 @@ MUTATOR_HOOKFUNCTION(multijump_PlayerJump)
                self.multijump_ready = TRUE;  // this is necessary to check that we released the jump button and pressed it again
        else
                self.multijump_ready = FALSE;
                self.multijump_ready = TRUE;  // this is necessary to check that we released the jump button and pressed it again
        else
                self.multijump_ready = FALSE;
-               
+
        if(!player_multijump && self.multijump_ready && self.multijump_count < autocvar_g_multijump && self.velocity_z > autocvar_g_multijump_speed)
        {
                if (autocvar_g_multijump)
        if(!player_multijump && self.multijump_ready && self.multijump_count < autocvar_g_multijump && self.velocity_z > autocvar_g_multijump_speed)
        {
                if (autocvar_g_multijump)
index 3d0df5dae5460f46d3a45033dc3a944630a03ef8..5ab6df75dc720e2d6b385ed665d1cf0ccf9fcfc3 100644 (file)
@@ -4,13 +4,13 @@ void nade_timer_think()
        self.nextthink = time;
        if(!self.owner || wasfreed(self.owner))
                remove(self);
        self.nextthink = time;
        if(!self.owner || wasfreed(self.owner))
                remove(self);
-       
+
 }
 
 void nade_burn_spawn(entity _nade)
 {
        float p;
 }
 
 void nade_burn_spawn(entity _nade)
 {
        float p;
-       
+
        switch(_nade.realowner.team)
        {
                case NUM_TEAM_1: p = PROJECTILE_NADE_RED_BURN; break;
        switch(_nade.realowner.team)
        {
                case NUM_TEAM_1: p = PROJECTILE_NADE_RED_BURN; break;
@@ -19,7 +19,7 @@ void nade_burn_spawn(entity _nade)
                case NUM_TEAM_4: p = PROJECTILE_NADE_PINK_BURN; break;
                default:                 p = PROJECTILE_NADE_BURN; break;
        }
                case NUM_TEAM_4: p = PROJECTILE_NADE_PINK_BURN; break;
                default:                 p = PROJECTILE_NADE_BURN; break;
        }
-       
+
        CSQCProjectile(_nade, TRUE, p, TRUE);
 }
 
        CSQCProjectile(_nade, TRUE, p, TRUE);
 }
 
@@ -35,9 +35,9 @@ void nade_spawn(entity _nade)
        timer.think = nade_timer_think;
        timer.nextthink = time;
        timer.wait = _nade.wait;
        timer.think = nade_timer_think;
        timer.nextthink = time;
        timer.wait = _nade.wait;
-       timer.owner = _nade;    
+       timer.owner = _nade;
        timer.skin = 10;
        timer.skin = 10;
-       
+
        switch(_nade.realowner.team)
        {
                case NUM_TEAM_1: p = PROJECTILE_NADE_RED; break;
        switch(_nade.realowner.team)
        {
                case NUM_TEAM_1: p = PROJECTILE_NADE_RED; break;
@@ -46,15 +46,15 @@ void nade_spawn(entity _nade)
                case NUM_TEAM_4: p = PROJECTILE_NADE_PINK; break;
                default:                 p = PROJECTILE_NADE; break;
        }
                case NUM_TEAM_4: p = PROJECTILE_NADE_PINK; break;
                default:                 p = PROJECTILE_NADE; break;
        }
-       
+
        CSQCProjectile(_nade, TRUE, p, TRUE);
        CSQCProjectile(_nade, TRUE, p, TRUE);
-       
+
 }
 
 void nade_boom()
 {
        string expef;
 }
 
 void nade_boom()
 {
        string expef;
-       
+
        switch(self.realowner.team)
        {
                case NUM_TEAM_1: expef = "nade_red_explode"; break;
        switch(self.realowner.team)
        {
                case NUM_TEAM_1: expef = "nade_red_explode"; break;
@@ -63,11 +63,11 @@ void nade_boom()
                case NUM_TEAM_4: expef = "nade_pink_explode"; break;
                default:                 expef = "nade_explode"; break;
        }
                case NUM_TEAM_4: expef = "nade_pink_explode"; break;
                default:                 expef = "nade_explode"; break;
        }
-       
+
        sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM);
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
        pointparticles(particleeffectnum(expef), self.origin + '0 0 1', '0 0 0', 1);
        sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTEN_NORM);
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
        pointparticles(particleeffectnum(expef), self.origin + '0 0 1', '0 0 0', 1);
-       
+
        Damage_DamageInfo(self.origin, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage, autocvar_g_nades_nade_radius, '1 1 1' * autocvar_g_nades_nade_force, self.projectiledeathtype, 0, self);
 
        self.takedamage = DAMAGE_NO;
        Damage_DamageInfo(self.origin, autocvar_g_nades_nade_damage, autocvar_g_nades_nade_edgedamage, autocvar_g_nades_nade_radius, '1 1 1' * autocvar_g_nades_nade_force, self.projectiledeathtype, 0, self);
 
        self.takedamage = DAMAGE_NO;
@@ -115,13 +115,13 @@ void nade_damage(entity inflictor, entity attacker, float damage, float deathtyp
 
        if(DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) && !(deathtype & HITTYPE_SECONDARY))
                damage = self.max_health * 1.1;
 
        if(DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) && !(deathtype & HITTYPE_SECONDARY))
                damage = self.max_health * 1.1;
-               
+
        if(DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) && (deathtype & HITTYPE_SECONDARY))
        {
                damage = self.max_health * 0.1;
                force *= 15;
        }
        if(DEATH_ISWEAPON(deathtype, WEP_SHOTGUN) && (deathtype & HITTYPE_SECONDARY))
        {
                damage = self.max_health * 0.1;
                force *= 15;
        }
-       
+
        self.velocity += force;
 
        if(!damage || (self.flags & FL_ONGROUND && IS_PLAYER(attacker)))
        self.velocity += force;
 
        if(!damage || (self.flags & FL_ONGROUND && IS_PLAYER(attacker)))
@@ -147,16 +147,16 @@ void toss_nade(entity e, vector _velocity, float _time)
 {
        entity _nade = e.nade;
        e.nade = world;
 {
        entity _nade = e.nade;
        e.nade = world;
-       
+
        remove(e.fake_nade);
        e.fake_nade = world;
        remove(e.fake_nade);
        e.fake_nade = world;
-       
+
        makevectors(e.v_angle);
        makevectors(e.v_angle);
-       
+
        W_SetupShot(e, FALSE, FALSE, "", CH_WEAPON_A, 0);
        W_SetupShot(e, FALSE, FALSE, "", CH_WEAPON_A, 0);
-       
+
        Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_NADES);
        Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_NADES);
-       
+
        //setorigin(_nade, CENTER_OR_VIEWOFS(e) + (v_right * 10) * -1);
        setorigin(_nade, w_shotorg + (v_right * 25) * -1);
        setmodel(_nade, "models/weapons/v_ok_grenade.md3");
        //setorigin(_nade, CENTER_OR_VIEWOFS(e) + (v_right * 10) * -1);
        setorigin(_nade, w_shotorg + (v_right * 25) * -1);
        setmodel(_nade, "models/weapons/v_ok_grenade.md3");
@@ -164,11 +164,11 @@ void toss_nade(entity e, vector _velocity, float _time)
        PROJECTILE_MAKETRIGGER(_nade);
        setsize(_nade, '-16 -16 -16', '16 16 16');
        _nade.movetype = MOVETYPE_BOUNCE;
        PROJECTILE_MAKETRIGGER(_nade);
        setsize(_nade, '-16 -16 -16', '16 16 16');
        _nade.movetype = MOVETYPE_BOUNCE;
-       
+
        tracebox(_nade.origin, _nade.mins, _nade.maxs, _nade.origin, FALSE, _nade);
        if (trace_startsolid)
                setorigin(_nade, e.origin);
        tracebox(_nade.origin, _nade.mins, _nade.maxs, _nade.origin, FALSE, _nade);
        if (trace_startsolid)
                setorigin(_nade, e.origin);
-       
+
        if(e.crouch)
                _nade.velocity = '0 0 -10';
        else if(autocvar_g_nades_nade_newton_style == 1)
        if(e.crouch)
                _nade.velocity = '0 0 -10';
        else if(autocvar_g_nades_nade_newton_style == 1)
@@ -207,10 +207,10 @@ void nade_prime()
 {
        if(self.nade)
                remove(self.nade);
 {
        if(self.nade)
                remove(self.nade);
-               
+
        if(self.fake_nade)
                remove(self.fake_nade);
        if(self.fake_nade)
                remove(self.fake_nade);
-       
+
        self.nade = spawn();
        setmodel(self.nade, "null");
        setattachment(self.nade, self, "bip01 l hand");
        self.nade = spawn();
        setmodel(self.nade, "null");
        setattachment(self.nade, self, "bip01 l hand");
@@ -240,22 +240,22 @@ float CanThrowNade()
 {
        if(self.vehicle)
                return FALSE;
 {
        if(self.vehicle)
                return FALSE;
-               
+
        if(gameover)
                return FALSE;
        if(gameover)
                return FALSE;
-               
+
        if(self.deadflag != DEAD_NO)
                return FALSE;
        if(self.deadflag != DEAD_NO)
                return FALSE;
-       
+
        if (!autocvar_g_nades)
                return FALSE; // allow turning them off mid match
        if (!autocvar_g_nades)
                return FALSE; // allow turning them off mid match
-               
+
        if(forbidWeaponUse())
                return FALSE;
        if(forbidWeaponUse())
                return FALSE;
-               
+
        if (!IS_PLAYER(self))
                return FALSE;
        if (!IS_PLAYER(self))
                return FALSE;
-               
+
        return TRUE;
 }
 
        return TRUE;
 }
 
@@ -263,7 +263,7 @@ void nades_CheckThrow()
 {
        if(!CanThrowNade())
                return;
 {
        if(!CanThrowNade())
                return;
-               
+
        if(!self.nade)
        {
                if(self.nade_refire < time)
        if(!self.nade)
        {
                if(self.nade_refire < time)
@@ -290,18 +290,18 @@ MUTATOR_HOOKFUNCTION(nades_VehicleEnter)
 {
        if(other.nade)
                toss_nade(other, '0 0 100', max(other.nade.wait, time + 0.05));
 {
        if(other.nade)
                toss_nade(other, '0 0 100', max(other.nade.wait, time + 0.05));
-       
+
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(nades_PlayerPreThink)
 {
        float key_pressed = ((g_grappling_hook || client_hasweapon(self, WEP_HOOK, FALSE, FALSE) || (weaponsInMap & WEPSET_HOOK)) ? self.button16 : self.BUTTON_HOOK);
        return FALSE;
 }
 
 MUTATOR_HOOKFUNCTION(nades_PlayerPreThink)
 {
        float key_pressed = ((g_grappling_hook || client_hasweapon(self, WEP_HOOK, FALSE, FALSE) || (weaponsInMap & WEPSET_HOOK)) ? self.button16 : self.BUTTON_HOOK);
-       
+
        if(self.nade)
                if(self.nade.wait - 0.1 <= time)
                        toss_nade(self, '0 0 0', time + 0.05);
        if(self.nade)
                if(self.nade.wait - 0.1 <= time)
                        toss_nade(self, '0 0 0', time + 0.05);
-                       
+
        if(CanThrowNade())
        if(self.nade_refire < time)
        {
        if(CanThrowNade())
        if(self.nade_refire < time)
        {
@@ -317,7 +317,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerPreThink)
                                makevectors(self.v_angle);
                                float _force = time - self.nade.lifetime;
                                _force /= autocvar_g_nades_nade_lifetime;
                                makevectors(self.v_angle);
                                float _force = time - self.nade.lifetime;
                                _force /= autocvar_g_nades_nade_lifetime;
-                               _force = autocvar_g_nades_nade_minforce + (_force * (autocvar_g_nades_nade_maxforce - autocvar_g_nades_nade_minforce));                         
+                               _force = autocvar_g_nades_nade_minforce + (_force * (autocvar_g_nades_nade_maxforce - autocvar_g_nades_nade_minforce));
                                toss_nade(self, (v_forward * 0.7 + v_up * 0.2 + v_right * 0.1) * _force, 0);
                        }
                }
                                toss_nade(self, (v_forward * 0.7 + v_up * 0.2 + v_right * 0.1) * _force, 0);
                        }
                }
@@ -340,7 +340,7 @@ MUTATOR_HOOKFUNCTION(nades_PlayerDies)
 {
        if(self.nade)
                toss_nade(self, '0 0 100', max(self.nade.wait, time + 0.05));
 {
        if(self.nade)
                toss_nade(self, '0 0 100', max(self.nade.wait, time + 0.05));
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -351,7 +351,7 @@ MUTATOR_HOOKFUNCTION(nades_RemovePlayer)
 
        if(self.fake_nade)
                remove(self.fake_nade);
 
        if(self.fake_nade)
                remove(self.fake_nade);
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -377,11 +377,11 @@ MUTATOR_DEFINITION(mutator_nades)
        MUTATOR_HOOK(ClientDisconnect, nades_RemovePlayer, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsString, nades_BuildMutatorsString, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsPrettyString, nades_BuildMutatorsPrettyString, CBC_ORDER_ANY);
        MUTATOR_HOOK(ClientDisconnect, nades_RemovePlayer, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsString, nades_BuildMutatorsString, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsPrettyString, nades_BuildMutatorsPrettyString, CBC_ORDER_ANY);
-       
+
        MUTATOR_ONADD
        {
                precache_model("models/ok_nade_counter/ok_nade_counter.md3");
        MUTATOR_ONADD
        {
                precache_model("models/ok_nade_counter/ok_nade_counter.md3");
-               
+
                precache_model("models/weapons/h_ok_grenade.iqm");
                precache_model("models/weapons/v_ok_grenade.md3");
                precache_sound("weapons/rocket_impact.wav");
                precache_model("models/weapons/h_ok_grenade.iqm");
                precache_model("models/weapons/v_ok_grenade.md3");
                precache_sound("weapons/rocket_impact.wav");
index f384a0aad3380e128365af9cfdff18727c6c3fae..f11298451c8ea4df110710e5d3695f2a38693e1d 100644 (file)
@@ -4,7 +4,7 @@ CORE    laser   nex     lg      rl      cry     gl      elec    hagar   fireb
                                                                        minsta  porto
                                                                        tuba
 
                                                                        minsta  porto
                                                                        tuba
 
-NEW             rifle   hlac    minel                           seeker   
+NEW             rifle   hlac    minel                           seeker
 IDEAS                                   OPEN    flak    OPEN            FUN FUN FUN FUN
 
 
 IDEAS                                   OPEN    flak    OPEN            FUN FUN FUN FUN
 
 
@@ -127,7 +127,7 @@ MUTATOR_HOOKFUNCTION(nt_SetStartItems)
 
        WepSet newdefault;
        WepSet warmup_newdefault;
 
        WepSet newdefault;
        WepSet warmup_newdefault;
-       
+
        newdefault = '0 0 0';
        warmup_newdefault = '0 0 0';
 
        newdefault = '0 0 0';
        warmup_newdefault = '0 0 0';
 
index af5d4a8b137d2e983709b2af6830e8396d79299e..6d982d5a4c48f32cd71f32136191294862920203 100644 (file)
@@ -6,7 +6,7 @@ MUTATOR_HOOKFUNCTION(pinata_PlayerDies)
        if(self.switchweapon != j)
        if(W_IsWeaponThrowable(j))
                W_ThrowNewWeapon(self, j, FALSE, self.origin + (self.mins + self.maxs) * 0.5, randomvec() * 175 + '0 0 325');
        if(self.switchweapon != j)
        if(W_IsWeaponThrowable(j))
                W_ThrowNewWeapon(self, j, FALSE, self.origin + (self.mins + self.maxs) * 0.5, randomvec() * 175 + '0 0 325');
-               
+
        return TRUE;
 }
 
        return TRUE;
 }
 
index e2832ace2dc2f61824ec10dc9df76e16922b0250..184047189b381532b65f3ca6ca369a8c64f28030 100644 (file)
@@ -7,20 +7,20 @@ float gravity_delay;
 
 MUTATOR_HOOKFUNCTION(gravity_StartFrame)
 {
 
 MUTATOR_HOOKFUNCTION(gravity_StartFrame)
 {
-       if(gameover || !cvar("g_random_gravity")) return FALSE; 
+       if(gameover || !cvar("g_random_gravity")) return FALSE;
        if(time < gravity_delay) return FALSE;
        if(time < game_starttime) return FALSE;
        if(round_handler_IsActive() && !round_handler_IsRoundStarted()) return FALSE;
        if(time < gravity_delay) return FALSE;
        if(time < game_starttime) return FALSE;
        if(round_handler_IsActive() && !round_handler_IsRoundStarted()) return FALSE;
-       
-    if(random() >= autocvar_g_random_gravity_negative_chance) 
+
+    if(random() >= autocvar_g_random_gravity_negative_chance)
         cvar_set("sv_gravity", ftos(bound(autocvar_g_random_gravity_min, random() - random() * -autocvar_g_random_gravity_negative, autocvar_g_random_gravity_max)));
     else
         cvar_set("sv_gravity", ftos(bound(autocvar_g_random_gravity_min, random() * autocvar_g_random_gravity_positive, autocvar_g_random_gravity_max)));
         cvar_set("sv_gravity", ftos(bound(autocvar_g_random_gravity_min, random() - random() * -autocvar_g_random_gravity_negative, autocvar_g_random_gravity_max)));
     else
         cvar_set("sv_gravity", ftos(bound(autocvar_g_random_gravity_min, random() * autocvar_g_random_gravity_positive, autocvar_g_random_gravity_max)));
-       
+
        gravity_delay = time + autocvar_g_random_gravity_delay;
        gravity_delay = time + autocvar_g_random_gravity_delay;
-       
+
        dprint("Gravity is now: ", ftos(autocvar_sv_gravity), "\n");
        dprint("Gravity is now: ", ftos(autocvar_sv_gravity), "\n");
-       
+
        return FALSE;
 }
 
        return FALSE;
 }
 
@@ -41,7 +41,7 @@ MUTATOR_DEFINITION(mutator_random_gravity)
        MUTATOR_HOOK(SV_StartFrame, gravity_StartFrame, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsString, gravity_BuildMutatorsString, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsPrettyString, gravity_BuildMutatorsPrettyString, CBC_ORDER_ANY);
        MUTATOR_HOOK(SV_StartFrame, gravity_StartFrame, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsString, gravity_BuildMutatorsString, CBC_ORDER_ANY);
        MUTATOR_HOOK(BuildMutatorsPrettyString, gravity_BuildMutatorsPrettyString, CBC_ORDER_ANY);
-       
+
        MUTATOR_ONADD
        {
                cvar_settemp("sv_gravity", cvar_string("sv_gravity")); // settemp current gravity so it's restored on match end
        MUTATOR_ONADD
        {
                cvar_settemp("sv_gravity", cvar_string("sv_gravity")); // settemp current gravity so it's restored on match end
index edfcba4398d2da3eff0d465ecb03ef341fe37f75..73317d0c1eea188fc5ec20206c6840c185c77b20 100644 (file)
@@ -7,7 +7,7 @@ MUTATOR_HOOKFUNCTION(vampire_PlayerDamage)
                frag_attacker.health += bound(0, damage_take, frag_target.health);
                frag_attacker.health = bound(0, frag_attacker.health, autocvar_g_balance_health_limit);
        }
                frag_attacker.health += bound(0, damage_take, frag_target.health);
                frag_attacker.health = bound(0, frag_attacker.health, autocvar_g_balance_health_limit);
        }
-               
+
        return FALSE;
 }
 
        return FALSE;
 }
 
index 64ce9da0289b935cb96f71f88ca7b25d2b0b0ee2..d432221f25fe3bf9c2e11c4bf9d5bd8a6343c60f 100644 (file)
@@ -24,7 +24,7 @@ void path_dbg_think()
 
 void __showpath2_think()
 {
 
 void __showpath2_think()
 {
-    #ifdef TURRET_DEBUG 
+    #ifdef TURRET_DEBUG
        mark_info(self.origin,1);
        #endif
     if(self.path_next)
        mark_info(self.origin,1);
        #endif
     if(self.path_next)
index 22d1e732ee8ad6313d50c135ed715cc7c2a73437..9f443b0ac7659e0d16a81af1a1a3e031132ccb81 100644 (file)
@@ -22,14 +22,14 @@ float pathlib_wpp_opencb(entity wp, entity child, float cost)
 
        // FIXME! wp.wp##mincost is NOT distance. Make it distance or add a field for distance to be used here (for better speed)
        cost = vlen(child.origin - wp.origin);
 
        // FIXME! wp.wp##mincost is NOT distance. Make it distance or add a field for distance to be used here (for better speed)
        cost = vlen(child.origin - wp.origin);
-       
+
     child.path_prev     = wp;
     child.pathlib_list   = openlist;
     child.pathlib_node_g = wp.pathlib_node_g + cost;
     child.pathlib_node_h = pathlib_heuristic(child.origin, goal_node.origin);
     child.pathlib_node_c = pathlib_wpp_waypointcallback(child, wp);
     child.pathlib_node_f = child.pathlib_node_g + child.pathlib_node_h + child.pathlib_node_c;
     child.path_prev     = wp;
     child.pathlib_list   = openlist;
     child.pathlib_node_g = wp.pathlib_node_g + cost;
     child.pathlib_node_h = pathlib_heuristic(child.origin, goal_node.origin);
     child.pathlib_node_c = pathlib_wpp_waypointcallback(child, wp);
     child.pathlib_node_f = child.pathlib_node_g + child.pathlib_node_h + child.pathlib_node_c;
-    
+
 
     if(child == goal_node)
         pathlib_foundgoal = TRUE;
 
     if(child == goal_node)
         pathlib_foundgoal = TRUE;
@@ -50,11 +50,11 @@ float pathlib_wpp_openncb(entity wp, entity child, float cost)
 
        // FIXME! wp.wp##mincost is NOT distance. Make it distance or add a field for distance to be used here (for better speed)
        cost = vlen(child.origin - wp.origin);
 
        // FIXME! wp.wp##mincost is NOT distance. Make it distance or add a field for distance to be used here (for better speed)
        cost = vlen(child.origin - wp.origin);
-       
+
     child.path_prev     = wp;
     child.pathlib_list   = openlist;
     child.pathlib_node_g = wp.pathlib_node_g + cost;
     child.path_prev     = wp;
     child.pathlib_list   = openlist;
     child.pathlib_node_g = wp.pathlib_node_g + cost;
-    child.pathlib_node_h = pathlib_heuristic(child.origin, goal_node.origin); 
+    child.pathlib_node_h = pathlib_heuristic(child.origin, goal_node.origin);
     child.pathlib_node_f = child.pathlib_node_g + child.pathlib_node_h;
 
     if(child == goal_node)
     child.pathlib_node_f = child.pathlib_node_g + child.pathlib_node_h;
 
     if(child == goal_node)
@@ -102,7 +102,7 @@ float pathlib_wpp_expand(entity wp)
     if(wp.wp29) pathlib_wpp_open(wp,wp.wp29,wp.wp29mincost); else return 29;
     if(wp.wp30) pathlib_wpp_open(wp,wp.wp30,wp.wp30mincost); else return 30;
     if(wp.wp31) pathlib_wpp_open(wp,wp.wp31,wp.wp31mincost); else return 31;
     if(wp.wp29) pathlib_wpp_open(wp,wp.wp29,wp.wp29mincost); else return 29;
     if(wp.wp30) pathlib_wpp_open(wp,wp.wp30,wp.wp30mincost); else return 30;
     if(wp.wp31) pathlib_wpp_open(wp,wp.wp31,wp.wp31mincost); else return 31;
-    
+
     return 32;
 }
 
     return 32;
 }
 
@@ -133,20 +133,20 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback)
     float ptime;
 
     ptime                                      = gettime(GETTIME_REALTIME);
     float ptime;
 
     ptime                                      = gettime(GETTIME_REALTIME);
-    pathlib_starttime          = ptime;        
+    pathlib_starttime          = ptime;
        pathlib_movecost                = 300;
        pathlib_movecost_diag   = vlen('1 1 0' * pathlib_movecost);
        pathlib_movecost                = 300;
        pathlib_movecost_diag   = vlen('1 1 0' * pathlib_movecost);
-       
-       if (!pathlib_wpp_waypointcallback) 
+
+       if (!pathlib_wpp_waypointcallback)
                callback = FALSE;
                callback = FALSE;
-               
+
        if (callback)
                pathlib_wpp_open = pathlib_wpp_opencb;
        else
                pathlib_wpp_open = pathlib_wpp_openncb;
        if (callback)
                pathlib_wpp_open = pathlib_wpp_opencb;
        else
                pathlib_wpp_open = pathlib_wpp_openncb;
-       
+
        pathlib_heuristic = pathlib_h_none;
        pathlib_heuristic = pathlib_h_none;
-       
+
     if (!openlist)
         openlist       = spawn();
 
     if (!openlist)
         openlist       = spawn();
 
@@ -168,12 +168,12 @@ entity pathlib_waypointpath(entity wp_from, entity wp_to, float callback)
         n.pathlib_node_g = 0;
         n.pathlib_node_f = 0;
         n.pathlib_node_h = 0;
         n.pathlib_node_g = 0;
         n.pathlib_node_f = 0;
         n.pathlib_node_h = 0;
-        
+
         //setmodel(n, "models/runematch/rune.mdl");
         //n.effects = EF_LOWPRECISION;
         //n.colormod = '0 0 0';
         //n.scale = 1;
         //setmodel(n, "models/runematch/rune.mdl");
         //n.effects = EF_LOWPRECISION;
         //n.colormod = '0 0 0';
         //n.scale = 1;
-        
+
     }
 
     goal_node  = wp_to;
     }
 
     goal_node  = wp_to;
@@ -202,18 +202,18 @@ entity pathlib_waypointpath_step()
     }
     pathlib_wpp_close(n);
        dprint("Expanding ",ftos(pathlib_wpp_expand(n))," links\n");
     }
     pathlib_wpp_close(n);
        dprint("Expanding ",ftos(pathlib_wpp_expand(n))," links\n");
-       
+
     if(pathlib_foundgoal)
     {
         entity start, end, open, ln;
     if(pathlib_foundgoal)
     {
         entity start, end, open, ln;
-        
+
         dprint("Target found. Rebuilding and filtering path...\n");
         dprint("Target found. Rebuilding and filtering path...\n");
-        
+
                buildpath_nodefilter = buildpath_nodefilter_none;
                start = path_build(world, start_node.origin, world, world);
                end   = path_build(world, goal_node.origin, world, start);
                ln    = end;
                buildpath_nodefilter = buildpath_nodefilter_none;
                start = path_build(world, start_node.origin, world, world);
                end   = path_build(world, goal_node.origin, world, start);
                ln    = end;
-               
+
                for(open = goal_node; open.path_prev != start_node; open = open.path_prev)
                {
                        n    = path_build(ln,open.origin,open.path_prev,start);
                for(open = goal_node; open.path_prev != start_node; open = open.path_prev)
                {
                        n    = path_build(ln,open.origin,open.path_prev,start);
@@ -221,8 +221,8 @@ entity pathlib_waypointpath_step()
                        ln = n;
                }
                start.path_next = n;
                        ln = n;
                }
                start.path_next = n;
-               n.path_prev = start;            
-               
+               n.path_prev = start;
+
         return start;
     }
 
         return start;
     }
 
index 354b521e816b93ecf1a2adabdae180ba05a7e436..2c6e941a6a4dfd7585986ea74c969702e8609b81 100644 (file)
@@ -17,7 +17,7 @@ void PlayerStats_Init() // initiated before InitGameplayMode so that scores are
        if(playerstats_db >= 0)
                playerstats_waitforme = FALSE; // must wait for it at match end
 
        if(playerstats_db >= 0)
                playerstats_waitforme = FALSE; // must wait for it at match end
 
-       serverflags |= SERVERFLAG_PLAYERSTATS;  
+       serverflags |= SERVERFLAG_PLAYERSTATS;
 
        PlayerStats_AddEvent(PLAYERSTATS_ALIVETIME);
        PlayerStats_AddEvent(PLAYERSTATS_AVGLATENCY);
 
        PlayerStats_AddEvent(PLAYERSTATS_ALIVETIME);
        PlayerStats_AddEvent(PLAYERSTATS_AVGLATENCY);
@@ -83,7 +83,7 @@ void PlayerStats_AddPlayer(entity e)
 
        string key;
        key = sprintf("%s:*", e.playerstats_id);
 
        string key;
        key = sprintf("%s:*", e.playerstats_id);
-       
+
        string p;
        p = db_get(playerstats_db, key);
        if(p == "")
        string p;
        p = db_get(playerstats_db, key);
        if(p == "")
@@ -106,7 +106,7 @@ void PlayerStats_AddTeam(float t)
 
        string key;
        key = sprintf("%d", t);
 
        string key;
        key = sprintf("%d", t);
-       
+
        string p;
        p = db_get(playerstats_db, key);
        if(p == "")
        string p;
        p = db_get(playerstats_db, key);
        if(p == "")
@@ -126,10 +126,10 @@ void PlayerStats_AddEvent(string event_id)
 {
        if(playerstats_db < 0)
                return;
 {
        if(playerstats_db < 0)
                return;
-       
+
        string key;
        key = sprintf("*:%s", event_id);
        string key;
        key = sprintf("*:%s", event_id);
-       
+
        string p;
        p = db_get(playerstats_db, key);
        if(p == "")
        string p;
        p = db_get(playerstats_db, key);
        if(p == "")
@@ -149,7 +149,7 @@ float PlayerStats_Event(entity e, string event_id, float value)
 {
        if((e.playerstats_id == "") || playerstats_db < 0)
                return 0;
 {
        if((e.playerstats_id == "") || playerstats_db < 0)
                return 0;
-       
+
        string key;
        float val;
        key = sprintf("%s:%s", e.playerstats_id, event_id);
        string key;
        float val;
        key = sprintf("%s:%s", e.playerstats_id, event_id);
@@ -194,7 +194,7 @@ float PlayerStats_TeamScore(float t, string event_id, float value)
        U: UDP port number of the server
        D: duration of the match
        P: player ID of an existing player; this also sets the owner for all following "n", "e" and "t" lines (lower case!)
        U: UDP port number of the server
        D: duration of the match
        P: player ID of an existing player; this also sets the owner for all following "n", "e" and "t" lines (lower case!)
-       Q: team number of an existing team (format: team#NN); this also sets the owner for all following "e" lines (lower case!) 
+       Q: team number of an existing team (format: team#NN); this also sets the owner for all following "e" lines (lower case!)
        n: nickname of the player (optional)
        t: team ID
        i: player index
        n: nickname of the player (optional)
        t: team ID
        i: player index
index 1e08c61e326701b9fffab40ec5fa71c2f1469f13..e6d7a43accca9535df7edb251036e6669c9e2da3 100644 (file)
@@ -174,7 +174,7 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e)
 
        oldrec = race_readTime(GetMapname(), newpos);
        oldrec_holder = race_readName(GetMapname(), newpos);
 
        oldrec = race_readTime(GetMapname(), newpos);
        oldrec_holder = race_readName(GetMapname(), newpos);
-       
+
        // store new ranking
        race_writeTime(GetMapname(), t, myuid);
 
        // store new ranking
        race_writeTime(GetMapname(), t, myuid);
 
@@ -187,7 +187,7 @@ void race_setTime(string map, float t, string myuid, string mynetname, entity e)
        if(rankings_reply)
                strunzone(rankings_reply);
        rankings_reply = strzone(getrankings());
        if(rankings_reply)
                strunzone(rankings_reply);
        rankings_reply = strzone(getrankings());
-       
+
        if(newpos == player_prevpos)
        {
                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_RACE_NEW_IMPROVED, mynetname, newpos, t, oldrec);
        if(newpos == player_prevpos)
        {
                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_RACE_NEW_IMPROVED, mynetname, newpos, t, oldrec);
@@ -477,7 +477,7 @@ void checkpoint_passed()
        other.porto_forbidden = 2; // decreased by 1 each StartFrame
 
        if(defrag_ents) {
        other.porto_forbidden = 2; // decreased by 1 each StartFrame
 
        if(defrag_ents) {
-               if(self.race_checkpoint == -2) 
+               if(self.race_checkpoint == -2)
                {
                        self.race_checkpoint = other.race_checkpoint;
                }
                {
                        self.race_checkpoint = other.race_checkpoint;
                }
@@ -497,7 +497,7 @@ void checkpoint_passed()
                                for(cp = world; (cp = find(cp, classname, "target_checkpoint"));) {
                                        if(cp.race_checkpoint == -2) // set defragcpexists to -1 so that the cp id file will be rewritten when someone finishes
                                                defragcpexists = -1;
                                for(cp = world; (cp = find(cp, classname, "target_checkpoint"));) {
                                        if(cp.race_checkpoint == -2) // set defragcpexists to -1 so that the cp id file will be rewritten when someone finishes
                                                defragcpexists = -1;
-                               }       
+                               }
                        }
                }
                if(cp_amount == 0) {
                        }
                }
                if(cp_amount == 0) {
@@ -611,7 +611,7 @@ void trigger_race_checkpoint_verify()
        if(have_verified)
                return;
        have_verified = 1;
        if(have_verified)
                return;
        have_verified = 1;
-       
+
        qual = g_race_qualifying;
 
        oldself = self;
        qual = g_race_qualifying;
 
        oldself = self;
@@ -637,7 +637,7 @@ void trigger_race_checkpoint_verify()
                                self.race_place = race_lowest_place_spawn;
                                if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, FALSE))
                                        error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for qualifying) - bailing out"));
                                self.race_place = race_lowest_place_spawn;
                                if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), 0, FALSE))
                                        error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for qualifying) - bailing out"));
-                               
+
                                // race only (initial spawn)
                                g_race_qualifying = 0;
                                for(p = 1; p <= race_highest_place_spawn; ++p)
                                // race only (initial spawn)
                                g_race_qualifying = 0;
                                for(p = 1; p <= race_highest_place_spawn; ++p)
@@ -663,7 +663,7 @@ void trigger_race_checkpoint_verify()
                self.race_checkpoint = race_NextCheckpoint(0);
                g_race_qualifying = 1;
                self.race_place = 0; // there's only one spawn on defrag maps
                self.race_checkpoint = race_NextCheckpoint(0);
                g_race_qualifying = 1;
                self.race_place = 0; // there's only one spawn on defrag maps
+
                // check if a defragcp file already exists, then read it and apply the checkpoint order
                float fh;
                float len;
                // check if a defragcp file already exists, then read it and apply the checkpoint order
                float fh;
                float len;
@@ -739,8 +739,8 @@ void trigger_race_checkpoint_verify()
                                        targ.wait = 0;
                                        targ.delay = 0;
 
                                        targ.wait = 0;
                                        targ.delay = 0;
 
-                    // These just make the game crash on some maps with oddly shaped triggers. 
-                    // (on the other hand they used to fix the case when two players ran through a checkpoint at once, 
+                    // These just make the game crash on some maps with oddly shaped triggers.
+                    // (on the other hand they used to fix the case when two players ran through a checkpoint at once,
                     // and often one of them just passed through without being registered. Hope it's fixed  in a better way now.
                     // (happened on item triggers too)
                     //
                     // and often one of them just passed through without being registered. Hope it's fixed  in a better way now.
                     // (happened on item triggers too)
                     //
@@ -814,7 +814,7 @@ void spawnfunc_trigger_race_checkpoint()
                self.message2 = "was pushed backwards by";
        if (self.race_penalty_reason == "")
                self.race_penalty_reason = "missing a checkpoint";
                self.message2 = "was pushed backwards by";
        if (self.race_penalty_reason == "")
                self.race_penalty_reason = "missing a checkpoint";
-       
+
        self.race_checkpoint = self.cnt;
 
        if(self.race_checkpoint > race_highest_checkpoint)
        self.race_checkpoint = self.cnt;
 
        if(self.race_checkpoint > race_highest_checkpoint)
@@ -1115,7 +1115,7 @@ float race_GetFractionalLapCount(entity e)
        l = PlayerScore_Add(e, SP_RACE_LAPS, 0);
        if(e.race_completed)
                return l; // not fractional
        l = PlayerScore_Add(e, SP_RACE_LAPS, 0);
        if(e.race_completed)
                return l; // not fractional
-       
+
        vector o0, o1;
        float bestfraction, fraction;
        entity lastcp, cp0, cp1;
        vector o0, o1;
        float bestfraction, fraction;
        entity lastcp, cp0, cp1;
@@ -1127,7 +1127,7 @@ float race_GetFractionalLapCount(entity e)
 
        if(nextcpindex == lastcpindex)
                return l; // finish
 
        if(nextcpindex == lastcpindex)
                return l; // finish
-       
+
        bestfraction = 1;
        for(cp0 = world; (cp0 = find(cp0, classname, "trigger_race_checkpoint")); )
        {
        bestfraction = 1;
        for(cp0 = world; (cp0 = find(cp0, classname, "trigger_race_checkpoint")); )
        {
index 0dc2b2f00b4f2b79586950f95a2e7fc868140615..86a96aab17b32feb0111894f2779c15b481a4897 100644 (file)
@@ -688,7 +688,7 @@ float PlayerTeamScore_Compare(entity p1, entity p2, float teams, float strict)
                if(teams < 0)
                        return 0;
        }
                if(teams < 0)
                        return 0;
        }
-       
+
        return PlayerScore_Compare(p1.scorekeeper, p2.scorekeeper, strict);
 }
 
        return PlayerScore_Compare(p1.scorekeeper, p2.scorekeeper, strict);
 }
 
@@ -712,7 +712,7 @@ entity PlayerScore_Sort(.float field, float teams, float strict, float nospectat
                plist = p;
        }
        // Now plist points to the whole list.
                plist = p;
        }
        // Now plist points to the whole list.
-       
+
        pfirst = plast = world;
 
        i = j = 0;
        pfirst = plast = world;
 
        i = j = 0;
@@ -813,7 +813,7 @@ void Score_NicePrint_Team(entity to, float t, float w)
                s = "Scores:";
 
        s = strcat(s, strpad(max(0, NAMEWIDTH - strlennocol(s)), ""));
                s = "Scores:";
 
        s = strcat(s, strpad(max(0, NAMEWIDTH - strlennocol(s)), ""));
-       
+
        for(i = 0; i < MAX_SCORE; ++i)
                if(scores_label[i] != "")
                {
        for(i = 0; i < MAX_SCORE; ++i)
                if(scores_label[i] != "")
                {
@@ -847,7 +847,7 @@ void Score_NicePrint_Player(entity to, entity p, float w)
                        break;
                }
        }
                        break;
                }
        }
-       
+
        for(i = 0; i < MAX_SCORE; ++i)
                if(scores_label[i] != "")
                {
        for(i = 0; i < MAX_SCORE; ++i)
                if(scores_label[i] != "")
                {
@@ -896,7 +896,7 @@ void Score_NicePrint(entity to)
                t = p.team;
                p = p.chain;
        }
                t = p.team;
                p = p.chain;
        }
-       
+
        t = 0;
        FOR_EACH_CLIENT(p)
        if (!IS_PLAYER(p))
        t = 0;
        FOR_EACH_CLIENT(p)
        if (!IS_PLAYER(p))
index 64c91685e5d3c767da2b0a6e4ba16f6dccdcdea1..06f7e075ddcc241a0323b6d5a7a31efbf5f8d5ec 100644 (file)
@@ -12,7 +12,7 @@ void trigger_secret_touch() {
        // only a player can trigger this
        if (!IS_PLAYER(other))
                return;
        // only a player can trigger this
        if (!IS_PLAYER(other))
                return;
-       
+
        // update secrets found counter
        secrets_found += 1;
        //print("Secret found: ", ftos(secret_counter.cnt), "/");
        // update secrets found counter
        secrets_found += 1;
        //print("Secret found: ", ftos(secret_counter.cnt), "/");
@@ -21,7 +21,7 @@ void trigger_secret_touch() {
        // centerprint message (multi_touch() doesn't always call centerprint())
        centerprint(other, self.message);
        self.message = "";
        // centerprint message (multi_touch() doesn't always call centerprint())
        centerprint(other, self.message);
        self.message = "";
-       
+
        // handle normal trigger features
        multi_touch();
        remove(self);
        // handle normal trigger features
        multi_touch();
        remove(self);
@@ -42,32 +42,32 @@ Trigger secret can only be trigger by a player's touch and can not be a target i
 */
 void spawnfunc_trigger_secret() {
        // FIXME: should it be disabled in most modes?
 */
 void spawnfunc_trigger_secret() {
        // FIXME: should it be disabled in most modes?
-       
+
        // update secrets count
        secrets_total += 1;
        // update secrets count
        secrets_total += 1;
-       
+
        // add default message
        if (self.message == "")
                self.message = "You found a secret!";
        // add default message
        if (self.message == "")
                self.message = "You found a secret!";
-       
+
        // set default sound
        if (self.noise == "")
        if (!self.sounds)
                self.sounds = 1; // misc/secret.wav
        // set default sound
        if (self.noise == "")
        if (!self.sounds)
                self.sounds = 1; // misc/secret.wav
-       
+
        // this entity can't be a target itself!!!!
        self.targetname = "";
        // this entity can't be a target itself!!!!
        self.targetname = "";
-       
+
        // you can't just shoot a room to find it, can you?
        self.health = 0;
        // you can't just shoot a room to find it, can you?
        self.health = 0;
-       
+
        // a secret can not be delayed
        self.delay = 0;
        // a secret can not be delayed
        self.delay = 0;
-       
+
        // convert this trigger to trigger_once
        self.classname = "trigger_once";
        spawnfunc_trigger_once();
        // convert this trigger to trigger_once
        self.classname = "trigger_once";
        spawnfunc_trigger_once();
-       
+
        // take over the touch() function, so we can mark secret as found
        self.touch = trigger_secret_touch;
        // ignore triggering;
        // take over the touch() function, so we can mark secret as found
        self.touch = trigger_secret_touch;
        // ignore triggering;
index 429bf84947e39fb0c652dabfff4e35c06f89f64b..e62167ce0989f2eeb6bea32893a39d0336d41ee7 100644 (file)
@@ -13,7 +13,7 @@ float SpawnPoint_Send(entity to, float sf)
 float SpawnEvent_Send(entity to, float sf)
 {
        float send;
 float SpawnEvent_Send(entity to, float sf)
 {
        float send;
-       
+
        WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNEVENT);
 
        if(autocvar_g_spawn_alloweffects)
        WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNEVENT);
 
        if(autocvar_g_spawn_alloweffects)
index 5510be0e1165065e72edafcebd0636f3d3117385..043cb7713d24cc61c91b162efba963ec0dd73065 100644 (file)
@@ -2,15 +2,15 @@ void CreatureFrame (void)
 {
        entity oldself;
        float dm;
 {
        entity oldself;
        float dm;
-       
+
        oldself = self;
        for(self = world; (self = findfloat(self, damagedbycontents, TRUE)); )
        {
                if (self.movetype == MOVETYPE_NOCLIP) { continue; }
        oldself = self;
        for(self = world; (self = findfloat(self, damagedbycontents, TRUE)); )
        {
                if (self.movetype == MOVETYPE_NOCLIP) { continue; }
-               
+
                float vehic = (self.vehicle_flags & VHF_ISVEHICLE);
                float projectile = (self.flags & FL_PROJECTILE);
                float vehic = (self.vehicle_flags & VHF_ISVEHICLE);
                float projectile = (self.flags & FL_PROJECTILE);
-               
+
                if (self.watertype <= CONTENT_WATER && self.waterlevel > 0) // workaround a retarded bug made by id software :P (yes, it's that old of a bug)
                {
                        if (!(self.flags & FL_INWATER))
                if (self.watertype <= CONTENT_WATER && self.waterlevel > 0) // workaround a retarded bug made by id software :P (yes, it's that old of a bug)
                {
                        if (!(self.flags & FL_INWATER))
@@ -38,11 +38,11 @@ void CreatureFrame (void)
                                        }
                                }
                        }
                                        }
                                }
                        }
-                       
+
                        if (self.dmgtime < time)
                        {
                        if (self.dmgtime < time)
                        {
-                               self.dmgtime = time + autocvar_g_balance_contents_damagerate; 
-                               
+                               self.dmgtime = time + autocvar_g_balance_contents_damagerate;
+
                                if (projectile)
                                {
                                        if (self.watertype == CONTENT_LAVA)
                                if (projectile)
                                {
                                        if (self.watertype == CONTENT_LAVA)
@@ -135,7 +135,7 @@ void CreatureFrame (void)
                                }
                        }
                }
                                }
                        }
                }
-               
+
         self.oldvelocity = self.velocity;
        }
        self = oldself;
         self.oldvelocity = self.velocity;
        }
        self = oldself;
index ab4505ae599f65a46dd0efd5550f4c5cc131e7c5..1db8f6cd7630fcf7913d3fd229696986f8aa5e7d 100644 (file)
@@ -28,37 +28,37 @@ var string autocvr_cl_simpleitems_postfix = "_simple";
 .float  gravity;
 .vector colormod;
 void ItemDraw()
 .float  gravity;
 .vector colormod;
 void ItemDraw()
-{    
+{
     if(self.gravity)
     if(self.gravity)
-    {        
+    {
         Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
         Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
-        if(self.move_flags & FL_ONGROUND) 
+        if(self.move_flags & FL_ONGROUND)
         { // For some reason move_avelocity gets set to '0 0 0' here ...
             self.oldorigin = self.origin;
             self.gravity = 0;
 
         { // For some reason move_avelocity gets set to '0 0 0' here ...
             self.oldorigin = self.origin;
             self.gravity = 0;
 
-            if(autocvar_cl_animate_items)   
-            { // ... so reset it if animations are requested. 
+            if(autocvar_cl_animate_items)
+            { // ... so reset it if animations are requested.
                 if(self.ItemStatus & ITS_ANIMATE1)
                     self.move_avelocity = '0 180 0';
                 if(self.ItemStatus & ITS_ANIMATE1)
                     self.move_avelocity = '0 180 0';
-                
+
                 if(self.ItemStatus & ITS_ANIMATE2)
                     self.move_avelocity = '0 -90 0';
             }
         }
     }
     else if (autocvar_cl_animate_items)
                 if(self.ItemStatus & ITS_ANIMATE2)
                     self.move_avelocity = '0 -90 0';
             }
         }
     }
     else if (autocvar_cl_animate_items)
-    {        
+    {
         if(self.ItemStatus & ITS_ANIMATE1)
         {
             self.angles += self.move_avelocity * frametime;
         if(self.ItemStatus & ITS_ANIMATE1)
         {
             self.angles += self.move_avelocity * frametime;
-            setorigin(self, '0 0 10' + self.oldorigin + '0 0 8' * sin(time * 2));        
-        }    
-        
+            setorigin(self, '0 0 10' + self.oldorigin + '0 0 8' * sin(time * 2));
+        }
+
         if(self.ItemStatus & ITS_ANIMATE2)
         {
             self.angles += self.move_avelocity * frametime;
         if(self.ItemStatus & ITS_ANIMATE2)
         {
             self.angles += self.move_avelocity * frametime;
-            setorigin(self, '0 0 8' + self.oldorigin + '0 0 4' * sin(time * 3));        
+            setorigin(self, '0 0 8' + self.oldorigin + '0 0 4' * sin(time * 3));
         }
     }
 }
         }
     }
 }
@@ -66,9 +66,9 @@ void ItemDraw()
 void ItemDrawSimple()
 {
     if(self.gravity)
 void ItemDrawSimple()
 {
     if(self.gravity)
-    {        
-        Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);    
-        
+    {
+        Movetype_Physics_MatchServer(autocvar_cl_projectiles_sloppy);
+
         if(self.move_flags & FL_ONGROUND)
             self.gravity = 0;
     }
         if(self.move_flags & FL_ONGROUND)
             self.gravity = 0;
     }
@@ -86,19 +86,19 @@ void ItemRead(float _IsNew)
         setorigin(self, self.origin);
         self.oldorigin = self.origin;
     }
         setorigin(self, self.origin);
         self.oldorigin = self.origin;
     }
-    
-    if(sf & ISF_ANGLES) 
+
+    if(sf & ISF_ANGLES)
     {
         self.angles_x = ReadCoord();
         self.angles_y = ReadCoord();
     {
         self.angles_x = ReadCoord();
         self.angles_y = ReadCoord();
-        self.angles_z = ReadCoord();        
+        self.angles_z = ReadCoord();
         self.move_angles = self.angles;
     }
         self.move_angles = self.angles;
     }
-    
+
     if(sf & ISF_STATUS) // need to read/write status frist so model can handle simple, fb etc.
     {
     if(sf & ISF_STATUS) // need to read/write status frist so model can handle simple, fb etc.
     {
-        self.ItemStatus = ReadByte();    
-        
+        self.ItemStatus = ReadByte();
+
         if(self.ItemStatus & ITS_AVAILABLE)
         {
             self.alpha = 1;
         if(self.ItemStatus & ITS_AVAILABLE)
         {
             self.alpha = 1;
@@ -113,19 +113,19 @@ void ItemRead(float _IsNew)
             }
             else
                 self.alpha = -1;
             }
             else
                 self.alpha = -1;
-        }    
-        
+        }
+
         if(autocvar_cl_fullbright_items)
             if(self.ItemStatus & ITS_ALLOWFB)
                 self.effects |= EF_FULLBRIGHT;
         if(autocvar_cl_fullbright_items)
             if(self.ItemStatus & ITS_ALLOWFB)
                 self.effects |= EF_FULLBRIGHT;
-            
+
         if(self.ItemStatus & ITS_STAYWEP)
         {
             self.colormod = self.glowmod = autocvar_cl_weapon_stay_color;
             self.alpha = autocvar_cl_weapon_stay_alpha;
         if(self.ItemStatus & ITS_STAYWEP)
         {
             self.colormod = self.glowmod = autocvar_cl_weapon_stay_color;
             self.alpha = autocvar_cl_weapon_stay_alpha;
-            
+
         }
         }
-        
+
         if(self.ItemStatus & ITS_POWERUP)
         {
             if(self.ItemStatus & ITS_AVAILABLE)
         if(self.ItemStatus & ITS_POWERUP)
         {
             if(self.ItemStatus & ITS_AVAILABLE)
@@ -134,26 +134,26 @@ void ItemRead(float _IsNew)
                  self.effects &= ~(EF_ADDITIVE | EF_FULLBRIGHT);
         }
     }
                  self.effects &= ~(EF_ADDITIVE | EF_FULLBRIGHT);
         }
     }
-    
+
     if(sf & ISF_MODEL)
     {
         self.drawmask  = MASK_NORMAL;
         self.movetype  = MOVETYPE_NOCLIP;
         self.draw       = ItemDraw;
     if(sf & ISF_MODEL)
     {
         self.drawmask  = MASK_NORMAL;
         self.movetype  = MOVETYPE_NOCLIP;
         self.draw       = ItemDraw;
-        
+
         if(self.mdl)
             strunzone(self.mdl);
         if(self.mdl)
             strunzone(self.mdl);
-        
+
         self.mdl = "";
         string _fn = ReadString();
         self.mdl = "";
         string _fn = ReadString();
-        
+
         if(autocvar_cl_simple_items && (self.ItemStatus & ITS_ALLOWSI))
         {
             string _fn2 = substring(_fn, 0 , strlen(_fn) -4);
             self.draw = ItemDrawSimple;
         if(autocvar_cl_simple_items && (self.ItemStatus & ITS_ALLOWSI))
         {
             string _fn2 = substring(_fn, 0 , strlen(_fn) -4);
             self.draw = ItemDrawSimple;
-                    
-            
-            
+
+
+
             if(fexists(sprintf("%s%s.md3", _fn2, autocvr_cl_simpleitems_postfix)))
                 self.mdl = strzone(sprintf("%s%s.md3", _fn2, autocvr_cl_simpleitems_postfix));
             else if(fexists(sprintf("%s%s.dpm", _fn2, autocvr_cl_simpleitems_postfix)))
             if(fexists(sprintf("%s%s.md3", _fn2, autocvr_cl_simpleitems_postfix)))
                 self.mdl = strzone(sprintf("%s%s.md3", _fn2, autocvr_cl_simpleitems_postfix));
             else if(fexists(sprintf("%s%s.dpm", _fn2, autocvr_cl_simpleitems_postfix)))
@@ -168,21 +168,21 @@ void ItemRead(float _IsNew)
                 dprint("Simple item requested for ", _fn, " but no model exsist for it\n");
             }
         }
                 dprint("Simple item requested for ", _fn, " but no model exsist for it\n");
             }
         }
-        
-        if(self.draw != ItemDrawSimple)        
-            self.mdl = strzone(_fn);                
-        
-        
+
+        if(self.draw != ItemDrawSimple)
+            self.mdl = strzone(_fn);
+
+
         if(self.mdl == "")
             dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, " tell tZork aboute this!\n");
         if(self.mdl == "")
             dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, " tell tZork aboute this!\n");
-        
+
         precache_model(self.mdl);
         setmodel(self, self.mdl);
     }
         precache_model(self.mdl);
         setmodel(self, self.mdl);
     }
-    
+
     if(sf & ISF_COLORMAP)
         self.colormap = ReadShort();
     if(sf & ISF_COLORMAP)
         self.colormap = ReadShort();
-    
+
     if(sf & ISF_DROP)
     {
         self.gravity = 1;
     if(sf & ISF_DROP)
     {
         self.gravity = 1;
@@ -193,7 +193,7 @@ void ItemRead(float _IsNew)
         self.move_velocity_z = ReadCoord();
         self.velocity = self.move_velocity;
         self.move_origin = self.oldorigin;
         self.move_velocity_z = ReadCoord();
         self.velocity = self.move_velocity;
         self.move_origin = self.oldorigin;
-        
+
         if(!self.move_time)
         {
             self.move_time = time;
         if(!self.move_time)
         {
             self.move_time = time;
@@ -202,12 +202,12 @@ void ItemRead(float _IsNew)
         else
             self.move_time = max(self.move_time, time);
     }
         else
             self.move_time = max(self.move_time, time);
     }
-        
+
     if(autocvar_cl_animate_items)
     if(autocvar_cl_animate_items)
-    {        
+    {
         if(self.ItemStatus & ITS_ANIMATE1)
             self.move_avelocity = '0 180 0';
         if(self.ItemStatus & ITS_ANIMATE1)
             self.move_avelocity = '0 180 0';
-                
+
         if(self.ItemStatus & ITS_ANIMATE2)
             self.move_avelocity = '0 -90 0';
     }
         if(self.ItemStatus & ITS_ANIMATE2)
             self.move_avelocity = '0 -90 0';
     }
@@ -223,8 +223,8 @@ float ItemSend(entity to, float sf)
         sf |= ISF_DROP;
     else
         sf &= ~ISF_DROP;
         sf |= ISF_DROP;
     else
         sf &= ~ISF_DROP;
-       
-       WriteByte(MSG_ENTITY, ENT_CLIENT_ITEM); 
+
+       WriteByte(MSG_ENTITY, ENT_CLIENT_ITEM);
        WriteByte(MSG_ENTITY, sf);
 
        //WriteByte(MSG_ENTITY, self.cnt);
        WriteByte(MSG_ENTITY, sf);
 
        //WriteByte(MSG_ENTITY, self.cnt);
@@ -234,7 +234,7 @@ float ItemSend(entity to, float sf)
         WriteCoord(MSG_ENTITY, self.origin_y);
         WriteCoord(MSG_ENTITY, self.origin_z);
     }
         WriteCoord(MSG_ENTITY, self.origin_y);
         WriteCoord(MSG_ENTITY, self.origin_z);
     }
-    
+
     if(sf & ISF_ANGLES)
     {
         WriteCoord(MSG_ENTITY, self.angles_x);
     if(sf & ISF_ANGLES)
     {
         WriteCoord(MSG_ENTITY, self.angles_x);
@@ -247,14 +247,14 @@ float ItemSend(entity to, float sf)
 
     if(sf & ISF_MODEL)
     {
 
     if(sf & ISF_MODEL)
     {
-        
+
         if(self.mdl == "")
             dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, "exspect a crash just aboute now\n");
         if(self.mdl == "")
             dprint("^1WARNING!^7 self.mdl is unset for item ", self.classname, "exspect a crash just aboute now\n");
-        
+
         WriteString(MSG_ENTITY, self.mdl);
     }
         WriteString(MSG_ENTITY, self.mdl);
     }
-        
-        
+
+
     if(sf & ISF_COLORMAP)
         WriteShort(MSG_ENTITY, self.colormap);
 
     if(sf & ISF_COLORMAP)
         WriteShort(MSG_ENTITY, self.colormap);
 
@@ -264,7 +264,7 @@ float ItemSend(entity to, float sf)
         WriteCoord(MSG_ENTITY, self.velocity_y);
         WriteCoord(MSG_ENTITY, self.velocity_z);
     }
         WriteCoord(MSG_ENTITY, self.velocity_y);
         WriteCoord(MSG_ENTITY, self.velocity_z);
     }
-        
+
     return TRUE;
 }
 
     return TRUE;
 }
 
@@ -374,7 +374,7 @@ float Item_Customize()
 */
 
 void Item_Show (entity e, float mode)
 */
 
 void Item_Show (entity e, float mode)
-{    
+{
        e.effects &= ~(EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT | EF_NODEPTHTEST);
        e.ItemStatus &= ~ITS_STAYWEP;
        if (mode > 0)
        e.effects &= ~(EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT | EF_NODEPTHTEST);
        e.ItemStatus &= ~ITS_STAYWEP;
        if (mode > 0)
@@ -411,17 +411,17 @@ void Item_Show (entity e, float mode)
                e.spawnshieldtime = 1;
                e.ItemStatus &= ~ITS_AVAILABLE;
        }
                e.spawnshieldtime = 1;
                e.ItemStatus &= ~ITS_AVAILABLE;
        }
-       
+
        if (e.items & IT_STRENGTH || e.items & IT_INVINCIBLE)
        if (e.items & IT_STRENGTH || e.items & IT_INVINCIBLE)
-           e.ItemStatus |= ITS_POWERUP;                
-       
+           e.ItemStatus |= ITS_POWERUP;
+
        if (autocvar_g_nodepthtestitems)
                e.effects |= EF_NODEPTHTEST;
        if (autocvar_g_nodepthtestitems)
                e.effects |= EF_NODEPTHTEST;
-               
-    
+
+
     if (autocvar_g_fullbrightitems)
                e.ItemStatus |= ITS_ALLOWFB;
     if (autocvar_g_fullbrightitems)
                e.ItemStatus |= ITS_ALLOWFB;
-       
+
        if (autocvar_sv_simple_items)
         e.ItemStatus |= ITS_ALLOWSI;
 
        if (autocvar_sv_simple_items)
         e.ItemStatus |= ITS_ALLOWSI;
 
@@ -651,7 +651,7 @@ float Item_GiveTo(entity item, entity player)
        }
 
 :skip
        }
 
 :skip
-       
+
        // always eat teamed entities
        if(item.team)
                pickedup = TRUE;
        // always eat teamed entities
        if(item.team)
                pickedup = TRUE;
@@ -669,7 +669,7 @@ float Item_GiveTo(entity item, entity player)
 void Item_Touch (void)
 {
        entity e, head;
 void Item_Touch (void)
 {
        entity e, head;
-       
+
        // remove the item if it's currnetly in a NODROP brush or hits a NOIMPACT surface (such as sky)
        if(self.classname == "droppedweapon")
        {
        // remove the item if it's currnetly in a NODROP brush or hits a NOIMPACT surface (such as sky)
        if(self.classname == "droppedweapon")
        {
@@ -930,16 +930,16 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
 
        if(self.model == "")
                self.model = itemmodel;
 
        if(self.model == "")
                self.model = itemmodel;
-       
+
        if(self.model == "")
     {
         error(strcat("^1Tried to spawn ", itemname, " with no model!\n"));
         return;
     }
        if(self.model == "")
     {
         error(strcat("^1Tried to spawn ", itemname, " with no model!\n"));
         return;
     }
-        
+
        if(self.item_pickupsound == "")
                self.item_pickupsound = pickupsound;
        if(self.item_pickupsound == "")
                self.item_pickupsound = pickupsound;
-       
+
        if(!self.respawntime) // both need to be set
        {
                self.respawntime = defaultrespawntime;
        if(!self.respawntime) // both need to be set
        {
                self.respawntime = defaultrespawntime;
@@ -951,7 +951,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
 
        if(weaponid)
                self.weapons = WepSet_FromWeapon(weaponid);
 
        if(weaponid)
                self.weapons = WepSet_FromWeapon(weaponid);
-       
+
        self.flags = FL_ITEM | itemflags;
 
        if(MUTATOR_CALLHOOK(FilterItem)) // error means we do not want the item
        self.flags = FL_ITEM | itemflags;
 
        if(MUTATOR_CALLHOOK(FilterItem)) // error means we do not want the item
@@ -1009,7 +1009,7 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
                        remove (self);
                        return;
                }
                        remove (self);
                        return;
                }
-               
+
                if(self.angles != '0 0 0')
             self.SendFlags |= ISF_ANGLES;
 
                if(self.angles != '0 0 0')
             self.SendFlags |= ISF_ANGLES;
 
@@ -1090,8 +1090,8 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
        self.netname = itemname;
        self.touch = Item_Touch;
        setmodel(self, "null"); // precision set below
        self.netname = itemname;
        self.touch = Item_Touch;
        setmodel(self, "null"); // precision set below
-       //self.effects |= EF_LOWPRECISION; 
-       
+       //self.effects |= EF_LOWPRECISION;
+
        if((itemflags & FL_POWERUP) || self.health || self.armorvalue)
     {
         self.pos1 = '-16 -16 0';
        if((itemflags & FL_POWERUP) || self.health || self.armorvalue)
     {
         self.pos1 = '-16 -16 0';
@@ -1103,20 +1103,20 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
         self.pos2 = '16 16 32';
     }
     setsize (self, self.pos1, self.pos2);
         self.pos2 = '16 16 32';
     }
     setsize (self, self.pos1, self.pos2);
-    
-    if(itemflags & FL_POWERUP) 
+
+    if(itemflags & FL_POWERUP)
         self.ItemStatus |= ITS_ANIMATE1;
         self.ItemStatus |= ITS_ANIMATE1;
-       
+
        if(self.armorvalue || self.health)
         self.ItemStatus |= ITS_ANIMATE2;
        if(self.armorvalue || self.health)
         self.ItemStatus |= ITS_ANIMATE2;
-       
+
        if(itemflags & FL_WEAPON)
        {
                if (self.classname != "droppedweapon") // if dropped, colormap is already set up nicely
             self.colormap = 1024; // color shirt=0 pants=0 grey
         else
             self.gravity = 1;
        if(itemflags & FL_WEAPON)
        {
                if (self.classname != "droppedweapon") // if dropped, colormap is already set up nicely
             self.colormap = 1024; // color shirt=0 pants=0 grey
         else
             self.gravity = 1;
-            
+
                self.ItemStatus |= ITS_ANIMATE1;
                self.ItemStatus |= ISF_COLORMAP;
        }
                self.ItemStatus |= ITS_ANIMATE1;
                self.ItemStatus |= ISF_COLORMAP;
        }
@@ -1126,13 +1126,13 @@ void StartItem (string itemmodel, string pickupsound, float defaultrespawntime,
        {
                if(!self.cnt)
                        self.cnt = 1; // item probability weight
        {
                if(!self.cnt)
                        self.cnt = 1; // item probability weight
-                       
+
                self.effects |= EF_NODRAW; // marker for item team search
                InitializeEntity(self, Item_FindTeam, INITPRIO_FINDTARGET);
        }
        else
                Item_Reset();
                self.effects |= EF_NODRAW; // marker for item team search
                InitializeEntity(self, Item_FindTeam, INITPRIO_FINDTARGET);
        }
        else
                Item_Reset();
-        
+
     Net_LinkEntity(self, FALSE, 0, ItemSend);
 
        // call this hook after everything else has been done
     Net_LinkEntity(self, FALSE, 0, ItemSend);
 
        // call this hook after everything else has been done
@@ -1803,7 +1803,7 @@ float GiveItems(entity e, float beginarg, float endarg)
        e.strength_finished = max(0, e.strength_finished - time);
        e.invincible_finished = max(0, e.invincible_finished - time);
        e.superweapons_finished = max(0, e.superweapons_finished - time);
        e.strength_finished = max(0, e.strength_finished - time);
        e.invincible_finished = max(0, e.invincible_finished - time);
        e.superweapons_finished = max(0, e.superweapons_finished - time);
-       
+
        PREGIVE(e, items);
        PREGIVE_WEAPONS(e);
        PREGIVE(e, strength_finished);
        PREGIVE(e, items);
        PREGIVE_WEAPONS(e);
        PREGIVE(e, strength_finished);
index 55844c8d652e5cfeec0b08201e7a4ffd75030a6e..3955442310817b537994f80d19d872ac6d65be3e 100644 (file)
@@ -448,9 +448,9 @@ void spawnfunc_func_train()
 
 void func_rotating_setactive(float astate)
 {
 
 void func_rotating_setactive(float astate)
 {
-       
+
        if (astate == ACTIVE_TOGGLE)
        if (astate == ACTIVE_TOGGLE)
-       {               
+       {
                if(self.active == ACTIVE_ACTIVE)
                        self.active = ACTIVE_NOT;
                else
                if(self.active == ACTIVE_ACTIVE)
                        self.active = ACTIVE_NOT;
                else
@@ -458,8 +458,8 @@ void func_rotating_setactive(float astate)
        }
        else
                self.active = astate;
        }
        else
                self.active = astate;
-               
-       if(self.active  == ACTIVE_NOT)          
+
+       if(self.active  == ACTIVE_NOT)
                self.avelocity = '0 0 0';
        else
                self.avelocity = self.pos1;
                self.avelocity = '0 0 0';
        else
                self.avelocity = self.pos1;
@@ -480,10 +480,10 @@ void spawnfunc_func_rotating()
                precache_sound(self.noise);
                ambientsound(self.origin, self.noise, VOL_BASE, ATTEN_IDLE);
        }
                precache_sound(self.noise);
                ambientsound(self.origin, self.noise, VOL_BASE, ATTEN_IDLE);
        }
-       
+
        self.active = ACTIVE_ACTIVE;
        self.setactive = func_rotating_setactive;
        self.active = ACTIVE_ACTIVE;
        self.setactive = func_rotating_setactive;
-       
+
        if (!self.speed)
                self.speed = 100;
        // FIXME: test if this turns the right way, then remove this comment (negate as needed)
        if (!self.speed)
                self.speed = 100;
        // FIXME: test if this turns the right way, then remove this comment (negate as needed)
@@ -495,9 +495,9 @@ void spawnfunc_func_rotating()
        // FIXME: test if this turns the right way, then remove this comment (negate as needed)
        else // Z
                self.avelocity = '0 1 0' * self.speed;
        // FIXME: test if this turns the right way, then remove this comment (negate as needed)
        else // Z
                self.avelocity = '0 1 0' * self.speed;
-       
+
        self.pos1 = self.avelocity;
        self.pos1 = self.avelocity;
-    
+
     if(self.dmg && (self.message == ""))
         self.message = " was squished";
     if(self.dmg && (self.message2 == ""))
     if(self.dmg && (self.message == ""))
         self.message = " was squished";
     if(self.dmg && (self.message2 == ""))
@@ -527,13 +527,13 @@ void func_bobbing_controller_think()
 {
        vector v;
        self.nextthink = time + 0.1;
 {
        vector v;
        self.nextthink = time + 0.1;
-       
+
        if (!(self.owner.active == ACTIVE_ACTIVE))
        {
        if (!(self.owner.active == ACTIVE_ACTIVE))
        {
-               self.owner.velocity = '0 0 0';          
+               self.owner.velocity = '0 0 0';
                return;
        }
                return;
        }
-               
+
        // calculate sinewave using makevectors
        makevectors((self.nextthink * self.owner.cnt + self.owner.phase * 360) * '0 1 0');
        v = self.owner.destvec + self.owner.movedir * v_forward_y;
        // calculate sinewave using makevectors
        makevectors((self.nextthink * self.owner.cnt + self.owner.phase * 360) * '0 1 0');
        v = self.owner.destvec + self.owner.movedir * v_forward_y;
@@ -992,13 +992,13 @@ ACTIVATION FUNCTIONS
 
 float door_check_keys(void) {
        local entity door;
 
 float door_check_keys(void) {
        local entity door;
-       
-       
+
+
        if (self.owner)
                door = self.owner;
        else
                door = self;
        if (self.owner)
                door = self.owner;
        else
                door = self;
-       
+
        // no key needed
        if (!door.itemkeys)
                return TRUE;
        // no key needed
        if (!door.itemkeys)
                return TRUE;
@@ -1007,7 +1007,7 @@ float door_check_keys(void) {
        // only a player can have a key
        if (!IS_PLAYER(other))
                return FALSE;
        // only a player can have a key
        if (!IS_PLAYER(other))
                return FALSE;
-       
+
        if (item_keys_usekey(door, other)) {
                // some keys were used
                if (other.key_door_messagetime <= time) {
        if (item_keys_usekey(door, other)) {
                // some keys were used
                if (other.key_door_messagetime <= time) {
@@ -1099,7 +1099,7 @@ void door_use()
        entity oself;
 
        //dprint("door_use (model: ");dprint(self.model);dprint(")\n");
        entity oself;
 
        //dprint("door_use (model: ");dprint(self.model);dprint(")\n");
-       
+
        if (self.owner)
        {
                oself = self;
        if (self.owner)
        {
                oself = self;
@@ -1118,11 +1118,11 @@ void door_trigger_touch()
 
        if (time < self.attack_finished_single)
                return;
 
        if (time < self.attack_finished_single)
                return;
-       
+
        // check if door is locked
        if (!door_check_keys())
                return;
        // check if door is locked
        if (!door_check_keys())
                return;
-       
+
        self.attack_finished_single = time + 1;
 
        activator = other;
        self.attack_finished_single = time + 1;
 
        activator = other;
@@ -1139,12 +1139,12 @@ void door_damage(entity inflictor, entity attacker, float damage, float deathtyp
                if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
                        return;
        self.health = self.health - damage;
                if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
                        return;
        self.health = self.health - damage;
-       
+
        if (self.itemkeys) {
                // don't allow opening doors through damage if keys are required
                return;
        }
        if (self.itemkeys) {
                // don't allow opening doors through damage if keys are required
                return;
        }
-       
+
        if (self.health <= 0)
        {
                oself = self;
        if (self.health <= 0)
        {
                oself = self;
@@ -1489,7 +1489,7 @@ void spawnfunc_func_door()
                self.itemkeys |= ITEM_KEY_BIT(0);
        if (self.spawnflags & SPAWNFLAGS_SILVER_KEY)
                self.itemkeys |= ITEM_KEY_BIT(1);
                self.itemkeys |= ITEM_KEY_BIT(0);
        if (self.spawnflags & SPAWNFLAGS_SILVER_KEY)
                self.itemkeys |= ITEM_KEY_BIT(1);
-               
+
        //if (!self.deathtype) // map makers can override this
        //      self.deathtype = " got in the way";
        SetMovedir ();
        //if (!self.deathtype) // map makers can override this
        //      self.deathtype = " got in the way";
        SetMovedir ();
@@ -1942,7 +1942,7 @@ void func_fourier_controller_think()
        self.nextthink = time + 0.1;
        if (!(self.owner.active == ACTIVE_ACTIVE))
        {
        self.nextthink = time + 0.1;
        if (!(self.owner.active == ACTIVE_ACTIVE))
        {
-               self.owner.velocity = '0 0 0';          
+               self.owner.velocity = '0 0 0';
                return;
        }
 
                return;
        }
 
@@ -2075,7 +2075,7 @@ void func_vectormamamam_controller_think()
 
        if (!(self.owner.active == ACTIVE_ACTIVE))
        {
 
        if (!(self.owner.active == ACTIVE_ACTIVE))
        {
-               self.owner.velocity = '0 0 0';          
+               self.owner.velocity = '0 0 0';
                return;
        }
 
                return;
        }
 
index 2a9d5427b639ed8fb8e0f0b14bfdc6782f18d670..e481dc6349018f2b28a539d4d3be7594daac9a11 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *              t_swamp.c
 *              Adds spawnfunc_trigger_swamp and suppoart routines for xonotic 1.2.1+
 /*
 *              t_swamp.c
 *              Adds spawnfunc_trigger_swamp and suppoart routines for xonotic 1.2.1+
-*              Author tZork (Jakob MG) 
+*              Author tZork (Jakob MG)
 *              jakob@games43.se
 *              2005 11 29
 */
 *              jakob@games43.se
 *              2005 11 29
 */
@@ -20,16 +20,16 @@ void swampslug_think();
 * It works like this: When the plyer enters teh swamp the spawnfunc_trigger_swamp
 * attaches a new "swampslug" to the player. As long as the plyer is inside
 * the swamp the swamp gives the slug new health. But the slug slowly kills itself
 * It works like this: When the plyer enters teh swamp the spawnfunc_trigger_swamp
 * attaches a new "swampslug" to the player. As long as the plyer is inside
 * the swamp the swamp gives the slug new health. But the slug slowly kills itself
-* so when the player goes outside the swamp, it dies and releases the player from the 
-* swamps curses (dmg/slowdown) 
-* 
+* so when the player goes outside the swamp, it dies and releases the player from the
+* swamps curses (dmg/slowdown)
+*
 * I do it this way becuz there is no "untouch" event.
 *
 * I do it this way becuz there is no "untouch" event.
 *
-* --NOTE-- 
+* --NOTE--
 * THE ACCTUAL slowdown is done in cl_physics.c on line 57-60
 * --NOTE--
 */
 * THE ACCTUAL slowdown is done in cl_physics.c on line 57-60
 * --NOTE--
 */
-void swampslug_think(void) 
+void swampslug_think(void)
 {
        //Slowly kill the slug
        self.health = self.health - 1;
 {
        //Slowly kill the slug
        self.health = self.health - 1;
@@ -41,7 +41,7 @@ void swampslug_think(void)
                //centerprint(self.owner,"Killing slug...\n");
                return;
        }
                //centerprint(self.owner,"Killing slug...\n");
                return;
        }
-       
+
        // Slug still alive, so we are still in the swamp
        // Or we have exited it very recently.
        // Do the damage and renew the timer.
        // Slug still alive, so we are still in the swamp
        // Or we have exited it very recently.
        // Do the damage and renew the timer.
@@ -50,7 +50,7 @@ void swampslug_think(void)
        self.nextthink = time + self.swamp_interval;
 }
 
        self.nextthink = time + self.swamp_interval;
 }
 
-void swamp_touch(void) 
+void swamp_touch(void)
 {
        // If whatever thats touching the swamp is not a player
        // or if its a dead player, just dont care abt it.
 {
        // If whatever thats touching the swamp is not a player
        // or if its a dead player, just dont care abt it.
@@ -82,20 +82,20 @@ void swamp_touch(void)
 }
 
 /*QUAKED spawnfunc_trigger_swamp (.5 .5 .5) ?
 }
 
 /*QUAKED spawnfunc_trigger_swamp (.5 .5 .5) ?
-Players gettin into the swamp will 
+Players gettin into the swamp will
 get slowd down and damaged
 */
 void spawnfunc_trigger_swamp(void)
 {
        // Init stuff
        EXACTTRIGGER_INIT;
 get slowd down and damaged
 */
 void spawnfunc_trigger_swamp(void)
 {
        // Init stuff
        EXACTTRIGGER_INIT;
-       self.touch = swamp_touch;       
+       self.touch = swamp_touch;
 
        // Setup default keys, if missing
 
        // Setup default keys, if missing
-       if(self.dmg <= 0) 
+       if(self.dmg <= 0)
                self.dmg = 5;
                self.dmg = 5;
-       if(self.swamp_interval <= 0) 
+       if(self.swamp_interval <= 0)
                self.swamp_interval = 1;
                self.swamp_interval = 1;
-       if(self.swamp_slowdown <= 0) 
+       if(self.swamp_slowdown <= 0)
                self.swamp_slowdown = 0.5;
 }
                self.swamp_slowdown = 0.5;
 }
index 0b2345118f080ad30f75a89eee1f545ce2c49190..8f15a4f820c428c976ca17d5871ce178d99b9b6e 100644 (file)
@@ -25,7 +25,7 @@ void trigger_teleport_use()
                if(head != player) \
                        if(head.takedamage) \
                                if(boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
                if(head != player) \
                        if(head.takedamage) \
                                if(boxesoverlap(deathmin, deathmax, head.absmin, head.absmax))
-       
+
 
 float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax)
 {
 
 float check_tdeath(entity player, vector org, vector telefragmin, vector telefragmax)
 {
@@ -153,14 +153,14 @@ entity Simple_TeleportPlayer(entity teleporter, entity player)
        vector locout;
        entity e;
        float p;
        vector locout;
        entity e;
        float p;
-       
+
        // Find the output teleporter
        if(teleporter.enemy)
        {
                e = teleporter.enemy;
        }
        else
        // Find the output teleporter
        if(teleporter.enemy)
        {
                e = teleporter.enemy;
        }
        else
-       { 
+       {
                RandomSelection_Init();
                for(e = world; (e = find(e, targetname, teleporter.target)); )
                {
                RandomSelection_Init();
                for(e = world; (e = find(e, targetname, teleporter.target)); )
                {
@@ -177,13 +177,13 @@ entity Simple_TeleportPlayer(entity teleporter, entity player)
        }
 
        if(!e) { sprint(player, "Teleport destination vanished. Sorry... please complain to the mapper.\n"); }
        }
 
        if(!e) { sprint(player, "Teleport destination vanished. Sorry... please complain to the mapper.\n"); }
-       
+
        makevectors(e.mangle);
 
        if(e.speed)
                if(vlen(player.velocity) > e.speed)
                        player.velocity = normalize(player.velocity) * max(0, e.speed);
        makevectors(e.mangle);
 
        if(e.speed)
                if(vlen(player.velocity) > e.speed)
                        player.velocity = normalize(player.velocity) * max(0, e.speed);
-                       
+
        if(autocvar_g_teleport_maxspeed)
                if(vlen(player.velocity) > autocvar_g_teleport_maxspeed)
                        player.velocity = normalize(player.velocity) * max(0, autocvar_g_teleport_maxspeed);
        if(autocvar_g_teleport_maxspeed)
                if(vlen(player.velocity) > autocvar_g_teleport_maxspeed)
                        player.velocity = normalize(player.velocity) * max(0, autocvar_g_teleport_maxspeed);
@@ -201,17 +201,17 @@ void Teleport_Touch (void)
 
        if (self.active != ACTIVE_ACTIVE)
                return;
 
        if (self.active != ACTIVE_ACTIVE)
                return;
-       
+
        if (!other.teleportable)
                return;
        if (!other.teleportable)
                return;
-    
+
        if(other.vehicle)
        if(!other.vehicle.teleportable)
                return;
        if(other.vehicle)
        if(!other.vehicle.teleportable)
                return;
-                       
+
        if(other.turrcaps_flags & TFL_TURRCAPS_ISTURRET)
                return;
        if(other.turrcaps_flags & TFL_TURRCAPS_ISTURRET)
                return;
-        
+
        if(other.deadflag != DEAD_NO)
                return;
 
        if(other.deadflag != DEAD_NO)
                return;
 
@@ -223,7 +223,7 @@ void Teleport_Touch (void)
 
        if(IS_PLAYER(other))
                RemoveGrapplingHook(other);
 
        if(IS_PLAYER(other))
                RemoveGrapplingHook(other);
-               
+
        entity e;
        e = Simple_TeleportPlayer(self, other);
 
        entity e;
        e = Simple_TeleportPlayer(self, other);
 
@@ -310,16 +310,16 @@ entity Teleport_Find(vector mi, vector ma)
        return world;
 }
 
        return world;
 }
 
-entity teleport_first; 
+entity teleport_first;
 .entity teleport_next;
 void spawnfunc_trigger_teleport (void)
 {
        self.angles = '0 0 0';
 
        EXACTTRIGGER_INIT;
 .entity teleport_next;
 void spawnfunc_trigger_teleport (void)
 {
        self.angles = '0 0 0';
 
        EXACTTRIGGER_INIT;
-       
-       self.active = ACTIVE_ACTIVE;    
-       
+
+       self.active = ACTIVE_ACTIVE;
+
        self.use = trigger_teleport_use;
 
        // this must be called to spawn the teleport waypoints for bots
        self.use = trigger_teleport_use;
 
        // this must be called to spawn the teleport waypoints for bots
@@ -330,7 +330,7 @@ void spawnfunc_trigger_teleport (void)
                objerror ("Teleporter with no target");
                return;
        }
                objerror ("Teleporter with no target");
                return;
        }
-       
+
        self.teleport_next = teleport_first;
        teleport_first = self;
 }
        self.teleport_next = teleport_first;
        teleport_first = self;
 }
index ebb89aa5c9c0bf274742139a99d56f3ecf2eacb2..4da6b13bbbb948060ec40541307eeffddf84be95 100644 (file)
@@ -256,7 +256,7 @@ float target_spawn_cancreate()
        ++c; // increase count to not include MYSELF
        for(e = world; (e = findfloat(e, target_spawn_id, self.target_spawn_id)); --c)
                ;
        ++c; // increase count to not include MYSELF
        for(e = world; (e = findfloat(e, target_spawn_id, self.target_spawn_id)); --c)
                ;
-       
+
        // if c now is 0, we have AT LEAST the given count (maybe more), so don't spawn any more
        if(c == 0)
                return 0;
        // if c now is 0, we have AT LEAST the given count (maybe more), so don't spawn any more
        if(c == 0)
                return 0;
index 3e1ce958812b7c351438691d3c7daf0858afb0f0..2914744c0a5ef8f5c9acfc0ea0cb974f39d98be4 100644 (file)
@@ -192,7 +192,7 @@ void InitGameplayMode()
         have_team_spawns = -1; // request team spawns
            MUTATOR_ADD(gamemode_nexball);
        }
         have_team_spawns = -1; // request team spawns
            MUTATOR_ADD(gamemode_nexball);
        }
-        
+
        if(g_keepaway)
        {
                MUTATOR_ADD(gamemode_keepaway);
        if(g_keepaway)
        {
                MUTATOR_ADD(gamemode_keepaway);
@@ -600,7 +600,7 @@ float TeamSmallerEqThanTeam(float ta, float tb, entity e)
                        cb -= cbb * 0.999;
                }
        }
                        cb -= cbb * 0.999;
                }
        }
-       
+
        // keep teams alive (teams of size 0 always count as smaller, ignoring score)
        if(ca < 1)
                if(cb >= 1)
        // keep teams alive (teams of size 0 always count as smaller, ignoring score)
        if(ca < 1)
                if(cb >= 1)
@@ -671,7 +671,7 @@ float FindSmallestTeam(entity pl, float ignore_pl)
                GetTeamCounts(world);
 
        RandomSelection_Init();
                GetTeamCounts(world);
 
        RandomSelection_Init();
-       
+
        t = 1;
        if(TeamSmallerEqThanTeam(2, t, pl))
                t = 2;
        t = 1;
        if(TeamSmallerEqThanTeam(2, t, pl))
                t = 2;
index 6e283f41583135d45c88349a68db5d8832739395..c3dbe55a4848d9d5d0505192a77cfab3057cd77c 100644 (file)
@@ -25,7 +25,7 @@ vector turret_stdproc_aim_generic()
 
     // Lead?
     if (self.aim_flags & TFL_AIM_LEAD)
 
     // Lead?
     if (self.aim_flags & TFL_AIM_LEAD)
-    {          
+    {
                if (self.aim_flags & TFL_AIM_SHOTTIMECOMPENSATE)       // Need to conpensate for shot traveltime
                {
                        // FIXME: this cant be the best way to do this..
                if (self.aim_flags & TFL_AIM_SHOTTIMECOMPENSATE)       // Need to conpensate for shot traveltime
                {
                        // FIXME: this cant be the best way to do this..
@@ -60,7 +60,7 @@ vector turret_stdproc_aim_generic()
                else
                        pre_pos = pre_pos + self.enemy.velocity * mintime;
     }
                else
                        pre_pos = pre_pos + self.enemy.velocity * mintime;
     }
-    
+
     if(self.aim_flags & TFL_AIM_GROUNDGROUND)
     {
         //tracebox(pre_pos + '0 0 32',self.enemy.mins,self.enemy.maxs,pre_pos -'0 0 64',MOVE_WORLDONLY,self.enemy);
     if(self.aim_flags & TFL_AIM_GROUNDGROUND)
     {
         //tracebox(pre_pos + '0 0 32',self.enemy.mins,self.enemy.maxs,pre_pos -'0 0 64',MOVE_WORLDONLY,self.enemy);
index c75abd8b2654e6f29ce6d4ff33d29d11c880eef0..a8feaebc3ba81ff49823e705f0a3a750e8defc72 100644 (file)
@@ -40,7 +40,7 @@ void turret_stdproc_die()
         self.SendFlags      |= TNSF_STATUS;
         self.nextthink      = time + 0.2;
         self.think          = turret_hide;
         self.SendFlags      |= TNSF_STATUS;
         self.nextthink      = time + 0.2;
         self.think          = turret_hide;
-        
+
         if (self.turret_diehook)
             self.turret_diehook();
     }
         if (self.turret_diehook)
             self.turret_diehook();
     }
@@ -56,7 +56,7 @@ void turret_stdproc_respawn()
     self.deadflag           = DEAD_NO;
     self.effects            = EF_LOWPRECISION;
     self.solid              = SOLID_BBOX;
     self.deadflag           = DEAD_NO;
     self.effects            = EF_LOWPRECISION;
     self.solid              = SOLID_BBOX;
-    
+
     self.takedamage                    = DAMAGE_AIM;
     self.event_damage           = turret_stdproc_damage;
 
     self.takedamage                    = DAMAGE_AIM;
     self.event_damage           = turret_stdproc_damage;
 
@@ -71,7 +71,7 @@ void turret_stdproc_respawn()
 
     self.nextthink  = time + self.ticrate;
     self.think      = turret_think;
 
     self.nextthink  = time + self.ticrate;
     self.think      = turret_think;
-    
+
     self.SendFlags  = TNSF_FULL_UPDATE;
 
     if (self.turret_respawnhook)
     self.SendFlags  = TNSF_FULL_UPDATE;
 
     if (self.turret_respawnhook)
@@ -111,13 +111,13 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
     {
         self.tur_head.angles_x = self.tur_head.angles_x + (-0.5 + random()) * damage;
         self.tur_head.angles_y = self.tur_head.angles_y + (-0.5 + random()) * damage;
     {
         self.tur_head.angles_x = self.tur_head.angles_x + (-0.5 + random()) * damage;
         self.tur_head.angles_y = self.tur_head.angles_y + (-0.5 + random()) * damage;
-        
+
         self.SendFlags  |= TNSF_ANG;
     }
 
     if (self.turrcaps_flags & TFL_TURRCAPS_MOVE)
         self.velocity = self.velocity + vforce;
         self.SendFlags  |= TNSF_ANG;
     }
 
     if (self.turrcaps_flags & TFL_TURRCAPS_MOVE)
         self.velocity = self.velocity + vforce;
-    
+
     if (self.health <= 0)
     {
         self.event_damage           = func_null;
     if (self.health <= 0)
     {
         self.event_damage           = func_null;
@@ -126,6 +126,6 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
         self.nextthink = time;
         self.think = turret_stdproc_die;
     }
         self.nextthink = time;
         self.think = turret_stdproc_die;
     }
-    
+
     self.SendFlags  |= TNSF_STATUS;
 }
     self.SendFlags  |= TNSF_STATUS;
 }
index 17343f417b27ec9b35f9f9bfbd2da7c4220154af..b4ad709b4d0b547278fd74c4f20fff29a0d64b62 100644 (file)
@@ -1,49 +1,49 @@
 #define cvar_base "g_turrets_unit_"
 .float clientframe;
 void turrets_setframe(float _frame, float client_only)
 #define cvar_base "g_turrets_unit_"
 .float clientframe;
 void turrets_setframe(float _frame, float client_only)
-{        
+{
     if((client_only ? self.clientframe : self.frame ) != _frame)
     {
         self.SendFlags |= TNSF_ANIM;
         self.anim_start_time = time;
     }
     if((client_only ? self.clientframe : self.frame ) != _frame)
     {
         self.SendFlags |= TNSF_ANIM;
         self.anim_start_time = time;
     }
-    
+
      if(client_only)
         self.clientframe = _frame;
     else
         self.frame = _frame;
      if(client_only)
         self.clientframe = _frame;
     else
         self.frame = _frame;
-   
+
 }
 
 float turret_send(entity to, float sf)
 {
 }
 
 float turret_send(entity to, float sf)
 {
-       
-       WriteByte(MSG_ENTITY, ENT_CLIENT_TURRET);    
+
+       WriteByte(MSG_ENTITY, ENT_CLIENT_TURRET);
        WriteByte(MSG_ENTITY, sf);
        if(sf & TNSF_SETUP)
        {
            WriteByte(MSG_ENTITY, self.turret_type);
        WriteByte(MSG_ENTITY, sf);
        if(sf & TNSF_SETUP)
        {
            WriteByte(MSG_ENTITY, self.turret_type);
-           
+
            WriteCoord(MSG_ENTITY, self.origin_x);
            WriteCoord(MSG_ENTITY, self.origin_y);
            WriteCoord(MSG_ENTITY, self.origin_z);
            WriteCoord(MSG_ENTITY, self.origin_x);
            WriteCoord(MSG_ENTITY, self.origin_y);
            WriteCoord(MSG_ENTITY, self.origin_z);
-           
+
            WriteAngle(MSG_ENTITY, self.angles_x);
            WriteAngle(MSG_ENTITY, self.angles_y);
     }
            WriteAngle(MSG_ENTITY, self.angles_x);
            WriteAngle(MSG_ENTITY, self.angles_y);
     }
-    
+
     if(sf & TNSF_ANG)
     {
         WriteShort(MSG_ENTITY, rint(self.tur_head.angles_x));
         WriteShort(MSG_ENTITY, rint(self.tur_head.angles_y));
     }
     if(sf & TNSF_ANG)
     {
         WriteShort(MSG_ENTITY, rint(self.tur_head.angles_x));
         WriteShort(MSG_ENTITY, rint(self.tur_head.angles_y));
     }
-    
+
     if(sf & TNSF_AVEL)
     if(sf & TNSF_AVEL)
-    {        
+    {
         WriteShort(MSG_ENTITY, rint(self.tur_head.avelocity_x));
         WriteShort(MSG_ENTITY, rint(self.tur_head.avelocity_y));
     }
         WriteShort(MSG_ENTITY, rint(self.tur_head.avelocity_x));
         WriteShort(MSG_ENTITY, rint(self.tur_head.avelocity_y));
     }
-    
+
     if(sf & TNSF_MOVE)
     {
         WriteShort(MSG_ENTITY, rint(self.origin_x));
     if(sf & TNSF_MOVE)
     {
         WriteShort(MSG_ENTITY, rint(self.origin_x));
@@ -52,27 +52,27 @@ float turret_send(entity to, float sf)
 
         WriteShort(MSG_ENTITY, rint(self.velocity_x));
         WriteShort(MSG_ENTITY, rint(self.velocity_y));
 
         WriteShort(MSG_ENTITY, rint(self.velocity_x));
         WriteShort(MSG_ENTITY, rint(self.velocity_y));
-        WriteShort(MSG_ENTITY, rint(self.velocity_z));        
-        
-        WriteShort(MSG_ENTITY, rint(self.angles_y));        
+        WriteShort(MSG_ENTITY, rint(self.velocity_z));
+
+        WriteShort(MSG_ENTITY, rint(self.angles_y));
     }
     }
-    
+
     if(sf & TNSF_ANIM)
     {
         WriteCoord(MSG_ENTITY, self.anim_start_time);
         WriteByte(MSG_ENTITY, self.frame);
     }
     if(sf & TNSF_ANIM)
     {
         WriteCoord(MSG_ENTITY, self.anim_start_time);
         WriteByte(MSG_ENTITY, self.frame);
     }
-    
+
     if(sf & TNSF_STATUS)
     {
         WriteByte(MSG_ENTITY, self.team);
     if(sf & TNSF_STATUS)
     {
         WriteByte(MSG_ENTITY, self.team);
-        
+
         if(self.health <= 0)
             WriteByte(MSG_ENTITY, 0);
         else
             WriteByte(MSG_ENTITY, ceil((self.health / self.tur_health) * 255));
     }
         if(self.health <= 0)
             WriteByte(MSG_ENTITY, 0);
         else
             WriteByte(MSG_ENTITY, ceil((self.health / self.tur_health) * 255));
     }
-    
+
        return TRUE;
 }
 
        return TRUE;
 }
 
@@ -143,9 +143,9 @@ void load_unit_settings(entity ent, string unitname, float is_reload)
 
 void turret_projectile_explode()
 {
 
 void turret_projectile_explode()
 {
-    
+
     self.takedamage = DAMAGE_NO;
     self.takedamage = DAMAGE_NO;
-    self.event_damage = func_null;    
+    self.event_damage = func_null;
 #ifdef TURRET_DEBUG
     float d;
     d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, self, self.owner.shot_force, self.totalfrags, world);
 #ifdef TURRET_DEBUG
     float d;
     d = RadiusDamage (self, self.owner, self.owner.shot_dmg, 0, self.owner.shot_radius, self, self.owner.shot_force, self.totalfrags, world);
@@ -183,12 +183,12 @@ entity turret_projectile(string _snd, float _size, float _health, float _death,
     proj.owner           = self;
     proj.realowner       = self;
     proj.bot_dodge       = TRUE;
     proj.owner           = self;
     proj.realowner       = self;
     proj.bot_dodge       = TRUE;
-    proj.bot_dodgerating = self.shot_dmg;    
+    proj.bot_dodgerating = self.shot_dmg;
     proj.think           = turret_projectile_explode;
     proj.touch           = turret_projectile_touch;
     proj.think           = turret_projectile_explode;
     proj.touch           = turret_projectile_touch;
-    proj.nextthink       = time + 9;    
+    proj.nextthink       = time + 9;
     proj.movetype        = MOVETYPE_FLYMISSILE;
     proj.movetype        = MOVETYPE_FLYMISSILE;
-    proj.velocity        = normalize(self.tur_shotdir_updated + randomvec() * self.shot_spread) * self.shot_speed;    
+    proj.velocity        = normalize(self.tur_shotdir_updated + randomvec() * self.shot_spread) * self.shot_speed;
     proj.flags           = FL_PROJECTILE;
     proj.enemy           = self.enemy;
     proj.totalfrags      = _death;
     proj.flags           = FL_PROJECTILE;
     proj.enemy           = self.enemy;
     proj.totalfrags      = _death;
@@ -203,7 +203,7 @@ entity turret_projectile(string _snd, float _size, float _health, float _death,
         proj.flags |= FL_NOTARGET;
 
     CSQCProjectile(proj, _cli_anim, _proj_type, _cull);
         proj.flags |= FL_NOTARGET;
 
     CSQCProjectile(proj, _cli_anim, _proj_type, _cull);
-    
+
     return proj;
 }
 
     return proj;
 }
 
@@ -241,8 +241,8 @@ void turret_do_updates(entity t_turret)
     }
     else*/
         tracebox(self.tur_shotorg, '-1 -1 -1','1 1 1', self.tur_shotorg + (self.tur_shotdir_updated * self.tur_dist_aimpos), MOVE_NORMAL,self);
     }
     else*/
         tracebox(self.tur_shotorg, '-1 -1 -1','1 1 1', self.tur_shotorg + (self.tur_shotdir_updated * self.tur_dist_aimpos), MOVE_NORMAL,self);
-       
-       self.tur_dist_impact_to_aimpos = vlen(trace_endpos - self.tur_aimpos) - (vlen(self.enemy.maxs - self.enemy.mins) * 0.5);                
+
+       self.tur_dist_impact_to_aimpos = vlen(trace_endpos - self.tur_aimpos) - (vlen(self.enemy.maxs - self.enemy.mins) * 0.5);
        self.tur_impactent             = trace_ent;
        self.tur_impacttime            = vlen(self.tur_shotorg - trace_endpos) / self.shot_speed;
 
        self.tur_impactent             = trace_ent;
        self.tur_impacttime            = vlen(self.tur_shotorg - trace_endpos) / self.shot_speed;
 
@@ -328,7 +328,7 @@ void turret_stdproc_track()
     vector v1, v2;
     v1 = self.tur_head.angles;
     v2 = self.tur_head.avelocity;
     vector v1, v2;
     v1 = self.tur_head.angles;
     v2 = self.tur_head.avelocity;
-    
+
     if (self.track_flags == TFL_TRACK_NO)
         return;
 
     if (self.track_flags == TFL_TRACK_NO)
         return;
 
@@ -343,17 +343,17 @@ void turret_stdproc_track()
     }
     else
     {
     }
     else
     {
-        target_angle = vectoangles(normalize(self.tur_aimpos - self.tur_shotorg)); 
+        target_angle = vectoangles(normalize(self.tur_aimpos - self.tur_shotorg));
     }
     }
-    
+
     self.tur_head.angles_x = anglemods(self.tur_head.angles_x);
     self.tur_head.angles_y = anglemods(self.tur_head.angles_y);
 
     // Find the diffrence between where we currently aim and where we want to aim
     //move_angle = target_angle - (self.angles + self.tur_head.angles);
     //move_angle = shortangle_vxy(move_angle,(self.angles + self.tur_head.angles));
     self.tur_head.angles_x = anglemods(self.tur_head.angles_x);
     self.tur_head.angles_y = anglemods(self.tur_head.angles_y);
 
     // Find the diffrence between where we currently aim and where we want to aim
     //move_angle = target_angle - (self.angles + self.tur_head.angles);
     //move_angle = shortangle_vxy(move_angle,(self.angles + self.tur_head.angles));
-    
-    move_angle = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(self.angles), AnglesTransform_FromAngles(target_angle))) - self.tur_head.angles; 
+
+    move_angle = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(self.angles), AnglesTransform_FromAngles(target_angle))) - self.tur_head.angles;
     move_angle = shortangle_vxy(move_angle, self.tur_head.angles);
 
     switch(self.track_type)
     move_angle = shortangle_vxy(move_angle, self.tur_head.angles);
 
     switch(self.track_type)
@@ -379,10 +379,10 @@ void turret_stdproc_track()
                 if(self.tur_head.angles_y  < -self.aim_maxrot)
                     self.tur_head.angles_y = self.aim_maxrot;
             }
                 if(self.tur_head.angles_y  < -self.aim_maxrot)
                     self.tur_head.angles_y = self.aim_maxrot;
             }
-            
+
             // CSQC
             self.SendFlags  |= TNSF_ANG;
             // CSQC
             self.SendFlags  |= TNSF_ANG;
-            
+
             return;
 
         case TFL_TRACKTYPE_FLUIDINERTIA:
             return;
 
         case TFL_TRACKTYPE_FLUIDINERTIA:
@@ -408,15 +408,15 @@ void turret_stdproc_track()
         {
             self.tur_head.avelocity_x = 0;
             self.tur_head.angles_x = self.aim_maxpitch;
         {
             self.tur_head.avelocity_x = 0;
             self.tur_head.angles_x = self.aim_maxpitch;
-            
+
             self.SendFlags  |= TNSF_ANG;
         }
             self.SendFlags  |= TNSF_ANG;
         }
-        
+
         if((self.tur_head.angles_x + self.tur_head.avelocity_x * self.ticrate) < -self.aim_maxpitch)
         {
             self.tur_head.avelocity_x = 0;
             self.tur_head.angles_x = -self.aim_maxpitch;
         if((self.tur_head.angles_x + self.tur_head.avelocity_x * self.ticrate) < -self.aim_maxpitch)
         {
             self.tur_head.avelocity_x = 0;
             self.tur_head.angles_x = -self.aim_maxpitch;
-                        
+
             self.SendFlags  |= TNSF_ANG;
         }
     }
             self.SendFlags  |= TNSF_ANG;
         }
     }
@@ -430,7 +430,7 @@ void turret_stdproc_track()
         {
             self.tur_head.avelocity_y = 0;
             self.tur_head.angles_y = self.aim_maxrot;
         {
             self.tur_head.avelocity_y = 0;
             self.tur_head.angles_y = self.aim_maxrot;
-            
+
             self.SendFlags  |= TNSF_ANG;
         }
 
             self.SendFlags  |= TNSF_ANG;
         }
 
@@ -438,20 +438,20 @@ void turret_stdproc_track()
         {
             self.tur_head.avelocity_y = 0;
             self.tur_head.angles_y = -self.aim_maxrot;
         {
             self.tur_head.avelocity_y = 0;
             self.tur_head.angles_y = -self.aim_maxrot;
-            
+
             self.SendFlags  |= TNSF_ANG;
         }
     }
             self.SendFlags  |= TNSF_ANG;
         }
     }
-        
+
     self.SendFlags  |= TNSF_AVEL;
     self.SendFlags  |= TNSF_AVEL;
-    
+
     // Force a angle update every 10'th frame
     self.turret_framecounter += 1;
     if(self.turret_framecounter >= 10)
     // Force a angle update every 10'th frame
     self.turret_framecounter += 1;
     if(self.turret_framecounter >= 10)
-    {        
+    {
         self.SendFlags |= TNSF_ANG;
         self.turret_framecounter = 0;
         self.SendFlags |= TNSF_ANG;
         self.turret_framecounter = 0;
-    }            
+    }
 }
 
 
 }
 
 
@@ -480,7 +480,7 @@ void turret_stdproc_track()
 float turret_stdproc_firecheck()
 {
     // This one just dont care =)
 float turret_stdproc_firecheck()
 {
     // This one just dont care =)
-    if (self.firecheck_flags & TFL_FIRECHECK_NO) 
+    if (self.firecheck_flags & TFL_FIRECHECK_NO)
         return 1;
 
     if (self.enemy == world)
         return 1;
 
     if (self.enemy == world)
@@ -494,7 +494,7 @@ float turret_stdproc_firecheck()
     if (self.shoot_flags & TFL_SHOOT_VOLLYALWAYS)
         if (self.volly_counter != self.shot_volly)
                        if(self.ammo >= self.shot_dmg)
     if (self.shoot_flags & TFL_SHOOT_VOLLYALWAYS)
         if (self.volly_counter != self.shot_volly)
                        if(self.ammo >= self.shot_dmg)
-                               return 1;               
+                               return 1;
 
     // Lack of zombies makes shooting dead things unnecessary :P
     if (self.firecheck_flags & TFL_FIRECHECK_DEAD)
 
     // Lack of zombies makes shooting dead things unnecessary :P
     if (self.firecheck_flags & TFL_FIRECHECK_DEAD)
@@ -510,22 +510,22 @@ float turret_stdproc_firecheck()
     if (self.firecheck_flags & TFL_FIRECHECK_OTHER_AMMO)
         if (self.enemy.ammo >= self.enemy.ammo_max)
             return 0;
     if (self.firecheck_flags & TFL_FIRECHECK_OTHER_AMMO)
         if (self.enemy.ammo >= self.enemy.ammo_max)
             return 0;
-       
+
        // Target of opertunity?
        if(turret_validate_target(self, self.tur_impactent, self.target_validate_flags) > 0)
        {
                self.enemy = self.tur_impactent;
                return 1;
        // Target of opertunity?
        if(turret_validate_target(self, self.tur_impactent, self.target_validate_flags) > 0)
        {
                self.enemy = self.tur_impactent;
                return 1;
-       }                               
+       }
 
     if (self.firecheck_flags & TFL_FIRECHECK_DISTANCES)
     {
         // To close?
         if (self.tur_dist_aimpos < self.target_range_min)
 
     if (self.firecheck_flags & TFL_FIRECHECK_DISTANCES)
     {
         // To close?
         if (self.tur_dist_aimpos < self.target_range_min)
-                       if(turret_validate_target(self, self.tur_impactent, self.target_validate_flags) > 0)                    
+                       if(turret_validate_target(self, self.tur_impactent, self.target_validate_flags) > 0)
                                return 1; // Target of opertunity?
                                return 1; // Target of opertunity?
-                       else 
-                               return 0;                               
+                       else
+                               return 0;
     }
 
     // Try to avoid FF?
     }
 
     // Try to avoid FF?
@@ -571,7 +571,7 @@ float turret_stdproc_firecheck()
 float turret_validate_target(entity e_turret, entity e_target, float validate_flags)
 {
     vector v_tmp;
 float turret_validate_target(entity e_turret, entity e_target, float validate_flags)
 {
     vector v_tmp;
-        
+
     //if(!validate_flags & TFL_TARGETSELECT_NOBUILTIN)
     //    return -0.5;
 
     //if(!validate_flags & TFL_TARGETSELECT_NOBUILTIN)
     //    return -0.5;
 
@@ -579,7 +579,7 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl
         return -0.5;
 
     if (!checkpvs(e_target.origin, e_turret))
         return -0.5;
 
     if (!checkpvs(e_target.origin, e_turret))
-        return -1;        
+        return -1;
 
     if (!e_target)
         return -2;
 
     if (!e_target)
         return -2;
@@ -596,7 +596,7 @@ float turret_validate_target(entity e_turret, entity e_target, float validate_fl
         return -5;
 
     // Cant touch this
         return -5;
 
     // Cant touch this
-    if(e_target.vehicle_flags & VHF_ISVEHICLE)    
+    if(e_target.vehicle_flags & VHF_ISVEHICLE)
     {
         if (e_target.vehicle_health <= 0)
             return -6;
     {
         if (e_target.vehicle_health <= 0)
             return -6;
@@ -729,7 +729,7 @@ entity turret_select_target()
     e = findradius(self.origin, self.target_range);
 
     // Nothing to aim at?
     e = findradius(self.origin, self.target_range);
 
     // Nothing to aim at?
-    if (!e) 
+    if (!e)
                return world;
 
     while (e)
                return world;
 
     while (e)
@@ -759,7 +759,7 @@ void turret_think()
     entity e;
 
     self.nextthink = time + self.ticrate;
     entity e;
 
     self.nextthink = time + self.ticrate;
-    
+
     // ONS uses somewhat backwards linking.
     if (teamplay)
     {
     // ONS uses somewhat backwards linking.
     if (teamplay)
     {
@@ -788,7 +788,7 @@ void turret_think()
     if (!(self.spawnflags & TSF_NO_AMMO_REGEN))
     if (self.ammo < self.ammo_max)
         self.ammo = min(self.ammo + self.ammo_recharge, self.ammo_max);
     if (!(self.spawnflags & TSF_NO_AMMO_REGEN))
     if (self.ammo < self.ammo_max)
         self.ammo = min(self.ammo + self.ammo_recharge, self.ammo_max);
-                       
+
     // Inactive turrets needs to run the think loop,
     // So they can handle animation and wake up if need be.
     if (!self.active)
     // Inactive turrets needs to run the think loop,
     // So they can handle animation and wake up if need be.
     if (!self.active)
@@ -1021,14 +1021,14 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa
     // Are turrets allowed?
     if (autocvar_g_turrets == 0)
         return 0;
     // Are turrets allowed?
     if (autocvar_g_turrets == 0)
         return 0;
-    
+
     if(_turret_type < 1 || _turret_type > TID_LAST)
     {
         dprint("Invalid / Unkown turret type\"", ftos(_turret_type), "\", aborting!\n");
         return 0;
     if(_turret_type < 1 || _turret_type > TID_LAST)
     {
         dprint("Invalid / Unkown turret type\"", ftos(_turret_type), "\", aborting!\n");
         return 0;
-    }    
+    }
     self.turret_type = _turret_type;
     self.turret_type = _turret_type;
-    
+
     e = find(world, classname, "turret_manager");
     if (!e)
     {
     e = find(world, classname, "turret_manager");
     if (!e)
     {
@@ -1037,7 +1037,7 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa
         e.think = turrets_manager_think;
         e.nextthink = time + 2;
     }
         e.think = turrets_manager_think;
         e.nextthink = time + 2;
     }
-    
+
     if (!(self.spawnflags & TSF_SUSPENDED))
         builtin_droptofloor(); // why can't we use regular droptofloor here?
 
     if (!(self.spawnflags & TSF_SUSPENDED))
         builtin_droptofloor(); // why can't we use regular droptofloor here?
 
@@ -1058,7 +1058,7 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa
     load_unit_settings(self, self.cvar_basename, 0);
 
     self.effects = EF_NODRAW;
     load_unit_settings(self, self.cvar_basename, 0);
 
     self.effects = EF_NODRAW;
-    
+
     // Handle turret teams.
     if (!teamplay)
                self.team = MAX_SHOT_DISTANCE; // Group all turrets into the same team, so they dont kill eachother.
     // Handle turret teams.
     if (!teamplay)
                self.team = MAX_SHOT_DISTANCE; // Group all turrets into the same team, so they dont kill eachother.
@@ -1082,13 +1082,13 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa
     * as possible beforehand.
     */
     if (!self.ticrate)
     * as possible beforehand.
     */
     if (!self.ticrate)
-    {        
+    {
         if (self.turrcaps_flags & TFL_TURRCAPS_SUPPORT)
             self.ticrate = 0.2;     // Support units generaly dont need to have a high speed ai-loop
         else
             self.ticrate = 0.1;     // 10 fps for normal turrets
     }
         if (self.turrcaps_flags & TFL_TURRCAPS_SUPPORT)
             self.ticrate = 0.2;     // Support units generaly dont need to have a high speed ai-loop
         else
             self.ticrate = 0.1;     // 10 fps for normal turrets
     }
-    
+
     self.ticrate = bound(sys_frametime, self.ticrate, 60);  // keep it sane
 
 // General stuff
     self.ticrate = bound(sys_frametime, self.ticrate, 60);  // keep it sane
 
 // General stuff
@@ -1272,7 +1272,7 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa
 
 // Offsets & origins
     if (!self.tur_shotorg)   self.tur_shotorg = '50 0 50';
 
 // Offsets & origins
     if (!self.tur_shotorg)   self.tur_shotorg = '50 0 50';
-    
+
     if (!self.health)
         self.health = 150;
 
     if (!self.health)
         self.health = 150;
 
@@ -1327,7 +1327,7 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa
     self.turret_firecheckfunc   = turret_stdproc_firecheck;
     self.turret_firefunc        = turret_stdproc_fire;
     self.event_damage           = turret_stdproc_damage;
     self.turret_firecheckfunc   = turret_stdproc_firecheck;
     self.turret_firefunc        = turret_stdproc_fire;
     self.event_damage           = turret_stdproc_damage;
-    
+
     if (self.turrcaps_flags & TFL_TURRCAPS_SUPPORT)
         self.turret_score_target    = turret_stdproc_targetscore_support;
     else
     if (self.turrcaps_flags & TFL_TURRCAPS_SUPPORT)
         self.turret_score_target    = turret_stdproc_targetscore_support;
     else
@@ -1366,11 +1366,11 @@ float turret_stdproc_init (string cvar_base_name, string base, string head, floa
         activator = ee;
         self.use();
     }
         activator = ee;
         self.use();
     }
-    
+
        turret_link();
        turret_link();
-       turret_stdproc_respawn();           
+       turret_stdproc_respawn();
     turret_tag_fire_update();
     turret_tag_fire_update();
-    
+
     return 1;
 }
 
     return 1;
 }
 
index 2e3a006881384a955203649f32eebd961d8f3c62..3fdd5eb1eb040e815a8e6edaa216b2b4d70510f3 100644 (file)
@@ -4,12 +4,12 @@
 float anglemods(float v)
 {
        v = v - 360 * floor(v / 360);
 float anglemods(float v)
 {
        v = v - 360 * floor(v / 360);
-       
+
        if(v >= 180)
                return v - 360;
        else if(v <= -180)
                return v + 360;
        if(v >= 180)
                return v - 360;
        else if(v <= -180)
                return v + 360;
-       else            
+       else
                return v;
 }
 
                return v;
 }
 
@@ -78,7 +78,7 @@ vector real_origin(entity ent)
 vector angleofs(entity from, entity to)
 {
     vector v_res;
 vector angleofs(entity from, entity to)
 {
     vector v_res;
-    
+
     v_res = normalize(to.origin - from.origin);
     v_res = vectoangles(v_res);
     v_res = v_res - from.angles;
     v_res = normalize(to.origin - from.origin);
     v_res = vectoangles(v_res);
     v_res = v_res - from.angles;
@@ -95,7 +95,7 @@ vector angleofs(entity from, entity to)
 vector angleofs3(vector from, vector from_a, entity to)
 {
     vector v_res;
 vector angleofs3(vector from, vector from_a, entity to)
 {
     vector v_res;
-    
+
     v_res = normalize(to.origin - from);
     v_res = vectoangles(v_res);
     v_res = v_res - from_a;
     v_res = normalize(to.origin - from);
     v_res = vectoangles(v_res);
     v_res = v_res - from_a;
@@ -130,7 +130,7 @@ float turret_tag_fire_update_s()
 }
 
 /*
 }
 
 /*
-* Railgun-like beam, but has thickness and suppots slowing of target 
+* Railgun-like beam, but has thickness and suppots slowing of target
 */
 void FireImoBeam (vector start, vector end, vector smin, vector smax,
                   float bforce, float f_dmg, float f_velfactor, float deathtype)
 */
 void FireImoBeam (vector start, vector end, vector smin, vector smax,
                   float bforce, float f_dmg, float f_velfactor, float deathtype)
@@ -352,4 +352,4 @@ void paint_target3(vector where, float f_size, vector v_color, float f_time)
     e.colormod = v_color;
     SUB_SetFade(e,time,f_time);
 }
     e.colormod = v_color;
     SUB_SetFade(e,time,f_time);
 }
-#endif 
+#endif
index 481b4a285d4d3f5816ab37d01cd24db31652d364..c919601a3352048cfaf256a6d35eb6486fff0d66 100644 (file)
@@ -38,7 +38,7 @@ void turret_checkpoint_think()
 {
     if(self.enemy)
         te_lightning1(self,self.origin, self.enemy.origin);
 {
     if(self.enemy)
         te_lightning1(self,self.origin, self.enemy.origin);
-    
+
     self.nextthink = time + 0.25;
 }
 #endif
     self.nextthink = time + 0.25;
 }
 #endif
@@ -72,7 +72,7 @@ void spawnfunc_turret_checkpoint()
 {
     setorigin(self,self.origin);
     self.think = turret_checkpoint_init;
 {
     setorigin(self,self.origin);
     self.think = turret_checkpoint_init;
-    self.nextthink = time + 0.2;    
+    self.nextthink = time + 0.2;
 }
 
 // Compat.
 }
 
 // Compat.
index 31b984e391767845be993b5faecb3bc4779f1ae5..b98388984ce16a15e1d245f4c6d8bf84afac2400 100644 (file)
@@ -8,12 +8,12 @@ void ewheel_attack()
 {
     float i;
     entity _mis;
 {
     float i;
     entity _mis;
-    
+
     for (i = 0; i < 1; ++i)
     {
         turret_do_updates(self);
 
     for (i = 0; i < 1; ++i)
     {
         turret_do_updates(self);
 
-        _mis = turret_projectile("weapons/lasergun_fire.wav", 1, 0, DEATH_TURRET_EWHEEL, PROJECTILE_LASER, TRUE, TRUE); 
+        _mis = turret_projectile("weapons/lasergun_fire.wav", 1, 0, DEATH_TURRET_EWHEEL, PROJECTILE_LASER, TRUE, TRUE);
         _mis.missile_flags = MIF_SPLASH;
 
         pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
         _mis.missile_flags = MIF_SPLASH;
 
         pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
@@ -55,7 +55,7 @@ void ewheel_move_path()
             self.pathcurrent = self.pathcurrent.path_next;
 
 #else
             self.pathcurrent = self.pathcurrent.path_next;
 
 #else
-    if (vlen(self.origin - self.pathcurrent.origin) < 64)    
+    if (vlen(self.origin - self.pathcurrent.origin) < 64)
         self.pathcurrent = self.pathcurrent.enemy;
 #endif
 
         self.pathcurrent = self.pathcurrent.enemy;
 #endif
 
@@ -73,7 +73,7 @@ void  ewheel_move_enemy()
 {
 
     float newframe;
 {
 
     float newframe;
-    
+
     self.steerto = steerlib_arrive(self.enemy.origin,self.target_range_optimal);
 
     //self.steerto = steerlib_standoff(self.enemy.origin,self.target_range_optimal);
     self.steerto = steerlib_arrive(self.enemy.origin,self.target_range_optimal);
 
     //self.steerto = steerlib_standoff(self.enemy.origin,self.target_range_optimal);
@@ -109,9 +109,9 @@ void  ewheel_move_enemy()
         newframe = ewheel_amin_stop;
         movelib_beak_simple(autocvar_g_turrets_unit_ewheel_speed_stop);
     }
         newframe = ewheel_amin_stop;
         movelib_beak_simple(autocvar_g_turrets_unit_ewheel_speed_stop);
     }
-    
+
     turrets_setframe(newframe , FALSE);
     turrets_setframe(newframe , FALSE);
-    
+
     /*if(self.frame != newframe)
     {
         self.frame = newframe;
     /*if(self.frame != newframe)
     {
         self.frame = newframe;
@@ -164,7 +164,7 @@ void ewheel_postthink()
 
 
     self.velocity_z = vz;
 
 
     self.velocity_z = vz;
-    
+
     if(vlen(self.velocity))
         self.SendFlags |= TNSF_MOVE;
 }
     if(vlen(self.velocity))
         self.SendFlags |= TNSF_MOVE;
 }
@@ -176,7 +176,7 @@ void ewheel_respawnhook()
     // Respawn is called & first spawn to, to set team. need to make sure we do not move the initial spawn.
     if(self.movetype != MOVETYPE_WALK)
                return;
     // Respawn is called & first spawn to, to set team. need to make sure we do not move the initial spawn.
     if(self.movetype != MOVETYPE_WALK)
                return;
-               
+
     self.velocity = '0 0 0';
     self.enemy = world;
 
     self.velocity = '0 0 0';
     self.enemy = world;
 
@@ -221,7 +221,7 @@ void turret_ewheel_dinit()
 {
     entity e;
 
 {
     entity e;
 
-    if (self.netname == "")      
+    if (self.netname == "")
         self.netname     = "eWheel Turret";
 
     if (self.target != "")
         self.netname     = "eWheel Turret";
 
     if (self.target != "")
@@ -250,7 +250,7 @@ void turret_ewheel_dinit()
         remove(self);
         return;
     }
         remove(self);
         return;
     }
-    
+
     self.frame = 1;
     self.target_select_flags   = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_LOS;
     self.target_validate_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_LOS;
     self.frame = 1;
     self.target_select_flags   = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_LOS;
     self.target_validate_flags = TFL_TARGETSELECT_PLAYERS | TFL_TARGETSELECT_RANGELIMTS | TFL_TARGETSELECT_TEAMCHECK | TFL_TARGETSELECT_LOS;
index 7c21ba7abef9e0bdea8535d6b805167fc3f50953..8a01a9752a9f8f4b0cc1d1aad6d7c33a4a29986f 100644 (file)
@@ -7,7 +7,7 @@ void turret_flac_projectile_think_explode()
     if(self.enemy != world)
     if(vlen(self.origin - self.enemy.origin) < self.owner.shot_radius * 3)
         setorigin(self,self.enemy.origin + randomvec() * self.owner.shot_radius);
     if(self.enemy != world)
     if(vlen(self.origin - self.enemy.origin) < self.owner.shot_radius * 3)
         setorigin(self,self.enemy.origin + randomvec() * self.owner.shot_radius);
-            
+
 #ifdef TURRET_DEBUG
     float d;
     d = RadiusDamage (self, self.owner, self.owner.shot_dmg, self.owner.shot_dmg, self.owner.shot_radius, self, self.owner.shot_force, self.totalfrags, world);
 #ifdef TURRET_DEBUG
     float d;
     d = RadiusDamage (self, self.owner, self.owner.shot_dmg, self.owner.shot_dmg, self.owner.shot_radius, self, self.owner.shot_force, self.totalfrags, world);
@@ -24,28 +24,28 @@ void turret_flac_attack()
     entity proj;
 
     turret_tag_fire_update();
     entity proj;
 
     turret_tag_fire_update();
-    
-    proj = turret_projectile("weapons/hagar_fire.wav", 5, 0, DEATH_TURRET_FLAC, PROJECTILE_HAGAR, TRUE, TRUE);    
+
+    proj = turret_projectile("weapons/hagar_fire.wav", 5, 0, DEATH_TURRET_FLAC, PROJECTILE_HAGAR, TRUE, TRUE);
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
     proj.think      = turret_flac_projectile_think_explode;
     proj.nextthink  = time + self.tur_impacttime + (random() * 0.01 - random() * 0.01);
     proj.missile_flags = MIF_SPLASH | MIF_PROXY;
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
     proj.think      = turret_flac_projectile_think_explode;
     proj.nextthink  = time + self.tur_impacttime + (random() * 0.01 - random() * 0.01);
     proj.missile_flags = MIF_SPLASH | MIF_PROXY;
-    
+
     self.tur_head.frame = self.tur_head.frame + 1;
     self.tur_head.frame = self.tur_head.frame + 1;
-    if (self.tur_head.frame >= 4) 
+    if (self.tur_head.frame >= 4)
         self.tur_head.frame = 0;
 
 }
 
 void turret_flac_dinit()
 {
         self.tur_head.frame = 0;
 
 }
 
 void turret_flac_dinit()
 {
-    if (self.netname == "")      
+    if (self.netname == "")
         self.netname  = "FLAC Cannon";
 
     self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_FASTPROJ | TFL_TURRCAPS_MISSILEKILL;
     self.ammo_flags     = TFL_AMMO_ROCKETS | TFL_AMMO_RECHARGE;
     self.aim_flags      = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
         self.netname  = "FLAC Cannon";
 
     self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_FASTPROJ | TFL_TURRCAPS_MISSILEKILL;
     self.ammo_flags     = TFL_AMMO_ROCKETS | TFL_AMMO_RECHARGE;
     self.aim_flags      = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
-    
+
     if (turret_stdproc_init("flac_std", "models/turrets/base.md3", "models/turrets/flac.md3", TID_FLAC) == 0)
     {
         remove(self);
     if (turret_stdproc_init("flac_std", "models/turrets/base.md3", "models/turrets/flac.md3", TID_FLAC) == 0)
     {
         remove(self);
@@ -55,7 +55,7 @@ void turret_flac_dinit()
 
     self.damage_flags |= TFL_DMG_HEADSHAKE;
     self.target_select_flags |= TFL_TARGETSELECT_NOTURRETS | TFL_TARGETSELECT_MISSILESONLY;
 
     self.damage_flags |= TFL_DMG_HEADSHAKE;
     self.target_select_flags |= TFL_TARGETSELECT_NOTURRETS | TFL_TARGETSELECT_MISSILESONLY;
-    
+
     // Our fire routine
     self.turret_firefunc  = turret_flac_attack;
 
     // Our fire routine
     self.turret_firefunc  = turret_flac_attack;
 
index 2833ab3f0f4104d7c7b6a2d07cd2723925c0783d..014fa25f6966bae796c697977686ae898f927aff 100644 (file)
@@ -28,7 +28,7 @@ void turret_fusionreactor_respawnhook()
 **/
 float turret_fusionreactor_firecheck()
 {
 **/
 float turret_fusionreactor_firecheck()
 {
-       if (self.attack_finished_single > time) 
+       if (self.attack_finished_single > time)
                return 0;
 
        if (self.enemy.deadflag != DEAD_NO)
                return 0;
 
        if (self.enemy.deadflag != DEAD_NO)
@@ -42,16 +42,16 @@ float turret_fusionreactor_firecheck()
 
        if (self.enemy.ammo >= self.enemy.ammo_max)
                return 0;
 
        if (self.enemy.ammo >= self.enemy.ammo_max)
                return 0;
-       
+
        if (vlen(self.enemy.origin - self.origin) > self.target_range)
        if (vlen(self.enemy.origin - self.origin) > self.target_range)
-               return 0;                               
-       
+               return 0;
+
        if(self.team != self.enemy.team)
                return 0;
        if(self.team != self.enemy.team)
                return 0;
-       
+
        if (!(self.enemy.ammo_flags & TFL_AMMO_ENERGY))
        if (!(self.enemy.ammo_flags & TFL_AMMO_ENERGY))
-               return 0;    
-       
+               return 0;
+
        return 1;
 }
 
        return 1;
 }
 
index 75360bcd7142bf7af73518c7226f42ba217bb375..e1b88b06a80af43c0e5aed8364c50cfba10b97a9 100644 (file)
@@ -66,12 +66,12 @@ void turret_hellion_missile_think()
 void turret_hellion_attack()
 {
     entity missile;
 void turret_hellion_attack()
 {
     entity missile;
-               
+
        if(self.tur_head.frame != 0)
                self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire"));
        else
                self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire2"));
        if(self.tur_head.frame != 0)
                self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire"));
        else
                self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire2"));
-    
+
     missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_HELLION, PROJECTILE_ROCKET, FALSE, FALSE);
     te_explosion (missile.origin);
     missile.think        = turret_hellion_missile_think;
     missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_HELLION, PROJECTILE_ROCKET, FALSE, FALSE);
     te_explosion (missile.origin);
     missile.think        = turret_hellion_missile_think;
index c7d7396e8f7ce2d7641d8308baa9c7f914458716..6ce6c72e23c2a3d4ed435c36d37a4d4ccfb53d49 100644 (file)
@@ -258,7 +258,7 @@ void turret_hk_attack()
     missile.cnt              = time + 30;
     missile.ticrate          = max(autocvar_sys_ticrate, 0.05);
     missile.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_GUIDED_AI;
     missile.cnt              = time + 30;
     missile.ticrate          = max(autocvar_sys_ticrate, 0.05);
     missile.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_GUIDED_AI;
-    
+
     if (self.tur_head.frame == 0)
         self.tur_head.frame = self.tur_head.frame + 1;
 
     if (self.tur_head.frame == 0)
         self.tur_head.frame = self.tur_head.frame + 1;
 
@@ -289,7 +289,7 @@ float turret_hk_addtarget(entity e_target,entity e_sender)
 
 void turret_hk_dinit()
 {
 
 void turret_hk_dinit()
 {
-    if (self.netname == "")      
+    if (self.netname == "")
         self.netname  = "Hunter-killer turret";
 
     self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_MEDPROJ | TFL_TURRCAPS_PLAYERKILL | TFL_TURRCAPS_RECIVETARGETS;
         self.netname  = "Hunter-killer turret";
 
     self.turrcaps_flags = TFL_TURRCAPS_RADIUSDMG | TFL_TURRCAPS_MEDPROJ | TFL_TURRCAPS_PLAYERKILL | TFL_TURRCAPS_RECIVETARGETS;
index 62abe38aa5816f8251135182ed1c123528174f0a..10d186193840ee6ba54f28eb090950eabf4fabca 100644 (file)
@@ -20,7 +20,7 @@ void turret_machinegun_std_init()
     self.ammo_flags = TFL_AMMO_BULLETS | TFL_AMMO_RECHARGE | TFL_AMMO_RECIVE;
     self.turrcaps_flags = TFL_TURRCAPS_PLAYERKILL;
     self.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
     self.ammo_flags = TFL_AMMO_BULLETS | TFL_AMMO_RECHARGE | TFL_AMMO_RECIVE;
     self.turrcaps_flags = TFL_TURRCAPS_PLAYERKILL;
     self.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE;
-    
+
        if (!autocvar_g_antilag_bullets)
                self.turrcaps_flags |= TFL_TURRCAPS_HITSCAN;
 
        if (!autocvar_g_antilag_bullets)
                self.turrcaps_flags |= TFL_TURRCAPS_HITSCAN;
 
index a12d9d7259f6b8c1cc5a3aa610768d4d7b499173..783966032f3a8a368a67f16fa533f52a2d956616 100644 (file)
@@ -16,12 +16,12 @@ void turret_mlrs_postthink()
 void turret_mlrs_attack()
 {
     entity missile;
 void turret_mlrs_attack()
 {
     entity missile;
-    
-    turret_tag_fire_update();    
+
+    turret_tag_fire_update();
     missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_MLRS, PROJECTILE_ROCKET, TRUE, TRUE);
     missile.nextthink = time + max(self.tur_impacttime,(self.shot_radius * 2) / self.shot_speed);
     missile.missile_flags = MIF_SPLASH;
     missile = turret_projectile("weapons/rocket_fire.wav", 6, 10, DEATH_TURRET_MLRS, PROJECTILE_ROCKET, TRUE, TRUE);
     missile.nextthink = time + max(self.tur_impacttime,(self.shot_radius * 2) / self.shot_speed);
     missile.missile_flags = MIF_SPLASH;
-    te_explosion (missile.origin);    
+    te_explosion (missile.origin);
 }
 
 void turret_mlrs_dinit()
 }
 
 void turret_mlrs_dinit()
index f4a60e545a12163a9d14b894d8804106a5f63ead..9fce826a2df307d0c74c4658d4d745908182abc9 100644 (file)
@@ -29,7 +29,7 @@ void turret_plasma_minsta_attack (void)
 {
        float flying;
        flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
 {
        float flying;
        flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
-        
+
        FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
                                           800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
 
        FireRailgunBullet (self.tur_shotorg, self.tur_shotorg + self.tur_shotdir_updated * MAX_SHOT_DISTANCE, 10000000000,
                                           800, 0, 0, 0, 0, DEATH_TURRET_PLASMA);
 
@@ -64,10 +64,10 @@ void turret_plasma_minsta_attack (void)
 }
 
 void turret_plasma_attack()
 }
 
 void turret_plasma_attack()
-{ 
-    entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);    
+{
+    entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);
     missile.missile_flags = MIF_SPLASH;
     missile.missile_flags = MIF_SPLASH;
-    
+
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
     if (self.tur_head.frame == 0)
         self.tur_head.frame = 1;
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
     if (self.tur_head.frame == 0)
         self.tur_head.frame = 1;
@@ -75,8 +75,8 @@ void turret_plasma_attack()
 
 void turret_plasma_dual_attack()
 {
 
 void turret_plasma_dual_attack()
 {
-    entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE); 
-    missile.missile_flags = MIF_SPLASH;   
+    entity missile = turret_projectile("weapons/hagar_fire.wav", 1, 0, DEATH_TURRET_PLASMA, PROJECTILE_ELECTRO_BEAM, TRUE, TRUE);
+    missile.missile_flags = MIF_SPLASH;
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
     self.tur_head.frame += 1;
 }
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
     self.tur_head.frame += 1;
 }
index b4c220851a6a82aa96f357cd7c1d1110e565b26b..4989b2445efc99808dab32b75b29935cdd46e95a 100644 (file)
@@ -35,7 +35,7 @@ entity toast(entity from, float range, float damage)
     }
 
     if (etarget)
     }
 
     if (etarget)
-    {        
+    {
         te_csqc_lightningarc(from.origin,etarget.origin);
         Damage(etarget, self, self, damage, DEATH_TURRET_TESLA, etarget.origin, '0 0 0');
         etarget.railgunhit = 1;
         te_csqc_lightningarc(from.origin,etarget.origin);
         Damage(etarget, self, self, damage, DEATH_TURRET_TESLA, etarget.origin, '0 0 0');
         etarget.railgunhit = 1;
@@ -48,7 +48,7 @@ float turret_tesla_firecheck()
 {
     // g_turrets_targetscan_maxdelay forces a target re-scan at least this often
     float do_target_scan = 0;
 {
     // g_turrets_targetscan_maxdelay forces a target re-scan at least this often
     float do_target_scan = 0;
-    
+
     if((self.target_select_time + autocvar_g_turrets_targetscan_maxdelay) < time)
         do_target_scan = 1;
 
     if((self.target_select_time + autocvar_g_turrets_targetscan_maxdelay) < time)
         do_target_scan = 1;
 
index 5e0feea35bd77edd8d98186a7f2c4e31e4495ae1..615622e3bbc139d5b47139d9bff00ab03e83c757 100644 (file)
@@ -29,12 +29,12 @@ void walker_meele_do_dmg()
 {
     vector where;
     entity e;
 {
     vector where;
     entity e;
-    
+
     makevectors(self.angles);
     where = self.origin + v_forward * 128;
 
     e = findradius(where,32);
     makevectors(self.angles);
     where = self.origin + v_forward * 128;
 
     e = findradius(where,32);
-    while (e) 
+    while (e)
     {
         if (turret_validate_target(self, e, self.target_validate_flags))
             if (e != self && e.owner != self)
     {
         if (turret_validate_target(self, e, self.target_validate_flags))
             if (e != self && e.owner != self)
@@ -59,7 +59,7 @@ void walker_rocket_damage (entity inflictor, entity attacker, float damage, floa
 {
     self.health = self.health - damage;
     self.velocity = self.velocity + vforce;
 {
     self.health = self.health - damage;
     self.velocity = self.velocity + vforce;
-    
+
     if (self.health <= 0)
         W_PrepareExplosionByDamage(self.owner, walker_rocket_explode);
 }
     if (self.health <= 0)
         W_PrepareExplosionByDamage(self.owner, walker_rocket_explode);
 }
@@ -178,7 +178,7 @@ void walker_rocket_loop()
 void walker_fire_rocket(vector org)
 {
     entity rocket;
 void walker_fire_rocket(vector org)
 {
     entity rocket;
+
     fixedmakevectors(self.angles);
 
     te_explosion (org);
     fixedmakevectors(self.angles);
 
     te_explosion (org);
@@ -199,7 +199,7 @@ void walker_fire_rocket(vector org)
     rocket.tur_shotorg        = randomvec() * 512;
     rocket.cnt                = time + 1;
     rocket.enemy              = self.enemy;
     rocket.tur_shotorg        = randomvec() * 512;
     rocket.cnt                = time + 1;
     rocket.enemy              = self.enemy;
-    
+
     if (random() < 0.01)
         rocket.think          = walker_rocket_loop;
     else
     if (random() < 0.01)
         rocket.think          = walker_rocket_loop;
     else
@@ -216,7 +216,7 @@ void walker_fire_rocket(vector org)
     rocket.solid              = SOLID_BBOX;
     rocket.tur_health         = time + 9;
     rocket.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_GUIDED_HEAT;
     rocket.solid              = SOLID_BBOX;
     rocket.tur_health         = time + 9;
     rocket.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_GUIDED_HEAT;
-    
+
     CSQCProjectile(rocket, FALSE, PROJECTILE_ROCKET, FALSE); // no culling, has fly sound
 }
 
     CSQCProjectile(rocket, FALSE, PROJECTILE_ROCKET, FALSE); // no culling, has fly sound
 }
 
@@ -248,7 +248,7 @@ void walker_move_to(vector _target, float _dist)
     if(self.enemy)
     {
         self.enemy_last_loc = _target;
     if(self.enemy)
     {
         self.enemy_last_loc = _target;
-        self.enemy_last_time = time;        
+        self.enemy_last_time = time;
     }
 }
 
     }
 }
 
@@ -287,12 +287,12 @@ void walker_move_path()
     walker_move_to(self.moveto, 0);
 
 #else
     walker_move_to(self.moveto, 0);
 
 #else
-    if (vlen(self.origin - self.pathcurrent.origin) < 64)    
+    if (vlen(self.origin - self.pathcurrent.origin) < 64)
         self.pathcurrent = self.pathcurrent.enemy;
         self.pathcurrent = self.pathcurrent.enemy;
-    
+
     if(!self.pathcurrent)
         return;
     if(!self.pathcurrent)
         return;
-    
+
     self.moveto = self.pathcurrent.origin;
     self.steerto = steerlib_attract2(self.moveto, 0.5, 500, 0.95);
     walker_move_to(self.moveto, 0);
     self.moveto = self.pathcurrent.origin;
     self.steerto = steerlib_attract2(self.moveto, 0.5, 500, 0.95);
     walker_move_to(self.moveto, 0);
@@ -316,35 +316,35 @@ void walker_postthink()
             {
                 if(vlen(self.origin - self.enemy_last_loc) < 128 || time - self.enemy_last_time > 10)
                     self.enemy_last_time = 0;
             {
                 if(vlen(self.origin - self.enemy_last_loc) < 128 || time - self.enemy_last_time > 10)
                     self.enemy_last_time = 0;
-                else                
+                else
                     walker_move_to(self.enemy_last_loc, 0);
             }
             else
                     walker_move_to(self.enemy_last_loc, 0);
             }
             else
-            {        
+            {
                 if(self.animflag != ANIM_NO)
                 if(self.animflag != ANIM_NO)
-                {                    
+                {
                     traceline(self.origin + '0 0 64', self.origin + '0 0 64' + v_forward * 128, MOVE_NORMAL, self);
                     traceline(self.origin + '0 0 64', self.origin + '0 0 64' + v_forward * 128, MOVE_NORMAL, self);
-                    
+
                     if(trace_fraction != 1.0)
                         self.tur_head.idletime = -1337;
                     else
                     {
                     if(trace_fraction != 1.0)
                         self.tur_head.idletime = -1337;
                     else
                     {
-                        traceline(trace_endpos, trace_endpos - '0 0 256', MOVE_NORMAL, self);            
+                        traceline(trace_endpos, trace_endpos - '0 0 256', MOVE_NORMAL, self);
                         if(trace_fraction == 1.0)
                             self.tur_head.idletime = -1337;
                     }
                         if(trace_fraction == 1.0)
                             self.tur_head.idletime = -1337;
                     }
-                    
+
                     if(self.tur_head.idletime == -1337)
                     {
                     if(self.tur_head.idletime == -1337)
                     {
-                        self.moveto = self.origin + randomvec() * 256;        
+                        self.moveto = self.origin + randomvec() * 256;
                         self.tur_head.idletime = 0;
                     }
 
                     self.moveto = self.moveto * 0.9 + ((self.origin + v_forward * 500) + randomvec() * 400) * 0.1;
                         self.tur_head.idletime = 0;
                     }
 
                     self.moveto = self.moveto * 0.9 + ((self.origin + v_forward * 500) + randomvec() * 400) * 0.1;
-                    self.moveto_z = self.origin_z + 64;            
+                    self.moveto_z = self.origin_z + 64;
                     walker_move_to(self.moveto, 0);
                     walker_move_to(self.moveto, 0);
-                }         
-                
+                }
+
                 if(self.idletime < time)
                 {
                     if(random() < 0.5 || !(self.spawnflags & TSL_ROAM))
                 if(self.idletime < time)
                 {
                     if(random() < 0.5 || !(self.spawnflags & TSL_ROAM))
@@ -357,12 +357,12 @@ void walker_postthink()
                     {
                         self.animflag = ANIM_WALK;
                         self.idletime = time + 4 + random() * 2;
                     {
                         self.animflag = ANIM_WALK;
                         self.idletime = time + 4 + random() * 2;
-                        self.moveto = self.origin + randomvec() * 256;        
+                        self.moveto = self.origin + randomvec() * 256;
                         self.tur_head.moveto = self.moveto;
                         self.tur_head.idletime = 0;
                     }
                 }
                         self.tur_head.moveto = self.moveto;
                         self.tur_head.idletime = 0;
                     }
                 }
-            }            
+            }
         }
     }
     else
         }
     }
     else
@@ -370,8 +370,8 @@ void walker_postthink()
         if (self.tur_dist_enemy < autocvar_g_turrets_unit_walker_std_meele_range && self.animflag != ANIM_MEELE)
         {
             vector wish_angle;
         if (self.tur_dist_enemy < autocvar_g_turrets_unit_walker_std_meele_range && self.animflag != ANIM_MEELE)
         {
             vector wish_angle;
-            
-            wish_angle = angleofs(self, self.enemy);    
+
+            wish_angle = angleofs(self, self.enemy);
             if (self.animflag != ANIM_SWIM)
             if (fabs(wish_angle_y) < 15)
             {
             if (self.animflag != ANIM_SWIM)
             if (fabs(wish_angle_y) < 15)
             {
@@ -381,17 +381,17 @@ void walker_postthink()
             }
         }
         else if (self.tur_head.attack_finished_single < time)
             }
         }
         else if (self.tur_head.attack_finished_single < time)
-        {            
+        {
             if(self.tur_head.shot_volly)
             {
                 self.animflag = ANIM_NO;
             if(self.tur_head.shot_volly)
             {
                 self.animflag = ANIM_NO;
-                
+
                 self.tur_head.shot_volly = self.tur_head.shot_volly -1;
                 if(self.tur_head.shot_volly == 0)
                     self.tur_head.attack_finished_single = time + autocvar_g_turrets_unit_walker_std_rocket_refire;
                 else
                     self.tur_head.attack_finished_single = time + 0.2;
                 self.tur_head.shot_volly = self.tur_head.shot_volly -1;
                 if(self.tur_head.shot_volly == 0)
                     self.tur_head.attack_finished_single = time + autocvar_g_turrets_unit_walker_std_rocket_refire;
                 else
                     self.tur_head.attack_finished_single = time + 0.2;
-                
+
                 if(self.tur_head.shot_volly > 1)
                     walker_fire_rocket(gettaginfo(self, gettagindex(self, "tag_rocket01")));
                 else
                 if(self.tur_head.shot_volly > 1)
                     walker_fire_rocket(gettaginfo(self, gettagindex(self, "tag_rocket01")));
                 else
@@ -399,13 +399,13 @@ void walker_postthink()
             }
             else
             {
             }
             else
             {
-                if (self.tur_dist_enemy > autocvar_g_turrets_unit_walker_std_rockets_range_min)        
+                if (self.tur_dist_enemy > autocvar_g_turrets_unit_walker_std_rockets_range_min)
                 if (self.tur_dist_enemy < autocvar_g_turrets_unit_walker_std_rockets_range)
                     self.tur_head.shot_volly = 4;
             }
         }
         else
                 if (self.tur_dist_enemy < autocvar_g_turrets_unit_walker_std_rockets_range)
                     self.tur_head.shot_volly = 4;
             }
         }
         else
-        {            
+        {
             if (self.animflag != ANIM_MEELE)
                 walker_move_to(self.enemy.origin, self.tur_dist_enemy);
         }
             if (self.animflag != ANIM_MEELE)
                 walker_move_to(self.enemy.origin, self.tur_dist_enemy);
         }
@@ -419,7 +419,7 @@ void walker_postthink()
 
         real_angle = vectoangles(self.steerto) - self.angles;
         vz         = self.velocity_z;
 
         real_angle = vectoangles(self.steerto) - self.angles;
         vz         = self.velocity_z;
-            
+
         switch (self.animflag)
         {
             case ANIM_NO:
         switch (self.animflag)
         {
             case ANIM_NO:
@@ -461,7 +461,7 @@ void walker_postthink()
             case ANIM_PAIN:
                 if(self.frame != ANIM_PAIN)
                     defer(0.25, walker_setnoanim);
             case ANIM_PAIN:
                 if(self.frame != ANIM_PAIN)
                     defer(0.25, walker_setnoanim);
-                
+
                 break;
 
             case ANIM_MEELE:
                 break;
 
             case ANIM_MEELE:
@@ -477,7 +477,7 @@ void walker_postthink()
             case ANIM_SWIM:
                 turny = autocvar_g_turrets_unit_walker_turn_swim;
                 turnx = autocvar_g_turrets_unit_walker_turn_swim;
             case ANIM_SWIM:
                 turny = autocvar_g_turrets_unit_walker_turn_swim;
                 turnx = autocvar_g_turrets_unit_walker_turn_swim;
-                
+
                 self.angles_x += bound(-10, shortangle_f(real_angle_x, self.angles_x), 10);
                 movelib_move_simple(v_forward, autocvar_g_turrets_unit_walker_speed_swim, 0.3);
                 vz = self.velocity_z + sin(time * 4) * 8;
                 self.angles_x += bound(-10, shortangle_f(real_angle_x, self.angles_x), 10);
                 movelib_move_simple(v_forward, autocvar_g_turrets_unit_walker_speed_swim, 0.3);
                 vz = self.velocity_z + sin(time * 4) * 8;
@@ -488,26 +488,26 @@ void walker_postthink()
                 movelib_move_simple(v_forward ,autocvar_g_turrets_unit_walker_speed_roam, 0.5);
                 break;
         }
                 movelib_move_simple(v_forward ,autocvar_g_turrets_unit_walker_speed_roam, 0.5);
                 break;
         }
-            
+
         if(turny)
         if(turny)
-        {        
+        {
             turny = bound( turny * -1, shortangle_f(real_angle_y, self.angles_y), turny );
             self.angles_y += turny;
         }
 
         if(turnx)
             turny = bound( turny * -1, shortangle_f(real_angle_y, self.angles_y), turny );
             self.angles_y += turny;
         }
 
         if(turnx)
-        {        
+        {
             turnx = bound( turnx * -1, shortangle_f(real_angle_x, self.angles_x), turnx );
             self.angles_x += turnx;
         }
 
             turnx = bound( turnx * -1, shortangle_f(real_angle_x, self.angles_x), turnx );
             self.angles_x += turnx;
         }
 
-        self.velocity_z = vz;        
+        self.velocity_z = vz;
     }
 
     }
 
-    
+
     if(self.origin != self.oldorigin)
         self.SendFlags |= TNSF_MOVE;
     if(self.origin != self.oldorigin)
         self.SendFlags |= TNSF_MOVE;
-    
+
     self.oldorigin = self.origin;
     turrets_setframe(self.animflag, FALSE);
 }
     self.oldorigin = self.origin;
     turrets_setframe(self.animflag, FALSE);
 }
@@ -528,10 +528,10 @@ void walker_respawnhook()
     // Respawn is called & first spawn to, to set team. need to make sure we do not move the initial spawn.
     if(self.movetype != MOVETYPE_WALK)
                return;
     // Respawn is called & first spawn to, to set team. need to make sure we do not move the initial spawn.
     if(self.movetype != MOVETYPE_WALK)
                return;
-               
+
     setorigin(self, self.pos1);
     self.angles = self.pos2;
     setorigin(self, self.pos1);
     self.angles = self.pos2;
-    
+
     if (self.target != "")
     {
         e = find(world, targetname, self.target);
     if (self.target != "")
     {
         e = find(world, targetname, self.target);
@@ -597,7 +597,7 @@ void turret_walker_dinit()
     self.damagedbycontents = TRUE;
     self.movetype   = MOVETYPE_WALK;
     self.solid      = SOLID_SLIDEBOX;
     self.damagedbycontents = TRUE;
     self.movetype   = MOVETYPE_WALK;
     self.solid      = SOLID_SLIDEBOX;
-    self.takedamage = DAMAGE_AIM;    
+    self.takedamage = DAMAGE_AIM;
     setorigin(self, self.origin);
     tracebox(self.origin + '0 0 128', self.mins, self.maxs, self.origin - '0 0 10000', MOVE_NORMAL, self);
     setorigin(self, trace_endpos + '0 0 4');
     setorigin(self, self.origin);
     tracebox(self.origin + '0 0 128', self.mins, self.maxs, self.origin - '0 0 10000', MOVE_NORMAL, self);
     setorigin(self, trace_endpos + '0 0 4');
index a0a7e5ffc6d8a9f6561d1664e3f41e1652808717..bc5f03d8ae52f53d01bcdf33f51f6243974b98bd 100644 (file)
@@ -97,12 +97,12 @@ float bumb_gunner_frame()
        self = vehic;
 
 
        self = vehic;
 
 
-       
-       
+
+
        vehic.solid = SOLID_NOT;
        //setorigin(gunner, vehic.origin);
        gunner.velocity = vehic.velocity;
        vehic.solid = SOLID_NOT;
        //setorigin(gunner, vehic.origin);
        gunner.velocity = vehic.velocity;
-       
+
        float _in, _out;
        vehic.angles_x *= -1;
        makevectors(vehic.angles);
        float _in, _out;
        vehic.angles_x *= -1;
        makevectors(vehic.angles);
@@ -117,9 +117,9 @@ float bumb_gunner_frame()
        {
                _in = autocvar_g_vehicle_bumblebee_cannon_turnlimit_out;
                _out = autocvar_g_vehicle_bumblebee_cannon_turnlimit_in;
        {
                _in = autocvar_g_vehicle_bumblebee_cannon_turnlimit_out;
                _out = autocvar_g_vehicle_bumblebee_cannon_turnlimit_in;
-               setorigin(gunner, vehic.origin + v_up * -16 + v_forward * -16 + v_right * -128);                
+               setorigin(gunner, vehic.origin + v_up * -16 + v_forward * -16 + v_right * -128);
        }
        }
-       
+
        crosshair_trace(gunner);
        vector _ct = trace_endpos;
        vector ad;
        crosshair_trace(gunner);
        vector _ct = trace_endpos;
        vector ad;
@@ -225,7 +225,7 @@ void bumb_gunner_exit(float _exitflag)
                WriteAngle(MSG_ONE, self.vehicle.angles_y);
                WriteAngle(MSG_ONE, 0);
        }
                WriteAngle(MSG_ONE, self.vehicle.angles_y);
                WriteAngle(MSG_ONE, 0);
        }
-       
+
        CSQCVehicleSetup(self, HUD_NORMAL);
        setsize(self, PL_MIN, PL_MAX);
 
        CSQCVehicleSetup(self, HUD_NORMAL);
        setsize(self, PL_MIN, PL_MAX);
 
@@ -252,16 +252,16 @@ void bumb_gunner_exit(float _exitflag)
 
        if(self == self.vehicle.owner.gunner1)
        {
 
        if(self == self.vehicle.owner.gunner1)
        {
-               self.vehicle.owner.gunner1 = world;             
+               self.vehicle.owner.gunner1 = world;
        }
        else if(self == self.vehicle.owner.gunner2)
        {
        }
        else if(self == self.vehicle.owner.gunner2)
        {
-               self.vehicle.owner.gunner2 = world;     
+               self.vehicle.owner.gunner2 = world;
                v_right *= -1;
                v_right *= -1;
-       }       
+       }
        else
                dprint("^1self != gunner1 or gunner2, this is a BIG PROBLEM, tell tZork this happend.\n");
        else
                dprint("^1self != gunner1 or gunner2, this is a BIG PROBLEM, tell tZork this happend.\n");
-               
+
        vector spot = self.vehicle.owner.origin + + v_up * 128 + v_right * 300;
        spot = vehicles_findgoodexit(spot);
        //setorigin(self , spot);
        vector spot = self.vehicle.owner.origin + + v_up * 128 + v_right * 300;
        spot = vehicles_findgoodexit(spot);
        //setorigin(self , spot);
@@ -327,7 +327,7 @@ float bumb_gunner_enter()
        _gun.vehicle_hudmodel.viewmodelforclient = other;
 
        CSQCVehicleSetup(other, other.hud);
        _gun.vehicle_hudmodel.viewmodelforclient = other;
 
        CSQCVehicleSetup(other, other.hud);
-       
+
     vh_player = other;
     vh_vehicle = _gun;
     MUTATOR_CALLHOOK(VehicleEnter);
     vh_player = other;
     vh_vehicle = _gun;
     MUTATOR_CALLHOOK(VehicleEnter);
@@ -442,9 +442,9 @@ float bumb_pilot_frame()
 
        // Pitch
        ftmp = 0;
 
        // Pitch
        ftmp = 0;
-       if(pilot.movement_x > 0 && vang_x < autocvar_g_vehicle_bumblebee_pitchlimit) 
+       if(pilot.movement_x > 0 && vang_x < autocvar_g_vehicle_bumblebee_pitchlimit)
                ftmp = 4;
                ftmp = 4;
-       else if(pilot.movement_x < 0 && vang_x > -autocvar_g_vehicle_bumblebee_pitchlimit) 
+       else if(pilot.movement_x < 0 && vang_x > -autocvar_g_vehicle_bumblebee_pitchlimit)
                ftmp = -8;
 
        newvel_x = bound(-autocvar_g_vehicle_bumblebee_pitchlimit, newvel_x , autocvar_g_vehicle_bumblebee_pitchlimit);
                ftmp = -8;
 
        newvel_x = bound(-autocvar_g_vehicle_bumblebee_pitchlimit, newvel_x , autocvar_g_vehicle_bumblebee_pitchlimit);
@@ -490,10 +490,10 @@ float bumb_pilot_frame()
 
        vehic.velocity  += newvel * frametime;
        pilot.velocity = pilot.movement  = vehic.velocity;
 
        vehic.velocity  += newvel * frametime;
        pilot.velocity = pilot.movement  = vehic.velocity;
-       
+
 
        if(autocvar_g_vehicle_bumblebee_healgun_locktime)
 
        if(autocvar_g_vehicle_bumblebee_healgun_locktime)
-       {               
+       {
                if(vehic.tur_head.lock_time < time || vehic.tur_head.enemy.deadflag)
                        vehic.tur_head.enemy = world;
 
                if(vehic.tur_head.lock_time < time || vehic.tur_head.enemy.deadflag)
                        vehic.tur_head.enemy = world;
 
@@ -511,19 +511,19 @@ float bumb_pilot_frame()
                                }
                        }
                        else
                                }
                        }
                        else
-                       {            
+                       {
                                vehic.tur_head.enemy = trace_ent;
                                vehic.tur_head.lock_time = time + autocvar_g_vehicle_bumblebee_healgun_locktime;
                        }
                }
                                vehic.tur_head.enemy = trace_ent;
                                vehic.tur_head.lock_time = time + autocvar_g_vehicle_bumblebee_healgun_locktime;
                        }
                }
-                       
+
                if(vehic.tur_head.enemy)
                {
                if(vehic.tur_head.enemy)
                {
-                       trace_endpos = real_origin(vehic.tur_head.enemy);                       
-                       UpdateAuxiliaryXhair(pilot, trace_endpos, '0 0.75 0', 0);               
+                       trace_endpos = real_origin(vehic.tur_head.enemy);
+                       UpdateAuxiliaryXhair(pilot, trace_endpos, '0 0.75 0', 0);
                }
        }
                }
        }
-       
+
        vang = vehicle_aimturret(vehic, trace_endpos, self.gun3, "fire",
                                          autocvar_g_vehicle_bumblebee_raygun_pitchlimit_down * -1,  autocvar_g_vehicle_bumblebee_raygun_pitchlimit_up,
                                          autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides * -1,  autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides,  autocvar_g_vehicle_bumblebee_raygun_turnspeed);
        vang = vehicle_aimturret(vehic, trace_endpos, self.gun3, "fire",
                                          autocvar_g_vehicle_bumblebee_raygun_pitchlimit_down * -1,  autocvar_g_vehicle_bumblebee_raygun_pitchlimit_up,
                                          autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides * -1,  autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides,  autocvar_g_vehicle_bumblebee_raygun_turnspeed);
@@ -532,12 +532,12 @@ float bumb_pilot_frame()
        {
                vehic.gun3.enemy.realowner = pilot;
                vehic.gun3.enemy.effects &= ~EF_NODRAW;
        {
                vehic.gun3.enemy.realowner = pilot;
                vehic.gun3.enemy.effects &= ~EF_NODRAW;
-               
+
                vehic.gun3.enemy.hook_start = gettaginfo(vehic.gun3, gettagindex(vehic.gun3, "fire"));
                vehic.gun3.enemy.SendFlags |= BRG_START;
                vehic.gun3.enemy.hook_start = gettaginfo(vehic.gun3, gettagindex(vehic.gun3, "fire"));
                vehic.gun3.enemy.SendFlags |= BRG_START;
-               
+
                traceline(vehic.gun3.enemy.hook_start, vehic.gun3.enemy.hook_start + v_forward * autocvar_g_vehicle_bumblebee_raygun_range, MOVE_NORMAL, vehic);
                traceline(vehic.gun3.enemy.hook_start, vehic.gun3.enemy.hook_start + v_forward * autocvar_g_vehicle_bumblebee_raygun_range, MOVE_NORMAL, vehic);
-               
+
                if(trace_ent)
                {
                        if(autocvar_g_vehicle_bumblebee_raygun)
                if(trace_ent)
                {
                        if(autocvar_g_vehicle_bumblebee_raygun)
@@ -580,11 +580,11 @@ float bumb_pilot_frame()
                                        }
                        }
                }
                                        }
                        }
                }
-               
+
                vehic.gun3.enemy.hook_end = trace_endpos;
                setorigin(vehic.gun3.enemy, trace_endpos);
                vehic.gun3.enemy.SendFlags |= BRG_END;
                vehic.gun3.enemy.hook_end = trace_endpos;
                setorigin(vehic.gun3.enemy, trace_endpos);
                vehic.gun3.enemy.SendFlags |= BRG_END;
-               
+
                vehic.wait = time + 1;
        }
        else
                vehic.wait = time + 1;
        }
        else
@@ -596,7 +596,7 @@ float bumb_pilot_frame()
                vehic.gun3.enemy = world;
        }
        */
                vehic.gun3.enemy = world;
        }
        */
-       
+
        VEHICLE_UPDATE_PLAYER(pilot, health, bumblebee);
        VEHICLE_UPDATE_PLAYER(pilot, energy, bumblebee);
 
        VEHICLE_UPDATE_PLAYER(pilot, health, bumblebee);
        VEHICLE_UPDATE_PLAYER(pilot, energy, bumblebee);
 
@@ -605,7 +605,7 @@ float bumb_pilot_frame()
 
        if(vehic.vehicle_flags & VHF_HASSHIELD)
                VEHICLE_UPDATE_PLAYER(pilot, shield, bumblebee);
 
        if(vehic.vehicle_flags & VHF_HASSHIELD)
                VEHICLE_UPDATE_PLAYER(pilot, shield, bumblebee);
-               
+
        vehic.angles_x *= -1;
        makevectors(vehic.angles);
        vehic.angles_x *= -1;
        vehic.angles_x *= -1;
        makevectors(vehic.angles);
        vehic.angles_x *= -1;
@@ -620,16 +620,16 @@ float bumb_pilot_frame()
 void bumb_think()
 {
        self.movetype = MOVETYPE_TOSS;
 void bumb_think()
 {
        self.movetype = MOVETYPE_TOSS;
-               
+
                //self.velocity = self.velocity * 0.5;
        self.angles_z *= 0.8;
        self.angles_x *= 0.8;
                //self.velocity = self.velocity * 0.5;
        self.angles_z *= 0.8;
        self.angles_x *= 0.8;
-       
+
        self.nextthink = time + 0.05;
        self.nextthink = time + 0.05;
-       
+
        if(!self.owner)
        {
        if(!self.owner)
        {
-               entity oldself = self;          
+               entity oldself = self;
                if(self.gunner1)
                {
                        self = self.gunner1;
                if(self.gunner1)
                {
                        self = self.gunner1;
@@ -642,7 +642,7 @@ void bumb_think()
                        other = oldother;
                        return;
                }
                        other = oldother;
                        return;
                }
-               
+
                if(self.gunner2)
                {
                        self = self.gunner2;
                if(self.gunner2)
                {
                        self = self.gunner2;
@@ -654,9 +654,9 @@ void bumb_think()
                        self.touch();
                        other = oldother;
                        return;
                        self.touch();
                        other = oldother;
                        return;
-               }               
+               }
        }
        }
-       
+
 }
 
 void bumb_enter()
 }
 
 void bumb_enter()
@@ -672,19 +672,19 @@ void bumb_exit(float eject)
        self.touch = vehicles_touch;
        self.think = bumb_think;
        self.nextthink = time;
        self.touch = vehicles_touch;
        self.think = bumb_think;
        self.nextthink = time;
-       
+
        if(!self.owner)
                return;
        if(!self.owner)
                return;
-       
+
        fixedmakevectors(self.angles);
        vector spot;
        fixedmakevectors(self.angles);
        vector spot;
-       if(vlen(self.velocity) > autocvar_g_vehicle_bumblebee_speed_forward * 0.5)              
+       if(vlen(self.velocity) > autocvar_g_vehicle_bumblebee_speed_forward * 0.5)
                spot = self.origin + v_up * 128 + v_forward * 200;
        else
                spot = self.origin + v_up * 128 - v_forward * 200;
                spot = self.origin + v_up * 128 + v_forward * 200;
        else
                spot = self.origin + v_up * 128 - v_forward * 200;
-       
+
        spot = vehicles_findgoodexit(spot);
        spot = vehicles_findgoodexit(spot);
-       
+
        // Hide beam
        if(self.gun3.enemy || !wasfreed(self.gun3.enemy)) {
                self.gun3.enemy.effects |= EF_NODRAW;
        // Hide beam
        if(self.gun3.enemy || !wasfreed(self.gun3.enemy)) {
                self.gun3.enemy.effects |= EF_NODRAW;
@@ -693,7 +693,7 @@ void bumb_exit(float eject)
        self.owner.velocity = 0.75 * self.vehicle.velocity + normalize(spot - self.vehicle.origin) * 200;
        self.owner.velocity_z += 10;
        setorigin(self.owner, spot);
        self.owner.velocity = 0.75 * self.vehicle.velocity + normalize(spot - self.vehicle.origin) * 200;
        self.owner.velocity_z += 10;
        setorigin(self.owner, spot);
-       
+
        antilag_clear(self.owner);
     self.owner = world;
 }
        antilag_clear(self.owner);
     self.owner = world;
 }
@@ -708,10 +708,10 @@ void bumb_blowup()
 
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
        pointparticles(particleeffectnum("explosion_large"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
 
        sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
        pointparticles(particleeffectnum("explosion_large"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
-       
+
        if(self.owner.deadflag == DEAD_DYING)
                self.owner.deadflag = DEAD_DEAD;
        if(self.owner.deadflag == DEAD_DYING)
                self.owner.deadflag = DEAD_DEAD;
-       
+
        remove(self);
 }
 
        remove(self);
 }
 
@@ -732,11 +732,11 @@ void bumb_diethink()
 void bumb_die()
 {
        entity oldself = self;
 void bumb_die()
 {
        entity oldself = self;
-       
+
        // Hide beam
        if(self.gun3.enemy || !wasfreed(self.gun3.enemy))
                self.gun3.enemy.effects |= EF_NODRAW;
        // Hide beam
        if(self.gun3.enemy || !wasfreed(self.gun3.enemy))
                self.gun3.enemy.effects |= EF_NODRAW;
-       
+
        if(self.gunner1)
        {
                self = self.gunner1;
        if(self.gunner1)
        {
                self = self.gunner1;
@@ -764,15 +764,15 @@ void bumb_die()
                _body.touch = bumb_blowup;
        else
                _body.touch = func_null;
                _body.touch = bumb_blowup;
        else
                _body.touch = func_null;
-               
+
        _body.think = bumb_diethink;
        _body.nextthink = time;
        _body.wait = time + 2 + (random() * 8);
        _body.owner = self;
        _body.enemy = self.enemy;
        _body.think = bumb_diethink;
        _body.nextthink = time;
        _body.wait = time + 2 + (random() * 8);
        _body.owner = self;
        _body.enemy = self.enemy;
-       
+
        pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1);
        pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1);
-       
+
        self.health                     = 0;
        self.event_damage       = func_null;
        self.solid                      = SOLID_CORPSE;
        self.health                     = 0;
        self.event_damage       = func_null;
        self.solid                      = SOLID_CORPSE;
@@ -793,8 +793,8 @@ void bumb_die()
 void bumb_impact()
 {
     if(autocvar_g_vehicle_bumblebee_bouncepain_x)
 void bumb_impact()
 {
     if(autocvar_g_vehicle_bumblebee_bouncepain_x)
-        vehilces_impact(autocvar_g_vehicle_bumblebee_bouncepain_x, 
-                                               autocvar_g_vehicle_bumblebee_bouncepain_y, 
+        vehilces_impact(autocvar_g_vehicle_bumblebee_bouncepain_x,
+                                               autocvar_g_vehicle_bumblebee_bouncepain_y,
                                                autocvar_g_vehicle_bumblebee_bouncepain_z);
 }
 
                                                autocvar_g_vehicle_bumblebee_bouncepain_z);
 }
 
@@ -861,14 +861,14 @@ void bumb_spawn(float _f)
                setorigin(self.gun2.vehicle_viewport, '-85 0 50');
 
                self.scale = 1.5;
                setorigin(self.gun2.vehicle_viewport, '-85 0 50');
 
                self.scale = 1.5;
-               
+
                // Raygun beam
                if(self.gun3.enemy == world)
                // Raygun beam
                if(self.gun3.enemy == world)
-               {                       
+               {
                        self.gun3.enemy = spawn();
                        Net_LinkEntity(self.gun3.enemy, TRUE, 0, bumble_raygun_send);
                        self.gun3.enemy = spawn();
                        Net_LinkEntity(self.gun3.enemy, TRUE, 0, bumble_raygun_send);
-                       self.gun3.enemy.SendFlags = BRG_SETUP;                  
-                       self.gun3.enemy.cnt = autocvar_g_vehicle_bumblebee_raygun;                      
+                       self.gun3.enemy.SendFlags = BRG_SETUP;
+                       self.gun3.enemy.cnt = autocvar_g_vehicle_bumblebee_raygun;
                        self.gun3.enemy.effects = EF_NODRAW | EF_LOWPRECISION;
                }
        }
                        self.gun3.enemy.effects = EF_NODRAW | EF_LOWPRECISION;
                }
        }
@@ -880,7 +880,7 @@ void bumb_spawn(float _f)
        self.movetype           = MOVETYPE_TOSS;
        self.vehicle_impact = bumb_impact;
        self.damageforcescale = 0.025;
        self.movetype           = MOVETYPE_TOSS;
        self.vehicle_impact = bumb_impact;
        self.damageforcescale = 0.025;
-       
+
        setorigin(self, self.origin + '0 0 25');
 }
 
        setorigin(self, self.origin + '0 0 25');
 }
 
@@ -971,7 +971,7 @@ void bumble_raygun_draw()
 
        _len = vlen(self.origin - self.move_origin);
        _dir = normalize(self.move_origin - self.origin);
 
        _len = vlen(self.origin - self.move_origin);
        _dir = normalize(self.move_origin - self.origin);
-       
+
        if(self.total_damages < time)
        {
                boxparticles(self.traileffect, self, self.origin, self.origin + _dir * -64, _dir * -_len , _dir * -_len, 1, PARTICLES_USEALPHA);
        if(self.total_damages < time)
        {
                boxparticles(self.traileffect, self, self.origin, self.origin + _dir * -64, _dir * -_len , _dir * -_len, 1, PARTICLES_USEALPHA);
@@ -1010,19 +1010,19 @@ void bumble_raygun_read(float bIsNew)
                self.cnt  = ReadByte();
                self.team = ReadByte();
                self.cnt  = ReadByte();
                self.cnt  = ReadByte();
                self.team = ReadByte();
                self.cnt  = ReadByte();
-               
+
                if(self.cnt)
                        self.colormod = '1 0 0';
                else
                        self.colormod = '0 1 0';
 
                self.traileffect = particleeffectnum("healray_muzzleflash");
                if(self.cnt)
                        self.colormod = '1 0 0';
                else
                        self.colormod = '0 1 0';
 
                self.traileffect = particleeffectnum("healray_muzzleflash");
-               self.lip = particleeffectnum("healray_impact");         
+               self.lip = particleeffectnum("healray_impact");
 
                self.draw = bumble_raygun_draw;
        }
 
                self.draw = bumble_raygun_draw;
        }
-       
-       
+
+
        if(sf & BRG_START)
        {
                self.origin_x = ReadCoord();
        if(sf & BRG_START)
        {
                self.origin_x = ReadCoord();
index c4f7b436c81c9d2f756f325ed6133211739eb0a4..ff54539027eaa8cebb27d1f45caa6101a11e6046 100644 (file)
@@ -637,8 +637,8 @@ void spawnfunc_vehicle_racer()
     {
         remove(self);
         return;
     {
         remove(self);
         return;
-    }        
-    
+    }
+
     self.vehicle_flags |= VHF_DMGSHAKE;
     self.vehicle_flags |= VHF_DMGROLL;
 
     self.vehicle_flags |= VHF_DMGSHAKE;
     self.vehicle_flags |= VHF_DMGROLL;
 
@@ -679,7 +679,7 @@ void spawnfunc_vehicle_racer()
              racer_frame,
              racer_enter, racer_exit,
              racer_die,   racer_think,
              racer_frame,
              racer_enter, racer_exit,
              racer_die,   racer_think,
-             TRUE, 
+             TRUE,
              autocvar_g_vehicle_racer_health,
              autocvar_g_vehicle_racer_shield))
     {
              autocvar_g_vehicle_racer_health,
              autocvar_g_vehicle_racer_shield))
     {
index 229bbfedac6a03b5b5aaa8be152fe1aeb81bae91..58a640e9cf8672afe3d0861b7c572f4ad4617bd9 100644 (file)
@@ -208,15 +208,15 @@ void raptor_enter()
 
     if(self.owner.flagcarried)
        setorigin(self.owner.flagcarried, '-20 0 96');
 
     if(self.owner.flagcarried)
        setorigin(self.owner.flagcarried, '-20 0 96');
-    
+
     CSQCVehicleSetup(self.owner, 0);
 }
 
 void raptor_land()
     CSQCVehicleSetup(self.owner, 0);
 }
 
 void raptor_land()
-{    
+{
     float hgt;
     float hgt;
-        
-    hgt = raptor_altitude(512);    
+
+    hgt = raptor_altitude(512);
     self.velocity = (self.velocity * 0.9) + ('0 0 -1800' * (hgt / 256) * sys_frametime);
     self.angles_x *= 0.95;
     self.angles_z *= 0.95;
     self.velocity = (self.velocity * 0.9) + ('0 0 -1800' * (hgt / 256) * sys_frametime);
     self.angles_x *= 0.95;
     self.angles_z *= 0.95;
@@ -251,7 +251,7 @@ void raptor_exit(float eject)
 
     if (!self.owner)
         return;
 
     if (!self.owner)
         return;
-       
+
        makevectors(self.angles);
        if(eject)
        {
        makevectors(self.angles);
        if(eject)
        {
@@ -280,23 +280,23 @@ void raptor_exit(float eject)
            self.owner.oldvelocity = self.owner.velocity;
            setorigin(self.owner , spot);
        }
            self.owner.oldvelocity = self.owner.velocity;
            setorigin(self.owner , spot);
        }
-       
-       antilag_clear(self.owner);      
+
+       antilag_clear(self.owner);
     self.owner = world;
 }
 
 float raptor_takeoff()
 {
     entity player, raptor;
     self.owner = world;
 }
 
 float raptor_takeoff()
 {
     entity player, raptor;
-    
+
     player = self;
     raptor = self.vehicle;
     self   = raptor;
     if(self.sound_nexttime < time)
     player = self;
     raptor = self.vehicle;
     self   = raptor;
     if(self.sound_nexttime < time)
-    {        
+    {
         self.sound_nexttime = time + 7.955812; //soundlength("vehicles/raptor_fly.wav");
         sound (self, CH_TRIGGER_SINGLE, "vehicles/raptor_speed.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
         self.sound_nexttime = time + 7.955812; //soundlength("vehicles/raptor_fly.wav");
         sound (self, CH_TRIGGER_SINGLE, "vehicles/raptor_speed.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
-    }   
+    }
 
     // Takeoff sequense
     if(raptor.frame < 25)
 
     // Takeoff sequense
     if(raptor.frame < 25)
@@ -359,7 +359,7 @@ void raptor_flare_think()
             _missile.enemy = self;
         _missile = _missile.chain;
     }
             _missile.enemy = self;
         _missile = _missile.chain;
     }
-    
+
     if(self.tur_impacttime < time)
         remove(self);
 }
     if(self.tur_impacttime < time)
         remove(self);
 }
@@ -369,7 +369,7 @@ float raptor_frame()
     entity player, raptor;
     float ftmp = 0;
     vector df;
     entity player, raptor;
     float ftmp = 0;
     vector df;
-    
+
        if(intermission_running)
                return 1;
 
        if(intermission_running)
                return 1;
 
@@ -379,28 +379,28 @@ float raptor_frame()
     vehicles_painframe();
     /*
     ftmp = vlen(self.velocity);
     vehicles_painframe();
     /*
     ftmp = vlen(self.velocity);
-    if(ftmp > autocvar_g_vehicle_raptor_speed_forward) 
+    if(ftmp > autocvar_g_vehicle_raptor_speed_forward)
         ftmp = 1;
         ftmp = 1;
-    else  
+    else
         ftmp = ftmp / autocvar_g_vehicle_raptor_speed_forward;
     */
         ftmp = ftmp / autocvar_g_vehicle_raptor_speed_forward;
     */
-        
+
     if(self.sound_nexttime < time)
     if(self.sound_nexttime < time)
-    {        
-        self.sound_nexttime = time + 7.955812; 
+    {
+        self.sound_nexttime = time + 7.955812;
         //sound (self.tur_head, CH_TRIGGER_SINGLE, "vehicles/raptor_fly.wav", 1 - ftmp,   ATTEN_NORM );
         //sound (self.tur_head, CH_TRIGGER_SINGLE, "vehicles/raptor_fly.wav", 1 - ftmp,   ATTEN_NORM );
-        sound (self, CH_TRIGGER_SINGLE, "vehicles/raptor_speed.wav", 1, ATTEN_NORM);        
+        sound (self, CH_TRIGGER_SINGLE, "vehicles/raptor_speed.wav", 1, ATTEN_NORM);
         self.wait = ftmp;
         self.wait = ftmp;
-    }        
+    }
     /*
     else if(fabs(ftmp - self.wait) > 0.2)
     {
         sound (self.tur_head, CH_TRIGGER_SINGLE, "", 1 - ftmp,   ATTEN_NORM );
     /*
     else if(fabs(ftmp - self.wait) > 0.2)
     {
         sound (self.tur_head, CH_TRIGGER_SINGLE, "", 1 - ftmp,   ATTEN_NORM );
-        sound (self, CH_TRIGGER_SINGLE, "", ftmp, ATTEN_NORM);        
+        sound (self, CH_TRIGGER_SINGLE, "", ftmp, ATTEN_NORM);
         self.wait = ftmp;
     }
     */
         self.wait = ftmp;
     }
     */
-    
+
     if(raptor.deadflag != DEAD_NO)
     {
         self = player;
     if(raptor.deadflag != DEAD_NO)
     {
         self = player;
@@ -482,7 +482,7 @@ float raptor_frame()
     {
         if(raptor.gun1.lock_time < time || raptor.gun1.enemy.deadflag)
             raptor.gun1.enemy = world;
     {
         if(raptor.gun1.lock_time < time || raptor.gun1.enemy.deadflag)
             raptor.gun1.enemy = world;
-    
+
         if(trace_ent)
         if(trace_ent.movetype)
         if(trace_ent.takedamage)
         if(trace_ent)
         if(trace_ent.movetype)
         if(trace_ent.takedamage)
@@ -497,12 +497,12 @@ float raptor_frame()
                 }
             }
             else
                 }
             }
             else
-            {            
+            {
                 raptor.gun1.enemy = trace_ent;
                 raptor.gun1.lock_time = time + 0.5;
             }
         }
                 raptor.gun1.enemy = trace_ent;
                 raptor.gun1.lock_time = time + 0.5;
             }
         }
-            
+
         if(raptor.gun1.enemy)
         {
             float i, distance, impact_time;
         if(raptor.gun1.enemy)
         {
             float i, distance, impact_time;
@@ -512,7 +512,7 @@ float raptor_frame()
             vector _vel = raptor.gun1.enemy.velocity;
             if(raptor.gun1.enemy.movetype == MOVETYPE_WALK)
                 _vel_z *= 0.1;
             vector _vel = raptor.gun1.enemy.velocity;
             if(raptor.gun1.enemy.movetype == MOVETYPE_WALK)
                 _vel_z *= 0.1;
-            
+
             if(autocvar_g_vehicle_raptor_cannon_predicttarget)
             {
                 ad = vf;
             if(autocvar_g_vehicle_raptor_cannon_predicttarget)
             {
                 ad = vf;
@@ -522,10 +522,10 @@ float raptor_frame()
                     impact_time = distance / autocvar_g_vehicle_raptor_cannon_speed;
                     ad = vf + _vel * impact_time;
                 }
                     impact_time = distance / autocvar_g_vehicle_raptor_cannon_speed;
                     ad = vf + _vel * impact_time;
                 }
-                trace_endpos = ad;                        
+                trace_endpos = ad;
             }
             else
             }
             else
-                trace_endpos = vf;                        
+                trace_endpos = vf;
         }
     }
     else if(autocvar_g_vehicle_raptor_cannon_locktarget == 1)
         }
     }
     else if(autocvar_g_vehicle_raptor_cannon_locktarget == 1)
@@ -564,12 +564,12 @@ float raptor_frame()
     }
 
 
     }
 
 
-    vehicle_aimturret(raptor, trace_endpos, raptor.gun1, "fire1", 
-                          autocvar_g_vehicle_raptor_cannon_pitchlimit_down * -1,  autocvar_g_vehicle_raptor_cannon_pitchlimit_up, 
+    vehicle_aimturret(raptor, trace_endpos, raptor.gun1, "fire1",
+                          autocvar_g_vehicle_raptor_cannon_pitchlimit_down * -1,  autocvar_g_vehicle_raptor_cannon_pitchlimit_up,
                           autocvar_g_vehicle_raptor_cannon_turnlimit * -1,  autocvar_g_vehicle_raptor_cannon_turnlimit,  autocvar_g_vehicle_raptor_cannon_turnspeed);
 
                           autocvar_g_vehicle_raptor_cannon_turnlimit * -1,  autocvar_g_vehicle_raptor_cannon_turnlimit,  autocvar_g_vehicle_raptor_cannon_turnspeed);
 
-    vehicle_aimturret(raptor, trace_endpos, raptor.gun2, "fire1", 
-                          autocvar_g_vehicle_raptor_cannon_pitchlimit_down * -1,  autocvar_g_vehicle_raptor_cannon_pitchlimit_up, 
+    vehicle_aimturret(raptor, trace_endpos, raptor.gun2, "fire1",
+                          autocvar_g_vehicle_raptor_cannon_pitchlimit_down * -1,  autocvar_g_vehicle_raptor_cannon_pitchlimit_up,
                           autocvar_g_vehicle_raptor_cannon_turnlimit * -1,  autocvar_g_vehicle_raptor_cannon_turnlimit,  autocvar_g_vehicle_raptor_cannon_turnspeed);
 
     /*
                           autocvar_g_vehicle_raptor_cannon_turnlimit * -1,  autocvar_g_vehicle_raptor_cannon_turnlimit,  autocvar_g_vehicle_raptor_cannon_turnspeed);
 
     /*
@@ -578,7 +578,7 @@ float raptor_frame()
     traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, raptor);
     UpdateAuxiliaryXhair(player, trace_endpos, '0 1 0', 0);
     */
     traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, raptor);
     UpdateAuxiliaryXhair(player, trace_endpos, '0 1 0', 0);
     */
-    
+
     if(player.BUTTON_ATCK)
     if(raptor.attack_finished_single <= time)
     if(raptor.vehicle_energy > autocvar_g_vehicle_raptor_cannon_cost)
     if(player.BUTTON_ATCK)
     if(raptor.attack_finished_single <= time)
     if(raptor.vehicle_energy > autocvar_g_vehicle_raptor_cannon_cost)
@@ -616,7 +616,7 @@ float raptor_frame()
             raptor_bombdrop();
             raptor.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
             raptor.lip   = time;
             raptor_bombdrop();
             raptor.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
             raptor.lip   = time;
-        }        
+        }
     }
     else
     {
     }
     else
     {
@@ -625,11 +625,11 @@ float raptor_frame()
         {
             float i;
             entity _flare;
         {
             float i;
             entity _flare;
-            
+
             for(i = 0; i < 3; ++i)
             {
             _flare = spawn();
             for(i = 0; i < 3; ++i)
             {
             _flare = spawn();
-            setmodel(_flare, "models/runematch/rune.mdl"); 
+            setmodel(_flare, "models/runematch/rune.mdl");
             _flare.effects = EF_LOWPRECISION | EF_FLAME;
             _flare.scale = 0.5;
             setorigin(_flare, self.origin - '0 0 16');
             _flare.effects = EF_LOWPRECISION | EF_FLAME;
             _flare.scale = 0.5;
             setorigin(_flare, self.origin - '0 0 16');
@@ -650,7 +650,7 @@ float raptor_frame()
             raptor.lip   = time;
         }
     }
             raptor.lip   = time;
         }
     }
-    
+
     raptor.bomb1.alpha = raptor.bomb2.alpha = (time - raptor.lip) / (raptor.delay - raptor.lip);
     player.vehicle_reload2 = bound(0, raptor.bomb1.alpha * 100, 100);
 
     raptor.bomb1.alpha = raptor.bomb2.alpha = (time - raptor.lip) / (raptor.delay - raptor.lip);
     player.vehicle_reload2 = bound(0, raptor.bomb1.alpha * 100, 100);
 
@@ -667,13 +667,13 @@ float raptor_frame()
 
             _missile = _missile.chain;
         }
 
             _missile = _missile.chain;
         }
-        
+
         if(_incomming)
             sound(self, CH_PAIN_SINGLE, "vehicles/missile_alarm.wav", VOL_BASE, ATTEN_NONE);
         if(_incomming)
             sound(self, CH_PAIN_SINGLE, "vehicles/missile_alarm.wav", VOL_BASE, ATTEN_NONE);
-        
+
         self.bomb1.cnt = time + 1;
     }
         self.bomb1.cnt = time + 1;
     }
-    
+
 
     VEHICLE_UPDATE_PLAYER(player, health, raptor);
     VEHICLE_UPDATE_PLAYER(player, energy, raptor);
 
     VEHICLE_UPDATE_PLAYER(player, health, raptor);
     VEHICLE_UPDATE_PLAYER(player, energy, raptor);
@@ -681,7 +681,7 @@ float raptor_frame()
         VEHICLE_UPDATE_PLAYER(player, shield, raptor);
 
     player.BUTTON_ATCK = player.BUTTON_ATCK2 = player.BUTTON_CROUCH = 0;
         VEHICLE_UPDATE_PLAYER(player, shield, raptor);
 
     player.BUTTON_ATCK = player.BUTTON_ATCK2 = player.BUTTON_CROUCH = 0;
-    
+
     self = player;
     return 1;
 }
     self = player;
     return 1;
 }
@@ -708,7 +708,7 @@ void raptor_diethink()
 {
        if(time >= self.wait)
                self.think = raptor_blowup;
 {
        if(time >= self.wait)
                self.think = raptor_blowup;
-    
+
     if(random() < 0.1)
     {
         sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
     if(random() < 0.1)
     {
         sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
@@ -728,7 +728,7 @@ void raptor_die()
     self.think        = raptor_diethink;
     self.nextthink    = time;
     self.wait            = time + 5 + (random() * 5);
     self.think        = raptor_diethink;
     self.nextthink    = time;
     self.wait            = time + 5 + (random() * 5);
-    
+
     pointparticles(particleeffectnum("explosion_medium"), findbetterlocation (self.origin, 16), '0 0 0', 1);
 
     self.velocity_z += 600;
     pointparticles(particleeffectnum("explosion_medium"), findbetterlocation (self.origin, 16), '0 0 0', 1);
 
     self.velocity_z += 600;
@@ -760,12 +760,12 @@ float raptor_impulse(float _imp)
     switch(_imp)
     {
         case 10:
     switch(_imp)
     {
         case 10:
-        case 15:        
+        case 15:
         case 18:
             self.vehicle.vehicle_weapon2mode += 1;
             if(self.vehicle.vehicle_weapon2mode > RSM_LAST)
                 self.vehicle.vehicle_weapon2mode = RSM_FIRST;
         case 18:
             self.vehicle.vehicle_weapon2mode += 1;
             if(self.vehicle.vehicle_weapon2mode > RSM_LAST)
                 self.vehicle.vehicle_weapon2mode = RSM_FIRST;
-            
+
             CSQCVehicleSetup(self, 0);
             return TRUE;
         case 12:
             CSQCVehicleSetup(self, 0);
             return TRUE;
         case 12:
@@ -774,17 +774,17 @@ float raptor_impulse(float _imp)
             self.vehicle.vehicle_weapon2mode -= 1;
             if(self.vehicle.vehicle_weapon2mode < RSM_FIRST)
                 self.vehicle.vehicle_weapon2mode = RSM_LAST;
             self.vehicle.vehicle_weapon2mode -= 1;
             if(self.vehicle.vehicle_weapon2mode < RSM_FIRST)
                 self.vehicle.vehicle_weapon2mode = RSM_LAST;
-            
+
             CSQCVehicleSetup(self, 0);
             return TRUE;
 
             CSQCVehicleSetup(self, 0);
             return TRUE;
 
-        /*                     
+        /*
         case 17: // toss gun, could be used to exit?
             break;
         case 20: // Manual minigun reload?
             break;
         */
         case 17: // toss gun, could be used to exit?
             break;
         case 20: // Manual minigun reload?
             break;
         */
-    }    
+    }
     return FALSE;
 }
 
     return FALSE;
 }
 
@@ -797,9 +797,9 @@ void raptor_spawn(float _f)
 
         //FIXME: Camera is in a bad place in HUD model.
         //setorigin(self.vehicle_viewport, '25 0 5');
 
         //FIXME: Camera is in a bad place in HUD model.
         //setorigin(self.vehicle_viewport, '25 0 5');
-        
+
         self.vehicles_impusle   = raptor_impulse;
         self.vehicles_impusle   = raptor_impulse;
-        
+
         self.frame = 0;
 
         self.bomb1 = spawn();
         self.frame = 0;
 
         self.bomb1 = spawn();
@@ -872,10 +872,10 @@ void raptor_spawn(float _f)
 
     setsize(self, RAPTOR_MIN, RAPTOR_MAX );
     self.delay = time;
 
     setsize(self, RAPTOR_MIN, RAPTOR_MAX );
     self.delay = time;
-        
+
     self.bouncefactor = autocvar_g_vehicle_raptor_bouncefactor;
     self.bouncefactor = autocvar_g_vehicle_raptor_bouncefactor;
-    self.bouncestop = autocvar_g_vehicle_raptor_bouncestop;    
-    self.vehicle_impact = raptor_impact;    
+    self.bouncestop = autocvar_g_vehicle_raptor_bouncestop;
+    self.vehicle_impact = raptor_impact;
     self.damageforcescale = 0.25;
 }
 
     self.damageforcescale = 0.25;
 }
 
@@ -885,11 +885,11 @@ void spawnfunc_vehicle_raptor()
     {
         remove(self);
         return;
     {
         remove(self);
         return;
-    }        
-    
+    }
+
     self.vehicle_flags |= VHF_DMGSHAKE;
     self.vehicle_flags |= VHF_DMGROLL;
     self.vehicle_flags |= VHF_DMGSHAKE;
     self.vehicle_flags |= VHF_DMGROLL;
-   
+
     if(autocvar_g_vehicle_raptor_shield)
         self.vehicle_flags |= VHF_HASSHIELD;
 
     if(autocvar_g_vehicle_raptor_shield)
         self.vehicle_flags |= VHF_HASSHIELD;
 
@@ -909,11 +909,11 @@ void spawnfunc_vehicle_raptor()
     //precache_model ("models/vehicles/clusterbomb.md3");
     precache_model ("models/vehicles/clusterbomb_folded.md3");
     precache_model ("models/vehicles/raptor_body.dpm");
     //precache_model ("models/vehicles/clusterbomb.md3");
     precache_model ("models/vehicles/clusterbomb_folded.md3");
     precache_model ("models/vehicles/raptor_body.dpm");
-    
+
     precache_sound ("vehicles/raptor_fly.wav");
     precache_sound ("vehicles/raptor_speed.wav");
     precache_sound ("vehicles/missile_alarm.wav");
     precache_sound ("vehicles/raptor_fly.wav");
     precache_sound ("vehicles/raptor_speed.wav");
     precache_sound ("vehicles/missile_alarm.wav");
-    
+
     if(!vehicle_initialize(
              "Raptor",
              "models/vehicles/raptor.dpm",
     if(!vehicle_initialize(
              "Raptor",
              "models/vehicles/raptor.dpm",
@@ -927,14 +927,14 @@ void spawnfunc_vehicle_raptor()
              raptor_frame,
              raptor_enter, raptor_exit,
              raptor_die,   raptor_think,
              raptor_frame,
              raptor_enter, raptor_exit,
              raptor_die,   raptor_think,
-             FALSE, 
+             FALSE,
              autocvar_g_vehicle_raptor_health,
              autocvar_g_vehicle_raptor_shield))
     {
         remove(self);
         return;
     }
              autocvar_g_vehicle_raptor_health,
              autocvar_g_vehicle_raptor_shield))
     {
         remove(self);
         return;
     }
-    
-    
+
+
 }
 #endif // SVQC
 }
 #endif // SVQC
index 9b37d3e6fd2219eff878e9222df8d206bf600055..a36904139336fa09cdb5e90510f3aca9a211c0fd 100644 (file)
@@ -132,12 +132,12 @@ void spiderbot_guide_release()
     }
 }
 
     }
 }
 
-float spiberbot_calcartillery_flighttime;  
+float spiberbot_calcartillery_flighttime;
 vector spiberbot_calcartillery(vector org, vector tgt, float ht)
 {
        float grav, sdist, zdist, vs, vz, jumpheight;
        vector sdir;
 vector spiberbot_calcartillery(vector org, vector tgt, float ht)
 {
        float grav, sdist, zdist, vs, vz, jumpheight;
        vector sdir;
-       
+
        grav  = autocvar_sv_gravity;
        zdist = tgt_z - org_z;
        sdist = vlen(tgt - org - zdist * '0 0 1');
        grav  = autocvar_sv_gravity;
        zdist = tgt_z - org_z;
        sdist = vlen(tgt - org - zdist * '0 0 1');
@@ -213,7 +213,7 @@ void spiderbot_rocket_do()
     entity rocket = world;
 
     if (self.wait != -10)
     entity rocket = world;
 
     if (self.wait != -10)
-    {        
+    {
         if (self.owner.BUTTON_ATCK2 && self.vehicle_weapon2mode == SBRM_GUIDE)
         {
             if (self.wait == 1)
         if (self.owner.BUTTON_ATCK2 && self.vehicle_weapon2mode == SBRM_GUIDE)
         {
             if (self.wait == 1)
@@ -234,7 +234,7 @@ void spiderbot_rocket_do()
             self.wait = 0;
         }
     }
             self.wait = 0;
         }
     }
-    
+
     if(self.gun2.cnt > time)
         return;
 
     if(self.gun2.cnt > time)
         return;
 
@@ -243,14 +243,14 @@ void spiderbot_rocket_do()
         self.tur_head.frame = 1;
         self.wait = 0;
     }
         self.tur_head.frame = 1;
         self.wait = 0;
     }
-        
+
     if (self.wait != -10)
         if (!self.owner.BUTTON_ATCK2)
             return;
 
 
     v = gettaginfo(self.tur_head,gettagindex(self.tur_head,"tag_fire"));
     if (self.wait != -10)
         if (!self.owner.BUTTON_ATCK2)
             return;
 
 
     v = gettaginfo(self.tur_head,gettagindex(self.tur_head,"tag_fire"));
-    
+
     switch(self.vehicle_weapon2mode)
     {
         case SBRM_VOLLY:
     switch(self.vehicle_weapon2mode)
     {
         case SBRM_VOLLY:
@@ -277,36 +277,36 @@ void spiderbot_rocket_do()
             rocket.nextthink  = time;
             rocket.think      = spiderbot_rocket_guided;
 
             rocket.nextthink  = time;
             rocket.think      = spiderbot_rocket_guided;
 
-                
+
         break;
         case SBRM_ARTILLERY:
             rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
                                    v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                    autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
                                    DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
         break;
         case SBRM_ARTILLERY:
             rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
                                    v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
                                    autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
                                    DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
-            
+
             crosshair_trace(self.owner);
             crosshair_trace(self.owner);
-            
+
             rocket.pos1       = trace_endpos + randomvec() * (0.75 * autocvar_g_vehicle_spiderbot_rocket_radius);
             rocket.pos1_z       = trace_endpos_z;
             rocket.pos1       = trace_endpos + randomvec() * (0.75 * autocvar_g_vehicle_spiderbot_rocket_radius);
             rocket.pos1_z       = trace_endpos_z;
-            
-            traceline(v, v + '0 0 1' * MAX_SHOT_DISTANCE, MOVE_WORLDONLY, self);             
+
+            traceline(v, v + '0 0 1' * MAX_SHOT_DISTANCE, MOVE_WORLDONLY, self);
             float h1 = 0.75 * vlen(v - trace_endpos);
             float h1 = 0.75 * vlen(v - trace_endpos);
-            
+
             //v = trace_endpos;
             //v = trace_endpos;
-            traceline(v , rocket.pos1 + '0 0 1' * MAX_SHOT_DISTANCE, MOVE_WORLDONLY, self); 
+            traceline(v , rocket.pos1 + '0 0 1' * MAX_SHOT_DISTANCE, MOVE_WORLDONLY, self);
             float h2 = 0.75 * vlen(rocket.pos1 - v);
             float h2 = 0.75 * vlen(rocket.pos1 - v);
-            
+
             rocket.velocity  = spiberbot_calcartillery(v, rocket.pos1, ((h1 < h2) ? h1 : h2));
             rocket.velocity  = spiberbot_calcartillery(v, rocket.pos1, ((h1 < h2) ? h1 : h2));
-            rocket.movetype  = MOVETYPE_TOSS;            
+            rocket.movetype  = MOVETYPE_TOSS;
             rocket.gravity   = 1;
             rocket.gravity   = 1;
-            //rocket.think     = spiderbot_rocket_artillery;   
+            //rocket.think     = spiderbot_rocket_artillery;
         break;
     }
     rocket.classname  = "spiderbot_rocket";
         break;
     }
     rocket.classname  = "spiderbot_rocket";
-    
+
     rocket.cnt = time + autocvar_g_vehicle_spiderbot_rocket_lifetime;
     rocket.cnt = time + autocvar_g_vehicle_spiderbot_rocket_lifetime;
-    
+
     self.tur_head.frame += 1;
     if (self.tur_head.frame == 9)
         self.attack_finished_single = autocvar_g_vehicle_spiderbot_rocket_reload;
     self.tur_head.frame += 1;
     if (self.tur_head.frame == 9)
         self.attack_finished_single = autocvar_g_vehicle_spiderbot_rocket_reload;
@@ -329,17 +329,17 @@ float spiderbot_frame()
 
        if(intermission_running)
                return 1;
 
        if(intermission_running)
                return 1;
-               
+
     player = self;
     spider = self.vehicle;
     self   = spider;
 
     vehicles_painframe();
     player = self;
     spider = self.vehicle;
     self   = spider;
 
     vehicles_painframe();
-    
+
     player.BUTTON_ZOOM      = 0;
     player.BUTTON_CROUCH    = 0;
     player.switchweapon     = 0;
     player.BUTTON_ZOOM      = 0;
     player.BUTTON_CROUCH    = 0;
     player.switchweapon     = 0;
-    
+
 
 #if 1 // 0 to enable per-gun impact aux crosshairs
     // Avarage gun impact point's -> aux cross
 
 #if 1 // 0 to enable per-gun impact aux crosshairs
     // Avarage gun impact point's -> aux cross
@@ -367,9 +367,9 @@ float spiderbot_frame()
     ad = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(spider.angles), AnglesTransform_FromAngles(ad))) - spider.tur_head.angles;
     ad = AnglesTransform_Normalize(ad, TRUE);
     //UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload2) + ('0 1 0' * (1 - player.vehicle_reload2)), 2);
     ad = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(spider.angles), AnglesTransform_FromAngles(ad))) - spider.tur_head.angles;
     ad = AnglesTransform_Normalize(ad, TRUE);
     //UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload2) + ('0 1 0' * (1 - player.vehicle_reload2)), 2);
-    
+
     // Rotate head
     // Rotate head
-    ftmp = autocvar_g_vehicle_spiderbot_head_turnspeed * sys_frametime;    
+    ftmp = autocvar_g_vehicle_spiderbot_head_turnspeed * sys_frametime;
     ad_y = bound(-ftmp, ad_y, ftmp);
     spider.tur_head.angles_y = bound(autocvar_g_vehicle_spiderbot_head_turnlimit * -1, spider.tur_head.angles_y + ad_y, autocvar_g_vehicle_spiderbot_head_turnlimit);
 
     ad_y = bound(-ftmp, ad_y, ftmp);
     spider.tur_head.angles_y = bound(autocvar_g_vehicle_spiderbot_head_turnlimit * -1, spider.tur_head.angles_y + ad_y, autocvar_g_vehicle_spiderbot_head_turnlimit);
 
@@ -380,7 +380,7 @@ float spiderbot_frame()
 
     //fixedmakevectors(spider.angles);
     makevectors(spider.angles + '-2 0 0' * spider.angles_x);
 
     //fixedmakevectors(spider.angles);
     makevectors(spider.angles + '-2 0 0' * spider.angles_x);
-    
+
     movelib_groundalign4point(autocvar_g_vehicle_spiderbot_springlength, autocvar_g_vehicle_spiderbot_springup, autocvar_g_vehicle_spiderbot_springblend, autocvar_g_vehicle_spiderbot_tiltlimit);
 
     if(spider.flags & FL_ONGROUND)
     movelib_groundalign4point(autocvar_g_vehicle_spiderbot_springlength, autocvar_g_vehicle_spiderbot_springup, autocvar_g_vehicle_spiderbot_springblend, autocvar_g_vehicle_spiderbot_tiltlimit);
 
     if(spider.flags & FL_ONGROUND)
@@ -388,11 +388,11 @@ float spiderbot_frame()
         if(spider.frame == 4 && self.tur_head.wait != 0)
         {
             sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_land.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
         if(spider.frame == 4 && self.tur_head.wait != 0)
         {
             sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_land.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
-            spider.frame = 5;            
+            spider.frame = 5;
         }
         }
-        
+
         if(player.BUTTON_JUMP && self.tur_head.wait < time)
         if(player.BUTTON_JUMP && self.tur_head.wait < time)
-        {        
+        {
             sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_jump.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
             //dprint("spiderbot_jump:", ftos(soundlength("vehicles/spiderbot_jump.wav")), "\n");
             self.delay = 0;
             sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_jump.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
             //dprint("spiderbot_jump:", ftos(soundlength("vehicles/spiderbot_jump.wav")), "\n");
             self.delay = 0;
@@ -407,12 +407,12 @@ float spiderbot_frame()
             if(vlen(player.movement) == 0)
             {
                 if(self.sound_nexttime < time || self.delay != 3)
             if(vlen(player.movement) == 0)
             {
                 if(self.sound_nexttime < time || self.delay != 3)
-                {                        
+                {
                     self.delay = 3;
                     self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_idle.wav");
                     //dprint("spiderbot_idle:", ftos(soundlength("vehicles/spiderbot_idle.wav")), "\n");
                     sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_idle.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
                     self.delay = 3;
                     self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_idle.wav");
                     //dprint("spiderbot_idle:", ftos(soundlength("vehicles/spiderbot_idle.wav")), "\n");
                     sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_idle.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
-                }                
+                }
                 movelib_beak_simple(autocvar_g_vehicle_spiderbot_speed_stop);
                 spider.frame = 5;
             }
                 movelib_beak_simple(autocvar_g_vehicle_spiderbot_speed_stop);
                 spider.frame = 5;
             }
@@ -423,8 +423,8 @@ float spiderbot_frame()
                     ftmp = autocvar_g_vehicle_spiderbot_turnspeed_strafe * sys_frametime;
                 else
                     ftmp = autocvar_g_vehicle_spiderbot_turnspeed * sys_frametime;
                     ftmp = autocvar_g_vehicle_spiderbot_turnspeed_strafe * sys_frametime;
                 else
                     ftmp = autocvar_g_vehicle_spiderbot_turnspeed * sys_frametime;
-                
-                ftmp = bound(-ftmp, spider.tur_head.angles_y, ftmp);                
+
+                ftmp = bound(-ftmp, spider.tur_head.angles_y, ftmp);
                 spider.angles_y = anglemods(spider.angles_y + ftmp);
                 spider.tur_head.angles_y -= ftmp;
 
                 spider.angles_y = anglemods(spider.angles_y + ftmp);
                 spider.tur_head.angles_y -= ftmp;
 
@@ -444,7 +444,7 @@ float spiderbot_frame()
                     movelib_move_simple(normalize(v_forward * player.movement_x),autocvar_g_vehicle_spiderbot_speed_walk,autocvar_g_vehicle_spiderbot_movement_inertia);
 
                     if(self.sound_nexttime < time || self.delay != 1)
                     movelib_move_simple(normalize(v_forward * player.movement_x),autocvar_g_vehicle_spiderbot_speed_walk,autocvar_g_vehicle_spiderbot_movement_inertia);
 
                     if(self.sound_nexttime < time || self.delay != 1)
-                    {                        
+                    {
                         self.delay = 1;
                         self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_walk.wav");
                         sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_walk.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
                         self.delay = 1;
                         self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_walk.wav");
                         sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_walk.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
@@ -465,7 +465,7 @@ float spiderbot_frame()
                     }
                     movelib_move_simple(normalize(v_right * player.movement_y),autocvar_g_vehicle_spiderbot_speed_strafe,autocvar_g_vehicle_spiderbot_movement_inertia);
                     if(self.sound_nexttime < time || self.delay != 2)
                     }
                     movelib_move_simple(normalize(v_right * player.movement_y),autocvar_g_vehicle_spiderbot_speed_strafe,autocvar_g_vehicle_spiderbot_movement_inertia);
                     if(self.sound_nexttime < time || self.delay != 2)
-                    {                        
+                    {
                         self.delay = 2;
                         self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_strafe.wav");
                         sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_strafe.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
                         self.delay = 2;
                         self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_strafe.wav");
                         sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_strafe.wav", VOL_VEHICLEENGINE, ATTEN_NORM);
@@ -527,7 +527,7 @@ float spiderbot_frame()
         vehicles_regen(spider.cnt, vehicle_ammo1, autocvar_g_vehicle_spiderbot_minigun_ammo_max,
                                            autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause,
                                            autocvar_g_vehicle_spiderbot_minigun_ammo_regen, frametime, FALSE);
         vehicles_regen(spider.cnt, vehicle_ammo1, autocvar_g_vehicle_spiderbot_minigun_ammo_max,
                                            autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause,
                                            autocvar_g_vehicle_spiderbot_minigun_ammo_regen, frametime, FALSE);
-        
+
 
     spiderbot_rocket_do();
 
 
     spiderbot_rocket_do();
 
@@ -554,7 +554,7 @@ float spiderbot_frame()
         VEHICLE_UPDATE_PLAYER(player, shield, spiderbot);
 
     self = player;
         VEHICLE_UPDATE_PLAYER(player, shield, spiderbot);
 
     self = player;
-    return 1;    
+    return 1;
 }
 void spiderbot_think()
 {
 }
 void spiderbot_think()
 {
@@ -574,8 +574,8 @@ void spiderbot_enter()
 
     if(self.owner.flagcarried)
     {
 
     if(self.owner.flagcarried)
     {
-        setattachment(self.owner.flagcarried, self.tur_head, ""); 
-        setorigin(self.owner.flagcarried, '-20 0 120'); 
+        setattachment(self.owner.flagcarried, self.tur_head, "");
+        setorigin(self.owner.flagcarried, '-20 0 120');
     }
 }
 
     }
 }
 
@@ -583,7 +583,7 @@ void spiderbot_exit(float eject)
 {
     entity e;
     vector spot;
 {
     entity e;
     vector spot;
-    
+
     e = findchain(classname,"spiderbot_rocket");
     while(e)
     {
     e = findchain(classname,"spiderbot_rocket");
     while(e)
     {
@@ -600,7 +600,7 @@ void spiderbot_exit(float eject)
     self.nextthink  = time;
     self.frame      = 5;
     self.movetype   = MOVETYPE_WALK;
     self.nextthink  = time;
     self.frame      = 5;
     self.movetype   = MOVETYPE_WALK;
-    
+
     if (!self.owner)
         return;
 
     if (!self.owner)
         return;
 
@@ -632,7 +632,7 @@ void spiderbot_exit(float eject)
            self.owner.oldvelocity = self.owner.velocity;
            setorigin(self.owner , spot);
        }
            self.owner.oldvelocity = self.owner.velocity;
            setorigin(self.owner , spot);
        }
-       
+
        antilag_clear(self.owner);
     self.owner = world;
 }
        antilag_clear(self.owner);
     self.owner = world;
 }
@@ -640,7 +640,7 @@ void spiderbot_exit(float eject)
 void spider_impact()
 {
     if(autocvar_g_vehicle_spiderbot_bouncepain_x)
 void spider_impact()
 {
     if(autocvar_g_vehicle_spiderbot_bouncepain_x)
-        vehilces_impact(autocvar_g_vehicle_spiderbot_bouncepain_x, autocvar_g_vehicle_spiderbot_bouncepain_y, autocvar_g_vehicle_spiderbot_bouncepain_z);    
+        vehilces_impact(autocvar_g_vehicle_spiderbot_bouncepain_x, autocvar_g_vehicle_spiderbot_bouncepain_y, autocvar_g_vehicle_spiderbot_bouncepain_z);
 }
 
 void spiderbot_headfade()
 }
 
 void spiderbot_headfade()
@@ -672,7 +672,7 @@ void spiderbot_blowup()
         self.nextthink = time + 0.1;
         return;
     }
         self.nextthink = time + 0.1;
         return;
     }
-    
+
     entity h, g1, g2, b;
     b = spawn();
     h = spawn();
     entity h, g1, g2, b;
     b = spawn();
     h = spawn();
@@ -755,12 +755,12 @@ float spiderbot_impulse(float _imp)
     switch(_imp)
     {
         case 10:
     switch(_imp)
     {
         case 10:
-        case 15:        
+        case 15:
         case 18:
             self.vehicle.vehicle_weapon2mode += 1;
             if(self.vehicle.vehicle_weapon2mode > SBRM_LAST)
                 self.vehicle.vehicle_weapon2mode = SBRM_FIRST;
         case 18:
             self.vehicle.vehicle_weapon2mode += 1;
             if(self.vehicle.vehicle_weapon2mode > SBRM_LAST)
                 self.vehicle.vehicle_weapon2mode = SBRM_FIRST;
-            
+
             //centerprint(self, strcat("Rocket mode is ", ftos(self.vehicle.vehicle_weapon2mode)));
             CSQCVehicleSetup(self, 0);
             return TRUE;
             //centerprint(self, strcat("Rocket mode is ", ftos(self.vehicle.vehicle_weapon2mode)));
             CSQCVehicleSetup(self, 0);
             return TRUE;
@@ -770,28 +770,28 @@ float spiderbot_impulse(float _imp)
             self.vehicle.vehicle_weapon2mode -= 1;
             if(self.vehicle.vehicle_weapon2mode < SBRM_FIRST)
                 self.vehicle.vehicle_weapon2mode = SBRM_LAST;
             self.vehicle.vehicle_weapon2mode -= 1;
             if(self.vehicle.vehicle_weapon2mode < SBRM_FIRST)
                 self.vehicle.vehicle_weapon2mode = SBRM_LAST;
-            
+
             //centerprint(self, strcat("Rocket mode is ", ftos(self.vehicle.vehicle_weapon2mode)));
             CSQCVehicleSetup(self, 0);
             return TRUE;
 
             //centerprint(self, strcat("Rocket mode is ", ftos(self.vehicle.vehicle_weapon2mode)));
             CSQCVehicleSetup(self, 0);
             return TRUE;
 
-        /*                     
+        /*
         case 17: // toss gun, could be used to exit?
             break;
         case 20: // Manual minigun reload?
             break;
         */
         case 17: // toss gun, could be used to exit?
             break;
         case 20: // Manual minigun reload?
             break;
         */
-    }    
+    }
     return FALSE;
 }
 
 void spiderbot_spawn(float _f)
 {
     if(!self.gun1)
     return FALSE;
 }
 
 void spiderbot_spawn(float _f)
 {
     if(!self.gun1)
-    {        
+    {
         self.vehicles_impusle   = spiderbot_impulse;
         self.gun1               = spawn();
         self.vehicles_impusle   = spiderbot_impulse;
         self.gun1               = spawn();
-        self.gun2               = spawn();    
+        self.gun2               = spawn();
         setmodel(self.gun1, "models/vehicles/spiderbot_barrels.dpm");
         setmodel(self.gun2, "models/vehicles/spiderbot_barrels.dpm");
         setattachment(self.gun1, self.tur_head, "tag_hardpoint01");
         setmodel(self.gun1, "models/vehicles/spiderbot_barrels.dpm");
         setmodel(self.gun2, "models/vehicles/spiderbot_barrels.dpm");
         setattachment(self.gun1, self.tur_head, "tag_hardpoint01");
@@ -809,7 +809,7 @@ void spiderbot_spawn(float _f)
     self.movetype           = MOVETYPE_WALK;
     self.solid              = SOLID_SLIDEBOX;
     self.alpha              = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = 1;
     self.movetype           = MOVETYPE_WALK;
     self.solid              = SOLID_SLIDEBOX;
     self.alpha              = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = 1;
-    self.tur_head.angles    = '0 0 0';    
+    self.tur_head.angles    = '0 0 0';
 
     setorigin(self, self.pos1 + '0 0 128');
     self.angles = self.pos2;
 
     setorigin(self, self.pos1 + '0 0 128');
     self.angles = self.pos2;
@@ -823,12 +823,12 @@ void spawnfunc_vehicle_spiderbot()
     {
         remove(self);
         return;
     {
         remove(self);
         return;
-    }        
+    }
 
     self.vehicle_flags |= VHF_DMGSHAKE;
     //self.vehicle_flags |= VHF_DMGROLL;
     //self.vehicle_flags |= VHF_DMGHEADROLL;
 
     self.vehicle_flags |= VHF_DMGSHAKE;
     //self.vehicle_flags |= VHF_DMGROLL;
     //self.vehicle_flags |= VHF_DMGHEADROLL;
-    
+
     precache_model ( "models/vhshield.md3");
     precache_model ( "models/vehicles/spiderbot.dpm");
     precache_model ( "models/vehicles/spiderbot_top.dpm");
     precache_model ( "models/vhshield.md3");
     precache_model ( "models/vehicles/spiderbot.dpm");
     precache_model ( "models/vehicles/spiderbot_top.dpm");
@@ -838,7 +838,7 @@ void spawnfunc_vehicle_spiderbot()
 
     precache_sound ( "weapons/uzi_fire.wav" );
     precache_sound ( "weapons/rocket_impact.wav");
 
     precache_sound ( "weapons/uzi_fire.wav" );
     precache_sound ( "weapons/rocket_impact.wav");
-    
+
     precache_sound ( "vehicles/spiderbot_die.wav");
     precache_sound ( "vehicles/spiderbot_idle.wav");
     precache_sound ( "vehicles/spiderbot_jump.wav");
     precache_sound ( "vehicles/spiderbot_die.wav");
     precache_sound ( "vehicles/spiderbot_idle.wav");
     precache_sound ( "vehicles/spiderbot_jump.wav");
@@ -854,7 +854,7 @@ void spawnfunc_vehicle_spiderbot()
 
     if(autocvar_g_vehicle_spiderbot_health_regen)
         self.vehicle_flags |= VHF_HEALTHREGEN;
 
     if(autocvar_g_vehicle_spiderbot_health_regen)
         self.vehicle_flags |= VHF_HEALTHREGEN;
-        
+
     if(!vehicle_initialize(
              "Spiderbot",
              "models/vehicles/spiderbot.dpm",
     if(!vehicle_initialize(
              "Spiderbot",
              "models/vehicles/spiderbot.dpm",
@@ -868,7 +868,7 @@ void spawnfunc_vehicle_spiderbot()
              spiderbot_frame,
              spiderbot_enter, spiderbot_exit,
              spiderbot_die,   spiderbot_think,
              spiderbot_frame,
              spiderbot_enter, spiderbot_exit,
              spiderbot_die,   spiderbot_think,
-             FALSE, 
+             FALSE,
              autocvar_g_vehicle_spiderbot_health,
              autocvar_g_vehicle_spiderbot_shield))
     {
              autocvar_g_vehicle_spiderbot_health,
              autocvar_g_vehicle_spiderbot_shield))
     {
index f1fca41eb138fd892ac471073c3356aadbac2bdc..1e5537a259934cd2faab7750716d1b9d57ea22de 100644 (file)
@@ -103,13 +103,13 @@ void CSQCVehicleSetup(entity own, float vehicle_id)
 {
     if (!IS_REAL_CLIENT(own))
         return;
 {
     if (!IS_REAL_CLIENT(own))
         return;
-       
+
        msg_entity = own;
 
        WriteByte(MSG_ONE, SVC_TEMPENTITY);
        WriteByte(MSG_ONE, TE_CSQC_VEHICLESETUP);
        if(vehicle_id != 0)
        msg_entity = own;
 
        WriteByte(MSG_ONE, SVC_TEMPENTITY);
        WriteByte(MSG_ONE, TE_CSQC_VEHICLESETUP);
        if(vehicle_id != 0)
-           WriteByte(MSG_ONE, vehicle_id);        
+           WriteByte(MSG_ONE, vehicle_id);
        else
         WriteByte(MSG_ONE, 1 + own.vehicle.vehicle_weapon2mode + HUD_VEHICLE_LAST);
 }
        else
         WriteByte(MSG_ONE, 1 + own.vehicle.vehicle_weapon2mode + HUD_VEHICLE_LAST);
 }
@@ -492,10 +492,10 @@ void vehicles_spawn()
     setorigin(self, self.pos1 + '0 0 0');
     // Show it
     pointparticles(particleeffectnum("teleport"), self.origin + '0 0 64', '0 0 0', 1);
     setorigin(self, self.pos1 + '0 0 0');
     // Show it
     pointparticles(particleeffectnum("teleport"), self.origin + '0 0 64', '0 0 0', 1);
-    
+
     if(self.vehicle_controller)
         self.team = self.vehicle_controller.team;
     if(self.vehicle_controller)
         self.team = self.vehicle_controller.team;
-       
+
     vehicles_reset_colors();
     self.vehicle_spawn(VHSF_NORMAL);
 }
     vehicles_reset_colors();
     self.vehicle_spawn(VHSF_NORMAL);
 }
@@ -539,7 +539,7 @@ void vehicles_touch()
 {
        if(MUTATOR_CALLHOOK(VehicleTouch))
                return;
 {
        if(MUTATOR_CALLHOOK(VehicleTouch))
                return;
-       
+
     // Vehicle currently in use
     if(self.owner)
     {
     // Vehicle currently in use
     if(self.owner)
     {
@@ -574,8 +574,8 @@ var float autocvar_g_vehicles_allow_bots = 0;
 void vehicles_enter()
 {
    // Remove this when bots know how to use vehicles
 void vehicles_enter()
 {
    // Remove this when bots know how to use vehicles
-   
-    if (IS_BOT_CLIENT(other))    
+
+    if (IS_BOT_CLIENT(other))
         if (autocvar_g_vehicles_allow_bots)
             dprint("Bot enters vehicle\n"); // This is where we need to disconnect (some, all?) normal bot AI and hand over to vehicle's _aiframe()
         else
         if (autocvar_g_vehicles_allow_bots)
             dprint("Bot enters vehicle\n"); // This is where we need to disconnect (some, all?) normal bot AI and hand over to vehicle's _aiframe()
         else
@@ -636,13 +636,13 @@ void vehicles_enter()
 
     self.team                 = self.owner.team;
     self.flags               -= FL_NOTARGET;
 
     self.team                 = self.owner.team;
     self.flags               -= FL_NOTARGET;
-    
+
     if (IS_REAL_CLIENT(other))
     {
         msg_entity = other;
         WriteByte (MSG_ONE, SVC_SETVIEWPORT);
         WriteEntity(MSG_ONE, self.vehicle_viewport);
     if (IS_REAL_CLIENT(other))
     {
         msg_entity = other;
         WriteByte (MSG_ONE, SVC_SETVIEWPORT);
         WriteEntity(MSG_ONE, self.vehicle_viewport);
-                
+
         WriteByte (MSG_ONE, SVC_SETVIEWANGLES);
         if(self.tur_head)
         {
         WriteByte (MSG_ONE, SVC_SETVIEWANGLES);
         if(self.tur_head)
         {
@@ -661,7 +661,7 @@ void vehicles_enter()
     vehicles_clearrturn();
 
     CSQCVehicleSetup(self.owner, self.hud);
     vehicles_clearrturn();
 
     CSQCVehicleSetup(self.owner, self.hud);
-    
+
     vh_player = other;
     vh_vehicle = self;
     MUTATOR_CALLHOOK(VehicleEnter);
     vh_player = other;
     vh_vehicle = self;
     MUTATOR_CALLHOOK(VehicleEnter);
@@ -735,31 +735,31 @@ void vehicles_exit(float eject)
     entity _vehicle;
     entity _player;
     entity _oldself = self;
     entity _vehicle;
     entity _player;
     entity _oldself = self;
-    
+
     if(vehicles_exit_running)
     {
         dprint("^1vehicles_exit allready running! this is not good..\n");
         return;
     }
     if(vehicles_exit_running)
     {
         dprint("^1vehicles_exit allready running! this is not good..\n");
         return;
     }
-    
+
     vehicles_exit_running = TRUE;
     if(IS_CLIENT(self))
     {
         _vehicle = self.vehicle;
     vehicles_exit_running = TRUE;
     if(IS_CLIENT(self))
     {
         _vehicle = self.vehicle;
-            
+
         if (_vehicle.vehicle_flags & VHF_PLAYERSLOT)
         {
             _vehicle.vehicle_exit(eject);
             self = _oldself;
             vehicles_exit_running = FALSE;
         if (_vehicle.vehicle_flags & VHF_PLAYERSLOT)
         {
             _vehicle.vehicle_exit(eject);
             self = _oldself;
             vehicles_exit_running = FALSE;
-            return;            
+            return;
         }
     }
     else
         _vehicle = self;
         }
     }
     else
         _vehicle = self;
-    
+
     _player = _vehicle.owner;
     _player = _vehicle.owner;
-    
+
     self = _vehicle;
 
     if (_player)
     self = _vehicle;
 
     if (_player)
@@ -775,7 +775,7 @@ void vehicles_exit(float eject)
             WriteAngle(MSG_ONE, _vehicle.angles_y);
             WriteAngle(MSG_ONE, 0);
         }
             WriteAngle(MSG_ONE, _vehicle.angles_y);
             WriteAngle(MSG_ONE, 0);
         }
-        
+
         setsize(_player, PL_MIN,PL_MAX);
 
         _player.takedamage     = DAMAGE_AIM;
         setsize(_player, PL_MIN,PL_MAX);
 
         _player.takedamage     = DAMAGE_AIM;
@@ -793,12 +793,12 @@ void vehicles_exit(float eject)
         CSQCVehicleSetup(_player, HUD_NORMAL);
     }
     _vehicle.flags |= FL_NOTARGET;
         CSQCVehicleSetup(_player, HUD_NORMAL);
     }
     _vehicle.flags |= FL_NOTARGET;
-    
+
     if(_vehicle.deadflag == DEAD_NO)
         _vehicle.avelocity          = '0 0 0';
     if(_vehicle.deadflag == DEAD_NO)
         _vehicle.avelocity          = '0 0 0';
-    
+
     _vehicle.tur_head.nodrawtoclient             = world;
     _vehicle.tur_head.nodrawtoclient             = world;
-    
+
     if(!teamplay)
         _vehicle.team = 0;
 
     if(!teamplay)
         _vehicle.team = 0;
 
@@ -809,18 +809,18 @@ void vehicles_exit(float eject)
     _vehicle = vh_vehicle;
 
     _vehicle.team = _vehicle.tur_head.team;
     _vehicle = vh_vehicle;
 
     _vehicle.team = _vehicle.tur_head.team;
-        
+
     sound (_vehicle, CH_TRIGGER_SINGLE, "misc/null.wav", 1, ATTEN_NORM);
     sound (_vehicle, CH_TRIGGER_SINGLE, "misc/null.wav", 1, ATTEN_NORM);
-    _vehicle.vehicle_hudmodel.viewmodelforclient = _vehicle;   
+    _vehicle.vehicle_hudmodel.viewmodelforclient = _vehicle;
     _vehicle.phase = time + 1;
     _vehicle.phase = time + 1;
-    
+
     _vehicle.vehicle_exit(eject);
     _vehicle.vehicle_exit(eject);
-    
+
     vehicles_setreturn();
     vehicles_setreturn();
-    vehicles_reset_colors();        
+    vehicles_reset_colors();
     _vehicle.owner = world;
     self = _oldself;
     _vehicle.owner = world;
     self = _oldself;
-    
+
     vehicles_exit_running = FALSE;
 }
 
     vehicles_exit_running = FALSE;
 }
 
@@ -832,7 +832,7 @@ void vehicles_regen(float timer, .float regen_field, float field_max, float rpau
     {
         if(_healthscale)
             regen = regen * (self.vehicle_health / self.tur_health);
     {
         if(_healthscale)
             regen = regen * (self.vehicle_health / self.tur_health);
-            
+
         self.regen_field = min(self.regen_field + regen * delta_time, field_max);
 
         if(self.owner)
         self.regen_field = min(self.regen_field + regen * delta_time, field_max);
 
         if(self.owner)
@@ -880,24 +880,24 @@ void vehicles_painframe()
 void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
     self.dmg_time = time;
 void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
     self.dmg_time = time;
-    
+
     if(DEATH_ISWEAPON(deathtype, WEP_NEX))
         damage *= autocvar_g_vehicles_nex_damagerate;
     if(DEATH_ISWEAPON(deathtype, WEP_NEX))
         damage *= autocvar_g_vehicles_nex_damagerate;
-        
+
     if(DEATH_ISWEAPON(deathtype, WEP_UZI))
         damage *= autocvar_g_vehicles_uzi_damagerate;
     if(DEATH_ISWEAPON(deathtype, WEP_UZI))
         damage *= autocvar_g_vehicles_uzi_damagerate;
-        
+
     if(DEATH_ISWEAPON(deathtype, WEP_RIFLE))
         damage *= autocvar_g_vehicles_rifle_damagerate;
     if(DEATH_ISWEAPON(deathtype, WEP_RIFLE))
         damage *= autocvar_g_vehicles_rifle_damagerate;
-        
+
     if(DEATH_ISWEAPON(deathtype, WEP_MINSTANEX))
         damage *= autocvar_g_vehicles_minstanex_damagerate;
 
     if(DEATH_ISWEAPON(deathtype, WEP_SEEKER))
         damage *= autocvar_g_vehicles_tag_damagerate;
     if(DEATH_ISWEAPON(deathtype, WEP_MINSTANEX))
         damage *= autocvar_g_vehicles_minstanex_damagerate;
 
     if(DEATH_ISWEAPON(deathtype, WEP_SEEKER))
         damage *= autocvar_g_vehicles_tag_damagerate;
-    
+
     self.enemy = attacker;
     self.enemy = attacker;
-    
+
     if((self.vehicle_flags & VHF_HASSHIELD) && (self.vehicle_shield > 0))
     {
         if (wasfreed(self.vehicle_shieldent) || self.vehicle_shieldent == world)
     if((self.vehicle_flags & VHF_HASSHIELD) && (self.vehicle_shield > 0))
     {
         if (wasfreed(self.vehicle_shieldent) || self.vehicle_shieldent == world)
@@ -942,7 +942,7 @@ void vehicles_damage(entity inflictor, entity attacker, float damage, float deat
         if(sound_allowed(MSG_BROADCAST, attacker))
             spamsound (self, CH_PAIN, "onslaught/ons_hit2.wav", VOL_BASE, ATTEN_NORM);  // FIXME: PLACEHOLDER
     }
         if(sound_allowed(MSG_BROADCAST, attacker))
             spamsound (self, CH_PAIN, "onslaught/ons_hit2.wav", VOL_BASE, ATTEN_NORM);  // FIXME: PLACEHOLDER
     }
-    
+
        if(self.damageforcescale < 1 && self.damageforcescale > 0)
                self.velocity += force * self.damageforcescale;
        else
        if(self.damageforcescale < 1 && self.damageforcescale > 0)
                self.velocity += force * self.damageforcescale;
        else
@@ -1133,7 +1133,7 @@ void vehicle_use()
         self.active = ACTIVE_NOT;
     else
         self.active = ACTIVE_ACTIVE;
         self.active = ACTIVE_NOT;
     else
         self.active = ACTIVE_ACTIVE;
-    
+
     if(self.active == ACTIVE_ACTIVE && self.deadflag == DEAD_NO)
     {
         dprint("^3Eat shit yall!\n");
     if(self.active == ACTIVE_ACTIVE && self.deadflag == DEAD_NO)
     {
         dprint("^3Eat shit yall!\n");
@@ -1142,15 +1142,15 @@ void vehicle_use()
     }
     else if(self.active == ACTIVE_NOT && self.deadflag != DEAD_NO)
     {
     }
     else if(self.active == ACTIVE_NOT && self.deadflag != DEAD_NO)
     {
-        
+
     }
 }
 
     }
 }
 
-float vehicle_addplayerslot(    entity _owner, 
-                                entity _slot, 
-                                float _hud, 
+float vehicle_addplayerslot(    entity _owner,
+                                entity _slot,
+                                float _hud,
                                 string _hud_model,
                                 string _hud_model,
-                                float() _framefunc, 
+                                float() _framefunc,
                                 void(float) _exitfunc)
 {
     if (!(_owner.vehicle_flags & VHF_MULTISLOT))
                                 void(float) _exitfunc)
 {
     if (!(_owner.vehicle_flags & VHF_MULTISLOT))
@@ -1164,13 +1164,13 @@ float vehicle_addplayerslot(    entity _owner,
     _slot.vehicle_hudmodel = spawn();
     _slot.vehicle_hudmodel.viewmodelforclient = _slot;
     _slot.vehicle_viewport.effects = (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NOGUNBOB | EF_NOSHADOW | EF_LOWPRECISION | EF_SELECTABLE | EF_TELEPORT_BIT);
     _slot.vehicle_hudmodel = spawn();
     _slot.vehicle_hudmodel.viewmodelforclient = _slot;
     _slot.vehicle_viewport.effects = (EF_ADDITIVE | EF_DOUBLESIDED | EF_FULLBRIGHT | EF_NODEPTHTEST | EF_NOGUNBOB | EF_NOSHADOW | EF_LOWPRECISION | EF_SELECTABLE | EF_TELEPORT_BIT);
-    
+
     setmodel(_slot.vehicle_hudmodel, _hud_model);
     setmodel(_slot.vehicle_viewport, "null");
     setmodel(_slot.vehicle_hudmodel, _hud_model);
     setmodel(_slot.vehicle_viewport, "null");
-    
+
     setattachment(_slot.vehicle_hudmodel, _slot, "");
     setattachment(_slot.vehicle_viewport, _slot.vehicle_hudmodel, "");
     setattachment(_slot.vehicle_hudmodel, _slot, "");
     setattachment(_slot.vehicle_viewport, _slot.vehicle_hudmodel, "");
-    
+
     return TRUE;
 }
 
     return TRUE;
 }
 
@@ -1198,7 +1198,7 @@ float vehicle_initialize(string  net_name,
 {
        if(!autocvar_g_vehicles)
                return FALSE;
 {
        if(!autocvar_g_vehicles)
                return FALSE;
-       
+
     if(self.targetname)
     {
         self.vehicle_controller = find(world, target, self.targetname);
     if(self.targetname)
     {
         self.vehicle_controller = find(world, target, self.targetname);
@@ -1208,19 +1208,19 @@ float vehicle_initialize(string  net_name,
         }
         else
         {
         }
         else
         {
-            self.team = self.vehicle_controller.team;        
+            self.team = self.vehicle_controller.team;
             self.use = vehicle_use;
             self.use = vehicle_use;
-            
+
             if(teamplay)
             {
                 if(self.vehicle_controller.team == 0)
                     self.active = ACTIVE_NOT;
                 else
             if(teamplay)
             {
                 if(self.vehicle_controller.team == 0)
                     self.active = ACTIVE_NOT;
                 else
-                    self.active = ACTIVE_ACTIVE;                
+                    self.active = ACTIVE_ACTIVE;
             }
         }
     }
             }
         }
     }
-    
+
     precache_sound("onslaught/ons_hit2.wav");
     precache_sound("onslaught/electricity_explode.wav");
 
     precache_sound("onslaught/ons_hit2.wav");
     precache_sound("onslaught/electricity_explode.wav");
 
@@ -1316,19 +1316,19 @@ float vehicle_initialize(string  net_name,
         tracebox(self.origin + '0 0 100', min_s, max_s, self.origin - '0 0 10000', MOVE_WORLDONLY, self);
         setorigin(self, trace_endpos);
     }
         tracebox(self.origin + '0 0 100', min_s, max_s, self.origin - '0 0 10000', MOVE_WORLDONLY, self);
         setorigin(self, trace_endpos);
     }
-    
+
     self.pos1 = self.origin;
     self.pos2 = self.angles;
     self.tur_head.team = self.team;
     self.pos1 = self.origin;
     self.pos2 = self.angles;
     self.tur_head.team = self.team;
-       
+
        if(MUTATOR_CALLHOOK(VehicleSpawn))
                return FALSE;
 
     return TRUE;
 }
 
        if(MUTATOR_CALLHOOK(VehicleSpawn))
                return FALSE;
 
     return TRUE;
 }
 
-vector vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string _tagname, 
-                         float _pichlimit_min, float _pichlimit_max, 
+vector vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string _tagname,
+                         float _pichlimit_min, float _pichlimit_max,
                          float _rotlimit_min, float _rotlimit_max, float _aimspeed)
 {
     vector vtmp, vtag;
                          float _rotlimit_min, float _rotlimit_max, float _aimspeed)
 {
     vector vtmp, vtag;
@@ -1340,7 +1340,7 @@ vector vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string
     ftmp = _aimspeed * frametime;
     vtmp_y = bound(-ftmp, vtmp_y, ftmp);
     vtmp_x = bound(-ftmp, vtmp_x, ftmp);
     ftmp = _aimspeed * frametime;
     vtmp_y = bound(-ftmp, vtmp_y, ftmp);
     vtmp_x = bound(-ftmp, vtmp_x, ftmp);
-    _turrret.angles_y = bound(_rotlimit_min, _turrret.angles_y + vtmp_y, _rotlimit_max);    
+    _turrret.angles_y = bound(_rotlimit_min, _turrret.angles_y + vtmp_y, _rotlimit_max);
     _turrret.angles_x = bound(_pichlimit_min, _turrret.angles_x + vtmp_x, _pichlimit_max);
     return vtag;
 }
     _turrret.angles_x = bound(_pichlimit_min, _turrret.angles_x + vtmp_x, _pichlimit_max);
     return vtag;
 }
@@ -1370,23 +1370,23 @@ entity vehicle_tossgib(entity _template, vector _vel, string _tag, float _burn,
        _gib.movetype = MOVETYPE_TOSS;
        _gib.solid = SOLID_CORPSE;
        _gib.colormod = '-0.5 -0.5 -0.5';
        _gib.movetype = MOVETYPE_TOSS;
        _gib.solid = SOLID_CORPSE;
        _gib.colormod = '-0.5 -0.5 -0.5';
-       _gib.effects = EF_LOWPRECISION; 
+       _gib.effects = EF_LOWPRECISION;
        _gib.avelocity = _rot;
        _gib.avelocity = _rot;
-       
+
        if(_burn)
                _gib.effects |= EF_FLAME;
        if(_burn)
                _gib.effects |= EF_FLAME;
-       
+
        if(_explode)
        {
        if(_explode)
        {
-               _gib.think = vehicles_gib_explode; 
+               _gib.think = vehicles_gib_explode;
                _gib.nextthink = time + random() * _explode;
                _gib.touch = vehicles_gib_explode;
        }
        else
        {
                _gib.cnt = time + _maxtime;
                _gib.nextthink = time + random() * _explode;
                _gib.touch = vehicles_gib_explode;
        }
        else
        {
                _gib.cnt = time + _maxtime;
-               _gib.think = vehicles_gib_think; 
-               _gib.nextthink = time + _maxtime - 1;           
+               _gib.think = vehicles_gib_think;
+               _gib.nextthink = time + _maxtime - 1;
                _gib.alpha = 1;
        }
        return _gib;
                _gib.alpha = 1;
        }
        return _gib;
index dd89ec2f889cdf5e3d688f340d649e31a47d7107..0734a58db390555a8015023f02daeaa1dfb5bd26 100644 (file)
@@ -192,7 +192,7 @@ void W_BallisticBullet_Hit (void)
                /*if(yoda && (time > (self.last_yoda + 5)))
                {
                        Send_Notification(NOTIF_ONE, self.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
                /*if(yoda && (time > (self.last_yoda + 5)))
                {
                        Send_Notification(NOTIF_ONE, self.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
-                       self.last_yoda = time; 
+                       self.last_yoda = time;
                }*/
 
                // calculate hits for ballistic weapons
                }*/
 
                // calculate hits for ballistic weapons
@@ -247,7 +247,7 @@ float W_BallisticBullet_LeaveSolid(float eff)
        if(self.origin_x > world.maxs_x || self.origin_y > world.maxs_y || self.origin_z > world.maxs_z || self.origin_x < world.mins_x || self.origin_y < world.mins_y || self.origin_z < world.mins_z)
                return 0;
 
        if(self.origin_x > world.maxs_x || self.origin_y > world.maxs_y || self.origin_z > world.maxs_z || self.origin_x < world.mins_x || self.origin_y < world.mins_y || self.origin_z < world.mins_z)
                return 0;
 
-       // special case for zero density and zero bullet constant: 
+       // special case for zero density and zero bullet constant:
 
        if(self.dmg_radius == 0)
        {
 
        if(self.dmg_radius == 0)
        {
@@ -566,7 +566,7 @@ void fireBullet (vector start, vector dir, float spread, float damage, float for
        if (pointcontents (trace_endpos) != CONTENT_SKY)
        {
                if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
        if (pointcontents (trace_endpos) != CONTENT_SKY)
        {
                if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
-                       Damage_DamageInfo(trace_endpos, damage, 0, 0, dir * max(1, force), dtype, trace_ent.species, self);                    
+                       Damage_DamageInfo(trace_endpos, damage, 0, 0, dir * max(1, force), dtype, trace_ent.species, self);
 
                Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * force);
        }
 
                Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * force);
        }
@@ -578,7 +578,7 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp
        float is_from_contents = (deathtype == DEATH_SLIME || deathtype == DEATH_LAVA);
        float is_from_owner = (inflictor == projowner);
        float is_from_exception = (exception != -1);
        float is_from_contents = (deathtype == DEATH_SLIME || deathtype == DEATH_LAVA);
        float is_from_owner = (inflictor == projowner);
        float is_from_exception = (exception != -1);
-       
+
        //dprint(strcat("W_CheckProjectileDamage: from_contents ", ftos(is_from_contents), " : from_owner ", ftos(is_from_owner), " : exception ", strcat(ftos(is_from_exception), " (", ftos(exception), "). \n")));
 
        if(autocvar_g_projectiles_damage <= -2)
        //dprint(strcat("W_CheckProjectileDamage: from_contents ", ftos(is_from_contents), " : from_owner ", ftos(is_from_owner), " : exception ", strcat(ftos(is_from_exception), " (", ftos(exception), "). \n")));
 
        if(autocvar_g_projectiles_damage <= -2)
@@ -598,7 +598,7 @@ float W_CheckProjectileDamage(entity inflictor, entity projowner, float deathtyp
                        return (exception); // if exception is detected, allow it to override
                else if (!is_from_contents)
                        return FALSE; // otherwise, only allow damage from contents
                        return (exception); // if exception is detected, allow it to override
                else if (!is_from_contents)
                        return FALSE; // otherwise, only allow damage from contents
-       }       
+       }
        else if(autocvar_g_projectiles_damage == 1)
        {
                if(is_from_exception)
        else if(autocvar_g_projectiles_damage == 1)
        {
                if(is_from_exception)
@@ -619,13 +619,13 @@ void W_PrepareExplosionByDamage(entity attacker, void() explode)
 {
        self.takedamage = DAMAGE_NO;
        self.event_damage = func_null;
 {
        self.takedamage = DAMAGE_NO;
        self.event_damage = func_null;
-       
+
        if(IS_CLIENT(attacker) && !autocvar_g_projectiles_keep_owner)
        {
                self.owner = attacker;
                self.realowner = attacker;
        }
        if(IS_CLIENT(attacker) && !autocvar_g_projectiles_keep_owner)
        {
                self.owner = attacker;
                self.realowner = attacker;
        }
-       
+
        // do not explode NOW but in the NEXT FRAME!
        // because recursive calls to RadiusDamage are not allowed
        self.nextthink = time;
        // do not explode NOW but in the NEXT FRAME!
        // because recursive calls to RadiusDamage are not allowed
        self.nextthink = time;
index d447e28878b3b0a85ad9c0bb55bac6aaf121a7d8..f7ad7583d16ba3727695b790db428fd065be2886 100644 (file)
@@ -241,7 +241,7 @@ float W_Crylink_Touch_WouldHitFriendly(entity projectile, float rad)
                        else
                                ++hit_enemy;
                }
                        else
                                ++hit_enemy;
                }
-                       
+
                head = head.chain;
        }
 
                head = head.chain;
        }
 
@@ -267,7 +267,7 @@ void W_Crylink_Touch (void)
                f *= a;
 
        float totaldamage = RadiusDamage(self, self.realowner, autocvar_g_balance_crylink_primary_damage * f, autocvar_g_balance_crylink_primary_edgedamage * f, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * f, self.projectiledeathtype, other);
                f *= a;
 
        float totaldamage = RadiusDamage(self, self.realowner, autocvar_g_balance_crylink_primary_damage * f, autocvar_g_balance_crylink_primary_edgedamage * f, autocvar_g_balance_crylink_primary_radius, world, autocvar_g_balance_crylink_primary_force * f, self.projectiledeathtype, other);
-       
+
        if(totaldamage && ((autocvar_g_balance_crylink_primary_linkexplode == 2) || ((autocvar_g_balance_crylink_primary_linkexplode == 1) && !W_Crylink_Touch_WouldHitFriendly(self, autocvar_g_balance_crylink_primary_radius))))
        {
                if(self == self.realowner.crylink_lastgroup)
        if(totaldamage && ((autocvar_g_balance_crylink_primary_linkexplode == 2) || ((autocvar_g_balance_crylink_primary_linkexplode == 1) && !W_Crylink_Touch_WouldHitFriendly(self, autocvar_g_balance_crylink_primary_radius))))
        {
                if(self == self.realowner.crylink_lastgroup)
@@ -311,7 +311,7 @@ void W_Crylink_Touch2 (void)
                f *= a;
 
        float totaldamage = RadiusDamage(self, self.realowner, autocvar_g_balance_crylink_secondary_damage * f, autocvar_g_balance_crylink_secondary_edgedamage * f, autocvar_g_balance_crylink_secondary_radius, world, autocvar_g_balance_crylink_secondary_force * f, self.projectiledeathtype, other);
                f *= a;
 
        float totaldamage = RadiusDamage(self, self.realowner, autocvar_g_balance_crylink_secondary_damage * f, autocvar_g_balance_crylink_secondary_edgedamage * f, autocvar_g_balance_crylink_secondary_radius, world, autocvar_g_balance_crylink_secondary_force * f, self.projectiledeathtype, other);
-               
+
        if(totaldamage && ((autocvar_g_balance_crylink_secondary_linkexplode == 2) || ((autocvar_g_balance_crylink_secondary_linkexplode == 1) && !W_Crylink_Touch_WouldHitFriendly(self, autocvar_g_balance_crylink_secondary_radius))))
        {
                if(self == self.realowner.crylink_lastgroup)
        if(totaldamage && ((autocvar_g_balance_crylink_secondary_linkexplode == 2) || ((autocvar_g_balance_crylink_secondary_linkexplode == 1) && !W_Crylink_Touch_WouldHitFriendly(self, autocvar_g_balance_crylink_secondary_radius))))
        {
                if(self == self.realowner.crylink_lastgroup)
@@ -439,7 +439,7 @@ void W_Crylink_Attack (void)
 
                proj.flags = FL_PROJECTILE;
     proj.missile_flags = MIF_SPLASH;
 
                proj.flags = FL_PROJECTILE;
     proj.missile_flags = MIF_SPLASH;
-    
+
                CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
 
                other = proj; MUTATOR_CALLHOOK(EditProjectile);
                CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
 
                other = proj; MUTATOR_CALLHOOK(EditProjectile);
@@ -555,7 +555,7 @@ void W_Crylink_Attack2 (void)
 
                proj.flags = FL_PROJECTILE;
         proj.missile_flags = MIF_SPLASH;
 
                proj.flags = FL_PROJECTILE;
         proj.missile_flags = MIF_SPLASH;
-        
+
                CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
 
                other = proj; MUTATOR_CALLHOOK(EditProjectile);
                CSQCProjectile(proj, TRUE, (proj.cnt ? PROJECTILE_CRYLINK_BOUNCING : PROJECTILE_CRYLINK), TRUE);
 
                other = proj; MUTATOR_CALLHOOK(EditProjectile);
index 3762ac4d71a2019959b6bf7d66d35c01057e6db6..0ad23a137ec53177cf29fb60390b8ba28f6512ee 100644 (file)
@@ -96,10 +96,10 @@ void W_Plasma_Damage (entity inflictor, entity attacker, float damage, float dea
 
        // note: combos are usually triggered by W_Plasma_TriggerCombo, not damage
        float is_combo = (inflictor.classname == "plasma_chain" || inflictor.classname == "plasma_prim");
 
        // note: combos are usually triggered by W_Plasma_TriggerCombo, not damage
        float is_combo = (inflictor.classname == "plasma_chain" || inflictor.classname == "plasma_prim");
-       
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, (is_combo ? 1 : -1)))
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, (is_combo ? 1 : -1)))
-               return; // g_projectiles_damage says to halt    
-       
+               return; // g_projectiles_damage says to halt
+
        self.health = self.health - damage;
        if (self.health <= 0)
        {
        self.health = self.health - damage;
        if (self.health <= 0)
        {
index b019bcc3163c7cd0e0661b18f8e5c042f17153aa..88e9d770fbf92bb295d5e36afea205dd6162b9f2 100644 (file)
@@ -125,10 +125,10 @@ void W_Fireball_Damage (entity inflictor, entity attacker, float damage, float d
 {
        if(self.health <= 0)
                return;
 {
        if(self.health <= 0)
                return;
-               
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
-               
+
        self.health = self.health - damage;
        if (self.health <= 0)
        {
        self.health = self.health - damage;
        if (self.health <= 0)
        {
@@ -170,7 +170,7 @@ void W_Fireball_Attack1()
        setsize(proj, '-16 -16 -16', '16 16 16');
        proj.flags = FL_PROJECTILE;
     proj.missile_flags = MIF_SPLASH | MIF_PROXY;
        setsize(proj, '-16 -16 -16', '16 16 16');
        proj.flags = FL_PROJECTILE;
     proj.missile_flags = MIF_SPLASH | MIF_PROXY;
-    
+
        CSQCProjectile(proj, TRUE, PROJECTILE_FIREBALL, TRUE);
 
        other = proj; MUTATOR_CALLHOOK(EditProjectile);
        CSQCProjectile(proj, TRUE, PROJECTILE_FIREBALL, TRUE);
 
        other = proj; MUTATOR_CALLHOOK(EditProjectile);
@@ -301,7 +301,7 @@ void W_Fireball_Attack2()
        proj.angles = vectoangles(proj.velocity);
        proj.flags = FL_PROJECTILE;
     proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC;
        proj.angles = vectoangles(proj.velocity);
        proj.flags = FL_PROJECTILE;
     proj.missile_flags = MIF_SPLASH | MIF_PROXY | MIF_ARC;
-    
+
        CSQCProjectile(proj, TRUE, PROJECTILE_FIREMINE, TRUE);
 
        other = proj; MUTATOR_CALLHOOK(EditProjectile);
        CSQCProjectile(proj, TRUE, PROJECTILE_FIREMINE, TRUE);
 
        other = proj; MUTATOR_CALLHOOK(EditProjectile);
index db8913b351ccb3f1acb37e2c649edb4491bf353f..17144d3a53028d2f07ea61751d7f337c19e4e5b4 100644 (file)
@@ -59,12 +59,12 @@ void W_Grenade_Damage (entity inflictor, entity attacker, float damage, float de
 {
        if (self.health <= 0)
                return;
 {
        if (self.health <= 0)
                return;
-               
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
-               
+
        self.health = self.health - damage;
        self.health = self.health - damage;
-       
+
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, self.use);
 }
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, self.use);
 }
@@ -152,10 +152,10 @@ void W_Grenade_Touch2 (void)
                        spamsound (self, CH_SHOTS, "weapons/grenade_bounce6.wav", VOL_BASE, ATTEN_NORM);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
                        spamsound (self, CH_SHOTS, "weapons/grenade_bounce6.wav", VOL_BASE, ATTEN_NORM);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
-               
+
                if (autocvar_g_balance_grenadelauncher_secondary_lifetime_bounce && self.gl_bouncecnt == 1)
                        self.nextthink = time + autocvar_g_balance_grenadelauncher_secondary_lifetime_bounce;
                if (autocvar_g_balance_grenadelauncher_secondary_lifetime_bounce && self.gl_bouncecnt == 1)
                        self.nextthink = time + autocvar_g_balance_grenadelauncher_secondary_lifetime_bounce;
-                       
+
        }
        else if(autocvar_g_balance_grenadelauncher_secondary_type == 2 && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE))) // stick
        {
        }
        else if(autocvar_g_balance_grenadelauncher_secondary_type == 2 && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE))) // stick
        {
index e32af7de58b09ffbf83aeea7ad5d99a9dc46659c..05768fc50b16a7e9bef2415efeba9820c6998cd7 100644 (file)
@@ -34,11 +34,11 @@ void W_Hagar_Damage (entity inflictor, entity attacker, float damage, float deat
 {
        if (self.health <= 0)
                return;
 {
        if (self.health <= 0)
                return;
-               
+
        float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == self.owner) : TRUE)
        float is_linkexplode = ( ((inflictor.owner != world) ? (inflictor.owner == self.owner) : TRUE)
-               && (inflictor.projectiledeathtype & HITTYPE_SECONDARY) 
+               && (inflictor.projectiledeathtype & HITTYPE_SECONDARY)
                && (self.projectiledeathtype & HITTYPE_SECONDARY));
                && (self.projectiledeathtype & HITTYPE_SECONDARY));
-       
+
        if(is_linkexplode)
                is_linkexplode = (is_linkexplode && autocvar_g_balance_hagar_secondary_load_linkexplode);
        else
        if(is_linkexplode)
                is_linkexplode = (is_linkexplode && autocvar_g_balance_hagar_secondary_load_linkexplode);
        else
@@ -49,7 +49,7 @@ void W_Hagar_Damage (entity inflictor, entity attacker, float damage, float deat
 
        self.health = self.health - damage;
        self.angles = vectoangles(self.velocity);
 
        self.health = self.health - damage;
        self.angles = vectoangles(self.velocity);
-       
+
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, self.think);
 }
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, self.think);
 }
@@ -90,13 +90,13 @@ void W_Hagar_Attack (void)
        missile.classname = "missile";
        missile.bot_dodge = TRUE;
        missile.bot_dodgerating = autocvar_g_balance_hagar_primary_damage;
        missile.classname = "missile";
        missile.bot_dodge = TRUE;
        missile.bot_dodgerating = autocvar_g_balance_hagar_primary_damage;
-       
+
        missile.takedamage = DAMAGE_YES;
        missile.health = autocvar_g_balance_hagar_primary_health;
        missile.damageforcescale = autocvar_g_balance_hagar_primary_damageforcescale;
        missile.event_damage = W_Hagar_Damage;
        missile.damagedbycontents = TRUE;
        missile.takedamage = DAMAGE_YES;
        missile.health = autocvar_g_balance_hagar_primary_health;
        missile.damageforcescale = autocvar_g_balance_hagar_primary_damageforcescale;
        missile.event_damage = W_Hagar_Damage;
        missile.damagedbycontents = TRUE;
-       
+
        missile.touch = W_Hagar_Touch;
        missile.use = W_Hagar_Explode;
        missile.think = adaptor_think2use_hittype_splash;
        missile.touch = W_Hagar_Touch;
        missile.use = W_Hagar_Explode;
        missile.think = adaptor_think2use_hittype_splash;
@@ -111,7 +111,7 @@ void W_Hagar_Attack (void)
 
        missile.angles = vectoangles (missile.velocity);
        missile.flags = FL_PROJECTILE;
 
        missile.angles = vectoangles (missile.velocity);
        missile.flags = FL_PROJECTILE;
-       missile.missile_flags = MIF_SPLASH; 
+       missile.missile_flags = MIF_SPLASH;
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
 
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
 
@@ -133,7 +133,7 @@ void W_Hagar_Attack2 (void)
        missile.classname = "missile";
        missile.bot_dodge = TRUE;
        missile.bot_dodgerating = autocvar_g_balance_hagar_secondary_damage;
        missile.classname = "missile";
        missile.bot_dodge = TRUE;
        missile.bot_dodgerating = autocvar_g_balance_hagar_secondary_damage;
-       
+
        missile.takedamage = DAMAGE_YES;
        missile.health = autocvar_g_balance_hagar_secondary_health;
        missile.damageforcescale = autocvar_g_balance_hagar_secondary_damageforcescale;
        missile.takedamage = DAMAGE_YES;
        missile.health = autocvar_g_balance_hagar_secondary_health;
        missile.damageforcescale = autocvar_g_balance_hagar_secondary_damageforcescale;
@@ -155,7 +155,7 @@ void W_Hagar_Attack2 (void)
 
        missile.angles = vectoangles (missile.velocity);
        missile.flags = FL_PROJECTILE;
 
        missile.angles = vectoangles (missile.velocity);
        missile.flags = FL_PROJECTILE;
-       missile.missile_flags = MIF_SPLASH; 
+       missile.missile_flags = MIF_SPLASH;
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR_BOUNCING, TRUE);
 
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR_BOUNCING, TRUE);
 
@@ -193,7 +193,7 @@ void W_Hagar_Attack2_Load_Release (void)
                missile.classname = "missile";
                missile.bot_dodge = TRUE;
                missile.bot_dodgerating = autocvar_g_balance_hagar_secondary_damage;
                missile.classname = "missile";
                missile.bot_dodge = TRUE;
                missile.bot_dodgerating = autocvar_g_balance_hagar_secondary_damage;
-               
+
                missile.takedamage = DAMAGE_YES;
                missile.health = autocvar_g_balance_hagar_secondary_health;
                missile.damageforcescale = autocvar_g_balance_hagar_secondary_damageforcescale;
                missile.takedamage = DAMAGE_YES;
                missile.health = autocvar_g_balance_hagar_secondary_health;
                missile.damageforcescale = autocvar_g_balance_hagar_secondary_damageforcescale;
@@ -209,13 +209,13 @@ void W_Hagar_Attack2_Load_Release (void)
                setorigin (missile, w_shotorg);
                setsize(missile, '0 0 0', '0 0 0');
                missile.movetype = MOVETYPE_FLY;
                setorigin (missile, w_shotorg);
                setsize(missile, '0 0 0', '0 0 0');
                missile.movetype = MOVETYPE_FLY;
-               missile.missile_flags = MIF_SPLASH; 
-               
+               missile.missile_flags = MIF_SPLASH;
+
                // per-shot spread calculation: the more shots there are, the less spread is applied (based on the bias cvar)
                // per-shot spread calculation: the more shots there are, the less spread is applied (based on the bias cvar)
-               spread_pershot = ((shots - 1) / (autocvar_g_balance_hagar_secondary_load_max - 1)); 
+               spread_pershot = ((shots - 1) / (autocvar_g_balance_hagar_secondary_load_max - 1));
                spread_pershot = (1 - (spread_pershot * autocvar_g_balance_hagar_secondary_load_spread_bias));
                spread_pershot = (autocvar_g_balance_hagar_secondary_spread * spread_pershot * g_weaponspreadfactor);
                spread_pershot = (1 - (spread_pershot * autocvar_g_balance_hagar_secondary_load_spread_bias));
                spread_pershot = (autocvar_g_balance_hagar_secondary_spread * spread_pershot * g_weaponspreadfactor);
-               
+
                // pattern spread calculation
                s = '0 0 0';
                if (counter == 0)
                // pattern spread calculation
                s = '0 0 0';
                if (counter == 0)
@@ -227,7 +227,7 @@ void W_Hagar_Attack2_Load_Release (void)
                        s_z = v_forward_y;
                }
                s = s * autocvar_g_balance_hagar_secondary_load_spread * g_weaponspreadfactor;
                        s_z = v_forward_y;
                }
                s = s * autocvar_g_balance_hagar_secondary_load_spread * g_weaponspreadfactor;
-               
+
                W_SetupProjectileVelocityEx(missile, w_shotdir + right * s_y + up * s_z, v_up, autocvar_g_balance_hagar_secondary_speed, 0, 0, spread_pershot, FALSE);
 
                missile.angles = vectoangles (missile.velocity);
                W_SetupProjectileVelocityEx(missile, w_shotdir + right * s_y + up * s_z, v_up, autocvar_g_balance_hagar_secondary_speed, 0, 0, spread_pershot, FALSE);
 
                missile.angles = vectoangles (missile.velocity);
@@ -246,7 +246,7 @@ void W_Hagar_Attack2_Load_Release (void)
 void W_Hagar_Attack2_Load (void)
 {
        // loadable hagar secondary attack, must always run each frame
 void W_Hagar_Attack2_Load (void)
 {
        // loadable hagar secondary attack, must always run each frame
-       
+
        if(time < game_starttime)
                return;
 
        if(time < game_starttime)
                return;
 
@@ -322,7 +322,7 @@ void W_Hagar_Attack2_Load (void)
                                self.hagar_warning = TRUE;
                        }
                }
                                self.hagar_warning = TRUE;
                        }
                }
-               
+
                // release if player let go of button or if they've held it in too long
                if(!self.BUTTON_ATCK2 || ((loaded || !enough_ammo) && self.hagar_loadstep < time && autocvar_g_balance_hagar_secondary_load_hold >= 0))
                {
                // release if player let go of button or if they've held it in too long
                if(!self.BUTTON_ATCK2 || ((loaded || !enough_ammo) && self.hagar_loadstep < time && autocvar_g_balance_hagar_secondary_load_hold >= 0))
                {
index 520c49261a286c3e25ac79b4d93f7b442f1f96ee..5642ef057798ce32892fccfe9459a774f7552a43 100644 (file)
@@ -18,7 +18,7 @@ void W_HLAC_Touch (void)
        PROJECTILE_TOUCH;
 
        self.event_damage = func_null;
        PROJECTILE_TOUCH;
 
        self.event_damage = func_null;
-       
+
        if(self.projectiledeathtype & HITTYPE_SECONDARY)
                RadiusDamage (self, self.realowner, autocvar_g_balance_hlac_secondary_damage, autocvar_g_balance_hlac_secondary_edgedamage, autocvar_g_balance_hlac_secondary_radius, world, autocvar_g_balance_hlac_secondary_force, self.projectiledeathtype, other);
        else
        if(self.projectiledeathtype & HITTYPE_SECONDARY)
                RadiusDamage (self, self.realowner, autocvar_g_balance_hlac_secondary_damage, autocvar_g_balance_hlac_secondary_edgedamage, autocvar_g_balance_hlac_secondary_radius, world, autocvar_g_balance_hlac_secondary_force, self.projectiledeathtype, other);
        else
@@ -112,7 +112,7 @@ void W_HLAC_Attack2f (void)
     missile.nextthink = time + autocvar_g_balance_hlac_secondary_lifetime;
 
        missile.flags = FL_PROJECTILE;
     missile.nextthink = time + autocvar_g_balance_hlac_secondary_lifetime;
 
        missile.flags = FL_PROJECTILE;
-       missile.missile_flags = MIF_SPLASH; 
+       missile.missile_flags = MIF_SPLASH;
        missile.projectiledeathtype = WEP_HLAC | HITTYPE_SECONDARY;
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HLAC, TRUE);
        missile.projectiledeathtype = WEP_HLAC | HITTYPE_SECONDARY;
 
        CSQCProjectile(missile, TRUE, PROJECTILE_HLAC, TRUE);
index 4cef3844113ffa226ea1c16a99d727583febb0f8..f0310c702e7399967d3226758b217b0d44b06301 100644 (file)
@@ -66,12 +66,12 @@ void W_Hook_Damage (entity inflictor, entity attacker, float damage, float death
 {
        if (self.health <= 0)
                return;
 {
        if (self.health <= 0)
                return;
-               
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
-               return; // g_projectiles_damage says to halt    
-       
+               return; // g_projectiles_damage says to halt
+
        self.health = self.health - damage;
        self.health = self.health - damage;
-       
+
        if (self.health <= 0)
                W_PrepareExplosionByDamage(self.realowner, W_Hook_Explode2);
 }
        if (self.health <= 0)
                W_PrepareExplosionByDamage(self.realowner, W_Hook_Explode2);
 }
@@ -104,7 +104,7 @@ void W_Hook_Attack2()
        gren.think = adaptor_think2use_hittype_splash;
        gren.use = W_Hook_Explode2;
        gren.touch = W_Hook_Touch2;
        gren.think = adaptor_think2use_hittype_splash;
        gren.use = W_Hook_Explode2;
        gren.touch = W_Hook_Touch2;
-       
+
        gren.takedamage = DAMAGE_YES;
        gren.health = autocvar_g_balance_hook_secondary_health;
        gren.damageforcescale = autocvar_g_balance_hook_secondary_damageforcescale;
        gren.takedamage = DAMAGE_YES;
        gren.health = autocvar_g_balance_hook_secondary_health;
        gren.damageforcescale = autocvar_g_balance_hook_secondary_damageforcescale;
@@ -141,7 +141,7 @@ void spawnfunc_weapon_hook (void)
 float w_hook(float req)
 {
        float hooked_time_max, hooked_fuel;
 float w_hook(float req)
 {
        float hooked_time_max, hooked_fuel;
-               
+
        if (req == WR_AIM)
        {
                // ... sorry ...
        if (req == WR_AIM)
        {
                // ... sorry ...
@@ -158,7 +158,7 @@ float w_hook(float req)
                        {
                                W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_hook_primary_fuel, FALSE);
                                self.hook_state |= HOOK_FIRING;
                        {
                                W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_hook_primary_fuel, FALSE);
                                self.hook_state |= HOOK_FIRING;
-                               weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hook_primary_animtime, w_ready);                         
+                               weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hook_primary_animtime, w_ready);
                        }
                }
 
                        }
                }
 
@@ -183,13 +183,13 @@ float w_hook(float req)
 
                if(self.hook && self.hook.state == 1)
                {
 
                if(self.hook && self.hook.state == 1)
                {
-                       hooked_time_max = autocvar_g_balance_hook_primary_hooked_time_max;                      
+                       hooked_time_max = autocvar_g_balance_hook_primary_hooked_time_max;
                        if (hooked_time_max > 0)
                        {
                                if ( time > self.hook_time_hooked + hooked_time_max )
                                        self.hook_state |= HOOK_REMOVING;
                        }
                        if (hooked_time_max > 0)
                        {
                                if ( time > self.hook_time_hooked + hooked_time_max )
                                        self.hook_state |= HOOK_REMOVING;
                        }
-                       
+
                        hooked_fuel = autocvar_g_balance_hook_primary_hooked_fuel;
                        if (hooked_fuel > 0)
                        {
                        hooked_fuel = autocvar_g_balance_hook_primary_hooked_fuel;
                        if (hooked_fuel > 0)
                        {
@@ -215,7 +215,7 @@ float w_hook(float req)
                }
                else
                {
                }
                else
                {
-                       self.hook_time_hooked = time;                           
+                       self.hook_time_hooked = time;
                        self.hook_time_fueldecrease = time + autocvar_g_balance_hook_primary_hooked_time_free;
                }
 
                        self.hook_time_fueldecrease = time + autocvar_g_balance_hook_primary_hooked_time_free;
                }
 
index ac8cbf1c1d6e38d7b7d543d8b074edd40c1adf23..0a0704638c63aeebf2171f70cfaa2ae75f09f79b 100644 (file)
@@ -74,7 +74,7 @@ void W_Laser_Attack (float issecondary)
        missile.touch = W_Laser_Touch;
 
        missile.flags = FL_PROJECTILE;
        missile.touch = W_Laser_Touch;
 
        missile.flags = FL_PROJECTILE;
-       missile.missile_flags = MIF_SPLASH; 
+       missile.missile_flags = MIF_SPLASH;
 
        missile.think = W_Laser_Think;
        missile.nextthink = time + autocvar_g_balance_laser_primary_delay;
 
        missile.think = W_Laser_Think;
        missile.nextthink = time + autocvar_g_balance_laser_primary_delay;
index 0db02d74f8f73c69e6d69de7920db35e93f30ce8..5d88df8b254ac08be41bcec0422d0af8a464a34c 100644 (file)
@@ -182,7 +182,7 @@ void W_Mine_Think (void)
                        self.movetype = MOVETYPE_NONE;
                }
        }
                        self.movetype = MOVETYPE_NONE;
                }
        }
-       
+
        // our lifetime has expired, it's time to die - mine_time just allows us to play a sound for this
        // TODO: replace this mine_trigger.wav sound with a real countdown
        if ((time > self.cnt) && (!self.mine_time))
        // our lifetime has expired, it's time to die - mine_time just allows us to play a sound for this
        // TODO: replace this mine_trigger.wav sound with a real countdown
        if ((time > self.cnt) && (!self.mine_time))
@@ -258,15 +258,15 @@ void W_Mine_Damage (entity inflictor, entity attacker, float damage, float death
 {
        if (self.health <= 0)
                return;
 {
        if (self.health <= 0)
                return;
-               
+
        float is_from_enemy = (inflictor.realowner != self.realowner);
        float is_from_enemy = (inflictor.realowner != self.realowner);
-               
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, (is_from_enemy ? 1 : -1)))
                return; // g_projectiles_damage says to halt
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, (is_from_enemy ? 1 : -1)))
                return; // g_projectiles_damage says to halt
-               
+
        self.health = self.health - damage;
        self.angles = vectoangles(self.velocity);
        self.health = self.health - damage;
        self.angles = vectoangles(self.velocity);
-       
+
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, W_Mine_Explode);
 }
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, W_Mine_Explode);
 }
@@ -337,7 +337,7 @@ void W_Mine_Attack (void)
        // common properties
 
        other = mine; MUTATOR_CALLHOOK(EditProjectile);
        // common properties
 
        other = mine; MUTATOR_CALLHOOK(EditProjectile);
-       
+
        self.minelayer_mines = W_Mine_Count(self);
 }
 
        self.minelayer_mines = W_Mine_Count(self);
 }
 
index 1bd4e11bd40b130c1db373ce141f2b1255e9f499..9fb80c6d515d3a03bfee39e7efccea6f4fce6792 100644 (file)
@@ -74,7 +74,7 @@ void W_MinstaNex_Attack (void)
                                WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, v);
                        break;
        }
                                WarpZone_TrailParticles(world, particleeffectnum("TE_TEI_G3"), w_shotorg, v);
                        break;
        }
-       
+
        W_DecreaseAmmo(ammo_cells, ((g_minstagib) ? 1 : autocvar_g_balance_minstanex_ammo), autocvar_g_balance_minstanex_reload_ammo);
 }
 
        W_DecreaseAmmo(ammo_cells, ((g_minstagib) ? 1 : autocvar_g_balance_minstanex_ammo), autocvar_g_balance_minstanex_reload_ammo);
 }
 
@@ -117,7 +117,7 @@ float w_minstanex(float req)
                        {
                                // handle refire manually, so that primary and secondary can be fired without conflictions (important for minstagib)
                                self.jump_interval = time + autocvar_g_balance_minstanex_laser_refire * W_WeaponRateFactor();
                        {
                                // handle refire manually, so that primary and secondary can be fired without conflictions (important for minstagib)
                                self.jump_interval = time + autocvar_g_balance_minstanex_laser_refire * W_WeaponRateFactor();
-                               
+
                                // decrease ammo for the laser?
                                if(autocvar_g_balance_minstanex_laser_ammo)
                                        W_DecreaseAmmo(ammo_cells, autocvar_g_balance_minstanex_laser_ammo, autocvar_g_balance_minstanex_reload_ammo);
                                // decrease ammo for the laser?
                                if(autocvar_g_balance_minstanex_laser_ammo)
                                        W_DecreaseAmmo(ammo_cells, autocvar_g_balance_minstanex_laser_ammo, autocvar_g_balance_minstanex_reload_ammo);
@@ -128,7 +128,7 @@ float w_minstanex(float req)
                                self.weapon = WEP_LASER;
                                W_Laser_Attack(2);
                                self.weapon = w;
                                self.weapon = WEP_LASER;
                                W_Laser_Attack(2);
                                self.weapon = w;
-                               
+
                                // now do normal refire
                                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_minstanex_laser_animtime, w_ready);
                        }
                                // now do normal refire
                                weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_minstanex_laser_animtime, w_ready);
                        }
index d6f737037ed4f71bb7d4e8535f1452224527f3eb..919e27e5ae81b96022f65deeb5ffd6d6b9439178 100644 (file)
@@ -76,7 +76,7 @@ void W_Nex_Attack (float issecondary)
        FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX);
 
        if(yoda && flying)
        FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX);
 
        if(yoda && flying)
-               Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA); 
+               Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
 
        //beam and muzzle flash done on client
        SendCSQCNexBeamParticle(charge);
 
        //beam and muzzle flash done on client
        SendCSQCNexBeamParticle(charge);
@@ -231,7 +231,7 @@ float w_nex(float req)
                {
                        // don't allow charging if we don't have enough ammo
                        ammo_amount = self.ammo_cells >= autocvar_g_balance_nex_secondary_ammo;
                {
                        // don't allow charging if we don't have enough ammo
                        ammo_amount = self.ammo_cells >= autocvar_g_balance_nex_secondary_ammo;
-                       ammo_amount += self.(weapon_load[WEP_NEX]) >= autocvar_g_balance_nex_secondary_ammo;    
+                       ammo_amount += self.(weapon_load[WEP_NEX]) >= autocvar_g_balance_nex_secondary_ammo;
                        return ammo_amount;
                }
                else
                        return ammo_amount;
                }
                else
index fd851c207d5cd73d42453cc61f00a338f381b6d4..6cd8929f6f70bcf276de5cb39864b4c657d6a843 100644 (file)
@@ -207,13 +207,13 @@ void W_Rocket_Damage (entity inflictor, entity attacker, float damage, float dea
 {
        if (self.health <= 0)
                return;
 {
        if (self.health <= 0)
                return;
-       
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
-               
+
        self.health = self.health - damage;
        self.angles = vectoangles(self.velocity);
        self.health = self.health - damage;
        self.angles = vectoangles(self.velocity);
-       
+
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, W_Rocket_Explode);
 }
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, W_Rocket_Explode);
 }
@@ -260,7 +260,7 @@ void W_Rocket_Attack (void)
        missile.nextthink = time;
        missile.cnt = time + autocvar_g_balance_rocketlauncher_lifetime;
        missile.flags = FL_PROJECTILE;
        missile.nextthink = time;
        missile.cnt = time + autocvar_g_balance_rocketlauncher_lifetime;
        missile.flags = FL_PROJECTILE;
-       missile.missile_flags = MIF_SPLASH; 
+       missile.missile_flags = MIF_SPLASH;
 
        CSQCProjectile(missile, autocvar_g_balance_rocketlauncher_guiderate == 0 && autocvar_g_balance_rocketlauncher_speedaccel == 0, PROJECTILE_ROCKET, FALSE); // because of fly sound
 
 
        CSQCProjectile(missile, autocvar_g_balance_rocketlauncher_guiderate == 0 && autocvar_g_balance_rocketlauncher_speedaccel == 0, PROJECTILE_ROCKET, FALSE); // because of fly sound
 
index ba580e702ee5e6348c1e1c9ec9c227dcfbbd53d6..c870f0868eaaff99b084721dd15a0effe3104ff5 100644 (file)
@@ -84,7 +84,7 @@ void Seeker_Missile_Think()
                        // Calc how important it is that we turn and add this to the desierd (enemy) dir.
                        desireddir  = normalize(((trace_plane_normal * (1 - trace_fraction)) + (desireddir * trace_fraction)) * 0.5);
                }
                        // Calc how important it is that we turn and add this to the desierd (enemy) dir.
                        desireddir  = normalize(((trace_plane_normal * (1 - trace_fraction)) + (desireddir * trace_fraction)) * 0.5);
                }
-               
+
                newdir = normalize(olddir + desireddir * turnrate); // take the average of the 2 directions; not the best method but simple & easy
                self.velocity = newdir * spd; // make me fly in the new direction at my flight speed
        }
                newdir = normalize(olddir + desireddir * turnrate); // take the average of the 2 directions; not the best method but simple & easy
                self.velocity = newdir * spd; // make me fly in the new direction at my flight speed
        }
@@ -136,7 +136,7 @@ void Seeker_Missile_Damage (entity inflictor, entity attacker, float damage, flo
 {
        if (self.health <= 0)
                return;
 {
        if (self.health <= 0)
                return;
-               
+
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
 
        if (!W_CheckProjectileDamage(inflictor.realowner, self.realowner, deathtype, -1)) // no exceptions
                return; // g_projectiles_damage says to halt
 
@@ -144,7 +144,7 @@ void Seeker_Missile_Damage (entity inflictor, entity attacker, float damage, flo
                self.health = self.health - (damage * 0.25);
        else
                self.health = self.health - damage;
                self.health = self.health - (damage * 0.25);
        else
                self.health = self.health - damage;
-               
+
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, Seeker_Missile_Explode);
 }
        if (self.health <= 0)
                W_PrepareExplosionByDamage(attacker, Seeker_Missile_Explode);
 }
@@ -206,10 +206,10 @@ void Seeker_Fire_Missile(vector f_diff, entity m_target)
        missile.damageforcescale = autocvar_g_balance_seeker_missile_damageforcescale;
        missile.damagedbycontents = TRUE;
        //missile.think           = Seeker_Missile_Animate; // csqc projectiles.
        missile.damageforcescale = autocvar_g_balance_seeker_missile_damageforcescale;
        missile.damagedbycontents = TRUE;
        //missile.think           = Seeker_Missile_Animate; // csqc projectiles.
-       
+
        if (missile.enemy != world)
                missile.projectiledeathtype = WEP_SEEKER | HITTYPE_SECONDARY;
        if (missile.enemy != world)
                missile.projectiledeathtype = WEP_SEEKER | HITTYPE_SECONDARY;
-       else 
+       else
                missile.projectiledeathtype = WEP_SEEKER;
 
 
                missile.projectiledeathtype = WEP_SEEKER;
 
 
@@ -218,7 +218,7 @@ void Seeker_Fire_Missile(vector f_diff, entity m_target)
        missile.movetype    = MOVETYPE_FLYMISSILE;
        missile.flags       = FL_PROJECTILE;
        missile.missile_flags = MIF_SPLASH | MIF_GUIDED_TAG;
        missile.movetype    = MOVETYPE_FLYMISSILE;
        missile.flags       = FL_PROJECTILE;
        missile.missile_flags = MIF_SPLASH | MIF_GUIDED_TAG;
-       
+
        W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_missile);
 
        missile.angles = vectoangles (missile.velocity);
        W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_missile);
 
        missile.angles = vectoangles (missile.velocity);
@@ -229,7 +229,7 @@ void Seeker_Fire_Missile(vector f_diff, entity m_target)
 }
 
 // ============================
 }
 
 // ============================
-// Begin: FLAC, close range attack meant for defeating rockets which are coming at you. 
+// Begin: FLAC, close range attack meant for defeating rockets which are coming at you.
 // ============================
 void Seeker_Flac_Explode ()
 {
 // ============================
 void Seeker_Flac_Explode ()
 {
@@ -283,23 +283,23 @@ void Seeker_Fire_Flac()
        missile.bot_dodge               = TRUE;
        missile.bot_dodgerating = autocvar_g_balance_seeker_flac_damage;
        missile.touch                   = Seeker_Flac_Explode;
        missile.bot_dodge               = TRUE;
        missile.bot_dodgerating = autocvar_g_balance_seeker_flac_damage;
        missile.touch                   = Seeker_Flac_Explode;
-       missile.use                     = Seeker_Flac_Explode; 
+       missile.use                     = Seeker_Flac_Explode;
        missile.think                   = adaptor_think2use_hittype_splash;
        missile.nextthink               = time + autocvar_g_balance_seeker_flac_lifetime + autocvar_g_balance_seeker_flac_lifetime_rand;
        missile.solid                   = SOLID_BBOX;
        missile.think                   = adaptor_think2use_hittype_splash;
        missile.nextthink               = time + autocvar_g_balance_seeker_flac_lifetime + autocvar_g_balance_seeker_flac_lifetime_rand;
        missile.solid                   = SOLID_BBOX;
-       missile.movetype                = MOVETYPE_FLY; 
+       missile.movetype                = MOVETYPE_FLY;
        missile.projectiledeathtype = WEP_SEEKER;
        missile.projectiledeathtype = WEP_SEEKER | HITTYPE_SECONDARY;
        missile.flags                           = FL_PROJECTILE;
        missile.projectiledeathtype = WEP_SEEKER;
        missile.projectiledeathtype = WEP_SEEKER | HITTYPE_SECONDARY;
        missile.flags                           = FL_PROJECTILE;
-       missile.missile_flags       = MIF_SPLASH; 
-       
+       missile.missile_flags       = MIF_SPLASH;
+
        // csqc projectiles
        // csqc projectiles
-       //missile.angles                                = vectoangles (missile.velocity);       
-       //missile.scale = 0.4; // BUG: the model is too big 
-       
+       //missile.angles                                = vectoangles (missile.velocity);
+       //missile.scale = 0.4; // BUG: the model is too big
+
        setorigin (missile, w_shotorg);
        setsize (missile, '-2 -2 -2', '2 2 2');
        setorigin (missile, w_shotorg);
        setsize (missile, '-2 -2 -2', '2 2 2');
-               
+
        W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_flac);
        CSQCProjectile(missile, TRUE, PROJECTILE_FLAC, TRUE);
 
        W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_flac);
        CSQCProjectile(missile, TRUE, PROJECTILE_FLAC, TRUE);
 
@@ -307,22 +307,22 @@ void Seeker_Fire_Flac()
 }
 
 // ============================
 }
 
 // ============================
-// Begin: Tag and rocket controllers 
+// Begin: Tag and rocket controllers
 // ============================
 entity Seeker_Tagged_Info(entity isowner, entity istarget)
 {
        entity tag;
 // ============================
 entity Seeker_Tagged_Info(entity isowner, entity istarget)
 {
        entity tag;
-       for(tag = world; (tag = find(tag, classname, "tag_tracker")); ) 
+       for(tag = world; (tag = find(tag, classname, "tag_tracker")); )
                if ((tag.realowner == isowner) && (tag.tag_target == istarget))
                        return tag;
                if ((tag.realowner == isowner) && (tag.tag_target == istarget))
                        return tag;
-               
+
        return world;
 }
 
 void Seeker_Attack()
 {
        entity tracker, closest_target;
        return world;
 }
 
 void Seeker_Attack()
 {
        entity tracker, closest_target;
-       
+
        closest_target = world;
        for(tracker = world; (tracker = find(tracker, classname, "tag_tracker")); ) if (tracker.realowner == self)
        {
        closest_target = world;
        for(tracker = world; (tracker = find(tracker, classname, "tag_tracker")); ) if (tracker.realowner == self)
        {
@@ -331,14 +331,14 @@ void Seeker_Attack()
                        if (vlen(self.origin - tracker.tag_target.origin) < vlen(self.origin - closest_target.origin))
                                closest_target = tracker.tag_target;
                }
                        if (vlen(self.origin - tracker.tag_target.origin) < vlen(self.origin - closest_target.origin))
                                closest_target = tracker.tag_target;
                }
-               else 
+               else
                        closest_target = tracker.tag_target;
        }
                        closest_target = tracker.tag_target;
        }
-               
+
        traceline(self.origin + self.view_ofs, closest_target.origin, MOVE_NOMONSTERS, self);
        if ((!closest_target) || ((trace_fraction < 1) && (trace_ent != closest_target)))
                closest_target = world;
        traceline(self.origin + self.view_ofs, closest_target.origin, MOVE_NOMONSTERS, self);
        if ((!closest_target) || ((trace_fraction < 1) && (trace_ent != closest_target)))
                closest_target = world;
-       
+
        Seeker_Fire_Missile('0 0 0', closest_target);
 }
 
        Seeker_Fire_Missile('0 0 0', closest_target);
 }
 
@@ -355,13 +355,13 @@ void Seeker_Vollycontroller_Think() // TODO: Merge this with Seeker_Attack
        }
 
        self.nextthink = time + autocvar_g_balance_seeker_missile_delay * W_WeaponRateFactor();
        }
 
        self.nextthink = time + autocvar_g_balance_seeker_missile_delay * W_WeaponRateFactor();
-       
+
        oldself = self;
        self = self.realowner;
        oldself = self;
        self = self.realowner;
-       
+
        oldenemy = self.enemy;
        self.enemy = oldself.enemy;
        oldenemy = self.enemy;
        self.enemy = oldself.enemy;
-       
+
        c = mod(self.cnt, 4);
        switch(c)
        {
        c = mod(self.cnt, 4);
        switch(c)
        {
@@ -384,7 +384,7 @@ void Seeker_Vollycontroller_Think() // TODO: Merge this with Seeker_Attack
        self = oldself;
 }
 
        self = oldself;
 }
 
-void Seeker_Tracker_Think() 
+void Seeker_Tracker_Think()
 {
        // commit suicide if: You die OR target dies OR you switch away from the seeker OR commit suicide if lifetime is up
        if ((self.realowner.deadflag != DEAD_NO) || (self.tag_target.deadflag != DEAD_NO) || (self.realowner.switchweapon != WEP_SEEKER)
 {
        // commit suicide if: You die OR target dies OR you switch away from the seeker OR commit suicide if lifetime is up
        if ((self.realowner.deadflag != DEAD_NO) || (self.tag_target.deadflag != DEAD_NO) || (self.realowner.switchweapon != WEP_SEEKER)
@@ -397,13 +397,13 @@ void Seeker_Tracker_Think()
                }
                return;
        }
                }
                return;
        }
-       
+
        // Update the think method information
        self.nextthink = time;
 }
 
 // ============================
        // Update the think method information
        self.nextthink = time;
 }
 
 // ============================
-// Begin: Tag projectile 
+// Begin: Tag projectile
 // ============================
 void Seeker_Tag_Explode ()
 {
 // ============================
 void Seeker_Tag_Explode ()
 {
@@ -428,7 +428,7 @@ void Seeker_Tag_Touch()
        vector dir;
        vector org2;
        entity e;
        vector dir;
        vector org2;
        entity e;
-       
+
        PROJECTILE_TOUCH;
 
        dir     = normalize (self.realowner.origin - self.origin);
        PROJECTILE_TOUCH;
 
        dir     = normalize (self.realowner.origin - self.origin);
@@ -443,38 +443,38 @@ void Seeker_Tag_Touch()
        {
                // check to see if this person is already tagged by me
                entity tag = Seeker_Tagged_Info(self.realowner, other);
        {
                // check to see if this person is already tagged by me
                entity tag = Seeker_Tagged_Info(self.realowner, other);
-               
+
                if (tag != world)
                {
                        if (other.wps_tag_tracker && (autocvar_g_balance_seeker_type == 1)) // don't attach another waypointsprite without killing the old one first
                                WaypointSprite_Kill(other.wps_tag_tracker);
                if (tag != world)
                {
                        if (other.wps_tag_tracker && (autocvar_g_balance_seeker_type == 1)) // don't attach another waypointsprite without killing the old one first
                                WaypointSprite_Kill(other.wps_tag_tracker);
-                               
+
                        tag.tag_time = time;
                }
                else
                        tag.tag_time = time;
                }
                else
-               {               
+               {
                        //sprint(self.realowner, strcat("You just tagged ^2", other.netname, "^7 with a tracking device!\n"));
                        e             = spawn();
                        e.cnt         = autocvar_g_balance_seeker_missile_count;
                        e.classname   = "tag_tracker";
                        e.owner       = self.owner;
                        e.realowner   = self.realowner;
                        //sprint(self.realowner, strcat("You just tagged ^2", other.netname, "^7 with a tracking device!\n"));
                        e             = spawn();
                        e.cnt         = autocvar_g_balance_seeker_missile_count;
                        e.classname   = "tag_tracker";
                        e.owner       = self.owner;
                        e.realowner   = self.realowner;
-                       
+
                        if      (autocvar_g_balance_seeker_type == 1)
                        {
                                e.tag_target  = other;
                                e.tag_time    = time;
                                e.think       = Seeker_Tracker_Think;
                        }
                        if      (autocvar_g_balance_seeker_type == 1)
                        {
                                e.tag_target  = other;
                                e.tag_time    = time;
                                e.think       = Seeker_Tracker_Think;
                        }
-                       else 
+                       else
                        {
                                e.enemy     = other;
                                e.think     = Seeker_Vollycontroller_Think;
                        }
                        {
                                e.enemy     = other;
                                e.think     = Seeker_Vollycontroller_Think;
                        }
-                       
+
                        e.nextthink   = time;
                }
                        e.nextthink   = time;
                }
-               
+
                if      (autocvar_g_balance_seeker_type == 1)
                {
                        WaypointSprite_Spawn("tagged-target", autocvar_g_balance_seeker_tag_tracker_lifetime, 0, other, '0 0 64', self.realowner, 0, other, wps_tag_tracker, TRUE, RADARICON_TAGGED, '0.5 1 0');
                if      (autocvar_g_balance_seeker_type == 1)
                {
                        WaypointSprite_Spawn("tagged-target", autocvar_g_balance_seeker_tag_tracker_lifetime, 0, other, '0 0 64', self.realowner, 0, other, wps_tag_tracker, TRUE, RADARICON_TAGGED, '0.5 1 0');
@@ -513,7 +513,7 @@ void Seeker_Fire_Tag()
        setsize (missile, '-2 -2 -2', '2 2 2');
 
        missile.flags       = FL_PROJECTILE;
        setsize (missile, '-2 -2 -2', '2 2 2');
 
        missile.flags       = FL_PROJECTILE;
-       //missile.missile_flags = MIF_..?; 
+       //missile.missile_flags = MIF_..?;
 
        missile.movetype    = MOVETYPE_FLY;
        W_SETUPPROJECTILEVELOCITY(missile, g_balance_seeker_tag);
 
        missile.movetype    = MOVETYPE_FLY;
        W_SETUPPROJECTILEVELOCITY(missile, g_balance_seeker_tag);
@@ -538,7 +538,7 @@ float w_seeker(float req)
 
        if (req == WR_AIM)
        {
 
        if (req == WR_AIM)
        {
-               if (autocvar_g_balance_seeker_type == 1) 
+               if (autocvar_g_balance_seeker_type == 1)
                        if (Seeker_Tagged_Info(self, self.enemy) != world)
                                self.BUTTON_ATCK = bot_aim(autocvar_g_balance_seeker_missile_speed_max, 0, autocvar_g_balance_seeker_missile_lifetime, FALSE);
                        else
                        if (Seeker_Tagged_Info(self, self.enemy) != world)
                                self.BUTTON_ATCK = bot_aim(autocvar_g_balance_seeker_missile_speed_max, 0, autocvar_g_balance_seeker_missile_lifetime, FALSE);
                        else
@@ -550,10 +550,10 @@ float w_seeker(float req)
        {
                if(autocvar_g_balance_seeker_reload_ammo && self.clip_load < min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo)) // forced reload
                        weapon_action(self.weapon, WR_RELOAD);
        {
                if(autocvar_g_balance_seeker_reload_ammo && self.clip_load < min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo)) // forced reload
                        weapon_action(self.weapon, WR_RELOAD);
-                       
+
                else if (self.BUTTON_ATCK)
                {
                else if (self.BUTTON_ATCK)
                {
-                       if (autocvar_g_balance_seeker_type == 1) 
+                       if (autocvar_g_balance_seeker_type == 1)
                        {
                                if (weapon_prepareattack(0, autocvar_g_balance_seeker_missile_refire))
                                {
                        {
                                if (weapon_prepareattack(0, autocvar_g_balance_seeker_missile_refire))
                                {
@@ -561,7 +561,7 @@ float w_seeker(float req)
                                        weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_missile_animtime, w_ready);
                                }
                        }
                                        weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_missile_animtime, w_ready);
                                }
                        }
-                       else 
+                       else
                        {
                                if (weapon_prepareattack(0, autocvar_g_balance_seeker_tag_refire))
                                {
                        {
                                if (weapon_prepareattack(0, autocvar_g_balance_seeker_tag_refire))
                                {
@@ -573,7 +573,7 @@ float w_seeker(float req)
 
                else if (self.BUTTON_ATCK2)
                {
 
                else if (self.BUTTON_ATCK2)
                {
-                       if (autocvar_g_balance_seeker_type == 1) 
+                       if (autocvar_g_balance_seeker_type == 1)
                        {
                                if (weapon_prepareattack(0, autocvar_g_balance_seeker_tag_refire))
                                {
                        {
                                if (weapon_prepareattack(0, autocvar_g_balance_seeker_tag_refire))
                                {
@@ -581,7 +581,7 @@ float w_seeker(float req)
                                        weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_tag_animtime, w_ready);
                                }
                        }
                                        weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_tag_animtime, w_ready);
                                }
                        }
-                       else 
+                       else
                        {
                                if (weapon_prepareattack(0, autocvar_g_balance_seeker_flac_refire))
                                {
                        {
                                if (weapon_prepareattack(0, autocvar_g_balance_seeker_flac_refire))
                                {
@@ -608,7 +608,7 @@ float w_seeker(float req)
        }
        else if (req == WR_CHECKAMMO1)
        {
        }
        else if (req == WR_CHECKAMMO1)
        {
-               if (autocvar_g_balance_seeker_type == 1) 
+               if (autocvar_g_balance_seeker_type == 1)
                {
                        ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_missile_ammo;
                        ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_missile_ammo;
                {
                        ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_missile_ammo;
                        ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_missile_ammo;
@@ -618,12 +618,12 @@ float w_seeker(float req)
                        ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_tag_ammo;
                        ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_tag_ammo;
                }
                        ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_tag_ammo;
                        ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_tag_ammo;
                }
-               
+
                return ammo_amount;
        }
        else if (req == WR_CHECKAMMO2)
        {
                return ammo_amount;
        }
        else if (req == WR_CHECKAMMO2)
        {
-               if (autocvar_g_balance_seeker_type == 1) 
+               if (autocvar_g_balance_seeker_type == 1)
                {
                        ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_tag_ammo;
                        ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_tag_ammo;
                {
                        ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_tag_ammo;
                        ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_tag_ammo;
@@ -633,7 +633,7 @@ float w_seeker(float req)
                        ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_flac_ammo;
                        ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_flac_ammo;
                }
                        ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_flac_ammo;
                        ammo_amount += self.(weapon_load[WEP_SEEKER]) >= autocvar_g_balance_seeker_flac_ammo;
                }
-               
+
                return ammo_amount;
        }
        else if (req == WR_RELOAD)
                return ammo_amount;
        }
        else if (req == WR_RELOAD)
index 5b2672fecaa7638cdc3ffdac81b964ae0e1749f8..a40a2da4b7c1d7aedeb41f180cb60bfdaa4666a5 100644 (file)
@@ -67,66 +67,66 @@ void shotgun_meleethink (void)
 
        if(!self.cnt) // set start time of melee
        {
 
        if(!self.cnt) // set start time of melee
        {
-               self.cnt = time; 
+               self.cnt = time;
                W_PlayStrengthSound(self.realowner);
        }
 
        makevectors(self.realowner.v_angle); // update values for v_* vectors
                W_PlayStrengthSound(self.realowner);
        }
 
        makevectors(self.realowner.v_angle); // update values for v_* vectors
-       
+
        // calculate swing percentage based on time
        meleetime = autocvar_g_balance_shotgun_secondary_melee_time * W_WeaponRateFactor();
        swing = bound(0, (self.cnt + meleetime - time) / meleetime, 10);
        f = ((1 - swing) * autocvar_g_balance_shotgun_secondary_melee_traces);
        // calculate swing percentage based on time
        meleetime = autocvar_g_balance_shotgun_secondary_melee_time * W_WeaponRateFactor();
        swing = bound(0, (self.cnt + meleetime - time) / meleetime, 10);
        f = ((1 - swing) * autocvar_g_balance_shotgun_secondary_melee_traces);
-       
+
        // check to see if we can still continue, otherwise give up now
        if((self.realowner.deadflag != DEAD_NO) && autocvar_g_balance_shotgun_secondary_melee_no_doubleslap)
        {
                remove(self);
                return;
        }
        // check to see if we can still continue, otherwise give up now
        if((self.realowner.deadflag != DEAD_NO) && autocvar_g_balance_shotgun_secondary_melee_no_doubleslap)
        {
                remove(self);
                return;
        }
-       
-       // if okay, perform the traces needed for this frame 
+
+       // if okay, perform the traces needed for this frame
        for(i=self.swing_prev; i < f; ++i)
        {
                swing_factor = ((1 - (i / autocvar_g_balance_shotgun_secondary_melee_traces)) * 2 - 1);
        for(i=self.swing_prev; i < f; ++i)
        {
                swing_factor = ((1 - (i / autocvar_g_balance_shotgun_secondary_melee_traces)) * 2 - 1);
-               
-               targpos = (self.realowner.origin + self.realowner.view_ofs 
+
+               targpos = (self.realowner.origin + self.realowner.view_ofs
                        + (v_forward * autocvar_g_balance_shotgun_secondary_melee_range)
                        + (v_up * swing_factor * autocvar_g_balance_shotgun_secondary_melee_swing_up)
                        + (v_right * swing_factor * autocvar_g_balance_shotgun_secondary_melee_swing_side));
 
                WarpZone_traceline_antilag(self, self.realowner.origin + self.realowner.view_ofs, targpos, FALSE, self, ANTILAG_LATENCY(self.realowner));
                        + (v_forward * autocvar_g_balance_shotgun_secondary_melee_range)
                        + (v_up * swing_factor * autocvar_g_balance_shotgun_secondary_melee_swing_up)
                        + (v_right * swing_factor * autocvar_g_balance_shotgun_secondary_melee_swing_side));
 
                WarpZone_traceline_antilag(self, self.realowner.origin + self.realowner.view_ofs, targpos, FALSE, self, ANTILAG_LATENCY(self.realowner));
-               
+
                // draw lightning beams for debugging
                // draw lightning beams for debugging
-               //te_lightning2(world, targpos, self.realowner.origin + self.realowner.view_ofs + v_forward * 5 - v_up * 5); 
+               //te_lightning2(world, targpos, self.realowner.origin + self.realowner.view_ofs + v_forward * 5 - v_up * 5);
                //te_customflash(targpos, 40,  2, '1 1 1');
                //te_customflash(targpos, 40,  2, '1 1 1');
-               
+
                is_player = (IS_PLAYER(trace_ent) || trace_ent.classname == "body");
 
                if((trace_fraction < 1) // if trace is good, apply the damage and remove self
                is_player = (IS_PLAYER(trace_ent) || trace_ent.classname == "body");
 
                if((trace_fraction < 1) // if trace is good, apply the damage and remove self
-                       && (trace_ent.takedamage == DAMAGE_AIM)  
+                       && (trace_ent.takedamage == DAMAGE_AIM)
                        && (trace_ent != self.swing_alreadyhit)
                        && (is_player || autocvar_g_balance_shotgun_secondary_melee_nonplayerdamage))
                {
                        target_victim = trace_ent; // so it persists through other calls
                        && (trace_ent != self.swing_alreadyhit)
                        && (is_player || autocvar_g_balance_shotgun_secondary_melee_nonplayerdamage))
                {
                        target_victim = trace_ent; // so it persists through other calls
-                       
+
                        if(is_player) // this allows us to be able to nerf the non-player damage done in e.g. assault or onslaught.
                                swing_damage = (autocvar_g_balance_shotgun_secondary_damage * min(1, swing_factor + 1));
                        else
                                swing_damage = (autocvar_g_balance_shotgun_secondary_melee_nonplayerdamage * min(1, swing_factor + 1));
                        if(is_player) // this allows us to be able to nerf the non-player damage done in e.g. assault or onslaught.
                                swing_damage = (autocvar_g_balance_shotgun_secondary_damage * min(1, swing_factor + 1));
                        else
                                swing_damage = (autocvar_g_balance_shotgun_secondary_melee_nonplayerdamage * min(1, swing_factor + 1));
-                       
+
                        //print(strcat(self.realowner.netname, " hitting ", target_victim.netname, " with ", strcat(ftos(swing_damage), " damage (factor: ", ftos(swing_factor), ") at "), ftos(time), " seconds.\n"));
                        //print(strcat(self.realowner.netname, " hitting ", target_victim.netname, " with ", strcat(ftos(swing_damage), " damage (factor: ", ftos(swing_factor), ") at "), ftos(time), " seconds.\n"));
-                       
-                       Damage(target_victim, self.realowner, self.realowner, 
-                               swing_damage, WEP_SHOTGUN | HITTYPE_SECONDARY, 
-                               self.realowner.origin + self.realowner.view_ofs, 
+
+                       Damage(target_victim, self.realowner, self.realowner,
+                               swing_damage, WEP_SHOTGUN | HITTYPE_SECONDARY,
+                               self.realowner.origin + self.realowner.view_ofs,
                                v_forward * autocvar_g_balance_shotgun_secondary_force);
                                v_forward * autocvar_g_balance_shotgun_secondary_force);
-                               
+
                        if(accuracy_isgooddamage(self.realowner, target_victim)) { accuracy_add(self.realowner, WEP_SHOTGUN, 0, swing_damage); }
                        if(accuracy_isgooddamage(self.realowner, target_victim)) { accuracy_add(self.realowner, WEP_SHOTGUN, 0, swing_damage); }
-                               
+
                        // draw large red flash for debugging
                        //te_customflash(targpos, 200, 2, '15 0 0');
                        // draw large red flash for debugging
                        //te_customflash(targpos, 200, 2, '15 0 0');
-                       
+
                        if(autocvar_g_balance_shotgun_secondary_melee_multihit) // allow multiple hits with one swing, but not against the same player twice.
                        {
                                self.swing_alreadyhit = target_victim;
                        if(autocvar_g_balance_shotgun_secondary_melee_multihit) // allow multiple hits with one swing, but not against the same player twice.
                        {
                                self.swing_alreadyhit = target_victim;
@@ -139,7 +139,7 @@ void shotgun_meleethink (void)
                        }
                }
        }
                        }
                }
        }
-       
+
        if(time >= self.cnt + meleetime)
        {
                // melee is finished
        if(time >= self.cnt + meleetime)
        {
                // melee is finished
@@ -148,7 +148,7 @@ void shotgun_meleethink (void)
        }
        else
        {
        }
        else
        {
-               // set up next frame 
+               // set up next frame
                self.swing_prev = i;
                self.nextthink = time;
        }
                self.swing_prev = i;
                self.nextthink = time;
        }
index dee2e15cf4463b075a0db5581bc7cbad717f1ace..f70aa044312b803773c89931f4912ae59ef6a8b2 100644 (file)
@@ -190,7 +190,7 @@ float Tuba_GetNote(entity pl, float hittype)
                note += 12;
        if(hittype & HITTYPE_SECONDARY)
                note += 7;
                note += 12;
        if(hittype & HITTYPE_SECONDARY)
                note += 7;
-       
+
        // we support two kinds of tubas, those tuned in Eb and those tuned in C
        // kind of tuba currently is player slot number, or team number if in
        // teamplay
        // we support two kinds of tubas, those tuned in Eb and those tuned in C
        // kind of tuba currently is player slot number, or team number if in
        // teamplay
@@ -205,7 +205,7 @@ float Tuba_GetNote(entity pl, float hittype)
                if(pl.clientcolors & 1)
                        note += 3;
        }
                if(pl.clientcolors & 1)
                        note += 3;
        }
-       
+
        // total range of notes:
        //                       0
        //                 ***  ** ****
        // total range of notes:
        //                       0
        //                 ***  ** ****
index 8332171aef1e6c8b63c3597aa1f163e9200f546d..736cc564cc4c81bffaae6096cddc11b46c8ac867 100644 (file)
@@ -251,7 +251,7 @@ float WaypointSprite_SendEntity(entity to, float sendflags)
        WriteByte(MSG_ENTITY, ENT_CLIENT_WAYPOINT);
 
        sendflags = sendflags & 0x7F;
        WriteByte(MSG_ENTITY, ENT_CLIENT_WAYPOINT);
 
        sendflags = sendflags & 0x7F;
-       
+
        if(g_nexball)
                sendflags &= ~0x80;
        else if(self.max_health || (self.pain_finished && (time < self.pain_finished + 0.25)))
        if(g_nexball)
                sendflags &= ~0x80;
        else if(self.max_health || (self.pain_finished && (time < self.pain_finished + 0.25)))
diff --git a/qcsrc/uncrusticracy.sh b/qcsrc/uncrusticracy.sh
new file mode 100644 (file)
index 0000000..1bdd690
--- /dev/null
@@ -0,0 +1,168 @@
+FILES=`find client common menu server warpzonelib -name \*.c -o -name \*.h -o -name \*.qc -o -name \*.qh`
+out_raw()
+{
+       printf "%s\n" "$LINE"
+}
+out()
+{
+       printf "%-40s = %-8s # %s\n" "$KEY" "$VAL" "$COMMENT"
+}
+decide()
+{
+       verybestchoice=
+       verybestscore=2147483647
+       bestchoice=
+       bestscore=2147483647
+       secondbestchoice=
+       secondbestscore=2147483647
+       worstscore=0
+       haveignore=false
+       havefalse=false
+       have0=false
+       seen=
+       for choice in "$VAL" "$@"; do
+               case " $seen " in
+                       *" $choice "*)
+                               continue
+                               ;;
+                       *)
+                               seen=$seen" $VAL"
+                               ;;
+               esac
+               if [ x"$choice" = x"force" ]; then
+                       continue
+               fi
+               if [ x"$choice" = x"ignore" ]; then
+                       haveignore=true
+               fi
+               if [ x"$choice" = x"false" ]; then
+                       havefalse=true
+               fi
+               if [ x"$choice" = x"0" ]; then
+                       have0=true
+               fi
+               if [ x"$MODE" = x"initialize" ]; then
+                       if [ x"$choice" = x"ignore" ]; then
+                               score=0
+                       else
+                               score=2147483647
+                       fi
+               else
+                       {
+                               cat uncrustify.cfg
+                               printf "%s = %s\n" "$KEY" "$choice"
+                       } > uncrustify.cfg.test
+                       uncrustify -c uncrustify.cfg.test --replace --no-backup $FILES >/dev/null 2>&1
+                       score=0
+                       git diff --numstat > diffstat.tmp
+                       while read -r add del rest; do
+                               if [ x"$add" != x"-" ]; then
+                                       score=$(($score + $add))
+                               fi
+                               if [ x"$del" != x"-" ]; then
+                                       score=$(($score + $del))
+                               fi
+                       done < diffstat.tmp
+                       git reset --hard >/dev/null 2>&1
+               fi
+               echo >&2 "$KEY = $choice: $score"
+               if [ x"$choice" != x"ignore" ]; then
+                       if [ $score -lt $bestscore ]; then
+                               secondbestscore=$bestscore
+                               secondbestchoice=$bestchoice
+                               bestscore=$score
+                               bestchoice=$choice
+                       elif [ $score -lt $secondbestscore ]; then
+                               secondbestscore=$score
+                               secondbestchoice=$choice
+                       fi
+               fi
+               if [ $score -lt $verybestscore ]; then
+                       verybestscore=$score
+                       verybestchoice=$choice
+               fi
+               if [ $score -gt $worstscore ]; then
+                       worstscore=$score
+                       worstchoice=$choice
+               fi
+       done
+       if [ -z "$bestchoice" ]; then
+               echo "# WARNING: No best choice identified"
+       elif [ $verybestscore -ge $worstscore ]; then
+               echo "# WARNING: Code doesn't seem to use this feature - delete from the config?"
+               if $haveignore; then
+                       VAL=ignore
+               elif $havefalse; then
+                       VAL=false
+               elif $have0; then
+                       VAL=0
+               fi
+       elif [ $bestscore -ge $worstscore ]; then
+               echo "# WARNING: Indifferent... please decide manually."
+       elif [ $bestscore -ge $secondbestscore ]; then
+               echo "# WARNING: Best is not unique ($bestchoice $secondbestchoice)"
+       elif [ $bestscore -gt $verybestscore ]; then
+               echo "# NOTE: is $(($bestscore - $verybestscore)) worse than $verybestchoice"
+               VAL=$bestchoice
+       else
+               VAL=$bestchoice
+       fi
+}
+while read -r LINE; do
+       case "$LINE" in
+               "# NOTE: "*)
+                       continue
+                       ;;
+               "# WARNING: "*)
+                       continue
+                       ;;
+               "# ERROR: "*)
+                       continue
+                       ;;
+               "#"*)
+                       out_raw
+                       continue
+                       ;;
+               *"#force"*)
+                       out_raw
+                       continue
+                       ;;
+       esac
+       printf "%s\n" "$LINE" | while read KEY EQ VAL DELIM COMMENT; do
+               if \
+                       [ x"$EQ" != x"=" ] || \
+                       [ x"$DELIM" != x"#" ]; then
+                       out_raw
+                       continue
+               fi
+               case "$COMMENT" in
+                       number)
+                               case "$KEY" in
+                                       indent_columns|*tab*)
+                                               decide 1 2 4 8
+                                               ;;
+                                       *)
+                                               decide 0 1 2 3 4 indent_columns
+                                               ;;
+                               esac
+                               out
+                               ;;
+                       string)
+                               printf "# WARNING: unsupported %s\n" "$COMMENT"
+                               out_raw
+                               ;;
+                       *[!a-z/_]*)
+                               printf "# ERROR: invalid characters %s\n" "$COMMENT"
+                               out_raw
+                               ;;
+                       */*)
+                               decide `echo "$COMMENT" | tr / ' '`
+                               out
+                               ;;
+                       *)
+                               printf "# ERROR: only once choice %s\n" "$COMMENT"
+                               out_raw
+                               ;;
+               esac
+       done
+done < uncrustify.cfg
index a184c9607c49ae1db824342993f9ee5b38ac8a95..3590202cc7abf735657c02db4fc4fac2ef41992b 100644 (file)
@@ -5,6 +5,7 @@
 #
 
 # The type of line endings
 #
 
 # The type of line endings
+# WARNING: Best is not unique (auto lf)
 newlines                                 = auto     # auto/lf/crlf/cr
 
 # The original size of tabs in the input
 newlines                                 = auto     # auto/lf/crlf/cr
 
 # The original size of tabs in the input
@@ -17,6 +18,7 @@ output_tab_size                          = 8        # number
 string_escape_char                       = 92       # number
 
 # Alternate string escape char for Pawn. Only works right before the quote char.
 string_escape_char                       = 92       # number
 
 # Alternate string escape char for Pawn. Only works right before the quote char.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 string_escape_char2                      = 0        # number
 
 #
 string_escape_char2                      = 0        # number
 
 #
@@ -35,17 +37,19 @@ indent_continue                          = 0        # number
 # 0=spaces only
 # 1=indent with tabs to brace level, align with spaces
 # 2=indent and align with tabs, using spaces when not on a tabstop
 # 0=spaces only
 # 1=indent with tabs to brace level, align with spaces
 # 2=indent and align with tabs, using spaces when not on a tabstop
-indent_with_tabs                         = 1        # number
+indent_with_tabs                         = 1        # number #force
 
 # Comments that are not a brace level are indented with tabs on a tabstop.
 # Requires indent_with_tabs=2. If false, will use spaces.
 indent_cmt_with_tabs                     = false    # false/true
 
 # Whether to indent strings broken by '\' so that they line up
 
 # Comments that are not a brace level are indented with tabs on a tabstop.
 # Requires indent_with_tabs=2. If false, will use spaces.
 indent_cmt_with_tabs                     = false    # false/true
 
 # Whether to indent strings broken by '\' so that they line up
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_align_string                      = false    # false/true
 
 # The number of spaces to indent multi-line XML strings.
 # Requires indent_align_string=True
 indent_align_string                      = false    # false/true
 
 # The number of spaces to indent multi-line XML strings.
 # Requires indent_align_string=True
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_xml_string                        = 0        # number
 
 # Spaces to indent '{' from level
 indent_xml_string                        = 0        # number
 
 # Spaces to indent '{' from level
@@ -55,76 +59,95 @@ indent_brace                             = 0        # number
 indent_braces                            = false    # false/true
 
 # Disabled indenting function braces if indent_braces is true
 indent_braces                            = false    # false/true
 
 # Disabled indenting function braces if indent_braces is true
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_braces_no_func                    = false    # false/true
 
 # Disabled indenting class braces if indent_braces is true
 indent_braces_no_func                    = false    # false/true
 
 # Disabled indenting class braces if indent_braces is true
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_braces_no_class                   = false    # false/true
 
 # Disabled indenting struct braces if indent_braces is true
 indent_braces_no_class                   = false    # false/true
 
 # Disabled indenting struct braces if indent_braces is true
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_braces_no_struct                  = false    # false/true
 
 # Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc.
 indent_brace_parent                      = false    # false/true
 
 # Whether the 'namespace' body is indented
 indent_braces_no_struct                  = false    # false/true
 
 # Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc.
 indent_brace_parent                      = false    # false/true
 
 # Whether the 'namespace' body is indented
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_namespace                         = false    # false/true
 
 # The number of spaces to indent a namespace block
 indent_namespace                         = false    # false/true
 
 # The number of spaces to indent a namespace block
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_namespace_level                   = 0        # number
 
 # If the body of the namespace is longer than this number, it won't be indented.
 # Requires indent_namespace=true. Default=0 (no limit)
 indent_namespace_level                   = 0        # number
 
 # If the body of the namespace is longer than this number, it won't be indented.
 # Requires indent_namespace=true. Default=0 (no limit)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_namespace_limit                   = 0        # number
 
 # Whether the 'extern "C"' body is indented
 indent_namespace_limit                   = 0        # number
 
 # Whether the 'extern "C"' body is indented
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_extern                            = false    # false/true
 
 # Whether the 'class' body is indented
 indent_extern                            = false    # false/true
 
 # Whether the 'class' body is indented
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_class                             = false    # false/true
 
 # Whether to indent the stuff after a leading class colon
 indent_class                             = false    # false/true
 
 # Whether to indent the stuff after a leading class colon
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_class_colon                       = false    # false/true
 
 # False=treat 'else\nif' as 'else if' for indenting purposes
 # True=indent the 'if' one level
 indent_class_colon                       = false    # false/true
 
 # False=treat 'else\nif' as 'else if' for indenting purposes
 # True=indent the 'if' one level
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_else_if                           = false    # false/true
 
 # Amount to indent variable declarations after a open brace. neg=relative, pos=absolute
 indent_var_def_blk                       = 0        # number
 
 # Indent continued variable declarations instead of aligning.
 indent_else_if                           = false    # false/true
 
 # Amount to indent variable declarations after a open brace. neg=relative, pos=absolute
 indent_var_def_blk                       = 0        # number
 
 # Indent continued variable declarations instead of aligning.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_var_def_cont                      = false    # false/true
 
 # True:  indent continued function call parameters one indent level
 # False: align parameters under the open paren
 indent_var_def_cont                      = false    # false/true
 
 # True:  indent continued function call parameters one indent level
 # False: align parameters under the open paren
-indent_func_call_param                   = false    # false/true
+indent_func_call_param                   = true     # false/true
 
 # Same as indent_func_call_param, but for function defs
 
 # Same as indent_func_call_param, but for function defs
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_func_def_param                    = false    # false/true
 
 # Same as indent_func_call_param, but for function protos
 indent_func_def_param                    = false    # false/true
 
 # Same as indent_func_call_param, but for function protos
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_func_proto_param                  = false    # false/true
 
 # Same as indent_func_call_param, but for class declarations
 indent_func_proto_param                  = false    # false/true
 
 # Same as indent_func_call_param, but for class declarations
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_func_class_param                  = false    # false/true
 
 # Same as indent_func_call_param, but for class variable constructors
 indent_func_class_param                  = false    # false/true
 
 # Same as indent_func_call_param, but for class variable constructors
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_func_ctor_var_param               = false    # false/true
 
 # Same as indent_func_call_param, but for templates
 indent_func_ctor_var_param               = false    # false/true
 
 # Same as indent_func_call_param, but for templates
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_template_param                    = false    # false/true
 
 # Double the indent for indent_func_xxx_param options
 indent_func_param_double                 = false    # false/true
 
 # Indentation column for standalone 'const' function decl/proto qualifier
 indent_template_param                    = false    # false/true
 
 # Double the indent for indent_func_xxx_param options
 indent_func_param_double                 = false    # false/true
 
 # Indentation column for standalone 'const' function decl/proto qualifier
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_func_const                        = 0        # number
 
 # Indentation column for standalone 'throw' function decl/proto qualifier
 indent_func_const                        = 0        # number
 
 # Indentation column for standalone 'throw' function decl/proto qualifier
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_func_throw                        = 0        # number
 
 # The number of spaces to indent a continued '->' or '.'
 # Usually set to 0, 1, or indent_columns.
 indent_func_throw                        = 0        # number
 
 # The number of spaces to indent a continued '->' or '.'
 # Usually set to 0, 1, or indent_columns.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_member                            = 0        # number
 
 # Spaces to indent single line ('//') comments on lines before code
 indent_member                            = 0        # number
 
 # Spaces to indent single line ('//') comments on lines before code
@@ -132,11 +155,11 @@ indent_sing_line_comments                = 0        # number
 
 # If set, will indent trailing single line ('//') comments relative
 # to the code instead of trying to keep the same absolute column
 
 # If set, will indent trailing single line ('//') comments relative
 # to the code instead of trying to keep the same absolute column
-indent_relative_single_line_comments     = false    # false/true
+indent_relative_single_line_comments     = true    # false/true #force
 
 # Spaces to indent 'case' from 'switch'
 # Usually 0 or indent_columns.
 
 # Spaces to indent 'case' from 'switch'
 # Usually 0 or indent_columns.
-indent_switch_case                       = indent_columns        # number
+indent_switch_case                       = indent_columns # number
 
 # Spaces to shift the 'case' line, without affecting any other lines
 # Usually 0.
 
 # Spaces to shift the 'case' line, without affecting any other lines
 # Usually 0.
@@ -153,37 +176,46 @@ indent_col1_comment                      = false    # false/true
 # How to indent goto labels
 #  >0 : absolute column where 1 is the leftmost column
 #  <=0 : subtract from brace indent
 # How to indent goto labels
 #  >0 : absolute column where 1 is the leftmost column
 #  <=0 : subtract from brace indent
-indent_label                             = 1        # number
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+indent_label                             = 0        # number
 
 # Same as indent_label, but for access specifiers that are followed by a colon
 
 # Same as indent_label, but for access specifiers that are followed by a colon
-indent_access_spec                       = 1        # number
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+indent_access_spec                       = 0        # number
 
 # Indent the code after an access specifier by one level.
 # If set, this option forces 'indent_access_spec=0'
 
 # Indent the code after an access specifier by one level.
 # If set, this option forces 'indent_access_spec=0'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_access_spec_body                  = false    # false/true
 
 # If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended)
 indent_access_spec_body                  = false    # false/true
 
 # If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_paren_nl                          = false    # false/true
 
 # Controls the indent of a close paren after a newline.
 # 0: Indent to body level
 # 1: Align under the open paren
 # 2: Indent to the brace level
 indent_paren_nl                          = false    # false/true
 
 # Controls the indent of a close paren after a newline.
 # 0: Indent to body level
 # 1: Align under the open paren
 # 2: Indent to the brace level
-indent_paren_close                       = 0        # number
+indent_paren_close                       = 1        # number #force
 
 # Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren
 
 # Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_comma_paren                       = false    # false/true
 
 # Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren
 indent_comma_paren                       = false    # false/true
 
 # Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_bool_paren                        = false    # false/true
 
 # If 'indent_bool_paren' is true, controls the indent of the first expression. If TRUE, aligns the first expression to the following ones
 indent_bool_paren                        = false    # false/true
 
 # If 'indent_bool_paren' is true, controls the indent of the first expression. If TRUE, aligns the first expression to the following ones
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_first_bool_expr                   = false    # false/true
 
 # If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended)
 indent_first_bool_expr                   = false    # false/true
 
 # If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_square_nl                         = false    # false/true
 
 # Don't change the relative indent of ESQL/C 'EXEC SQL' bodies
 indent_square_nl                         = false    # false/true
 
 # Don't change the relative indent of ESQL/C 'EXEC SQL' bodies
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 indent_preserve_sql                      = false    # false/true
 
 # Align continued statements at the '='. Default=True
 indent_preserve_sql                      = false    # false/true
 
 # Align continued statements at the '='. Default=True
@@ -195,30 +227,35 @@ indent_align_assign                      = true     # false/true
 #
 
 # Add or remove space around arithmetic operator '+', '-', '/', '*', etc
 #
 
 # Add or remove space around arithmetic operator '+', '-', '/', '*', etc
-sp_arith                                 = ignore   # ignore/add/remove/force
+# NOTE: is 518 worse than ignore
+sp_arith                                 = add      # ignore/add/remove/force
 
 # Add or remove space around assignment operator '=', '+=', etc
 
 # Add or remove space around assignment operator '=', '+=', etc
+# NOTE: is 4 worse than ignore
 sp_assign                                = add      # ignore/add/remove/force
 
 # Add or remove space around assignment operator '=' in a prototype
 sp_assign                                = add      # ignore/add/remove/force
 
 # Add or remove space around assignment operator '=' in a prototype
-sp_assign_default                        = add      # ignore/add/remove/force
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+sp_assign_default                        = ignore   # ignore/add/remove/force
 
 
-# Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign.
-sp_before_assign                         = ignore   # ignore/add/remove/force
-
-# Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign.
-sp_after_assign                          = ignore   # ignore/add/remove/force
+# Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign.
+sp_before_assign                         = ignore   # ignore/add/remove/force
+#
+# Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign.
+sp_after_assign                          = ignore   # ignore/add/remove/force
 
 # Add or remove space around assignment '=' in enum
 
 # Add or remove space around assignment '=' in enum
-sp_enum_assign                           = add      # ignore/add/remove/force
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+sp_enum_assign                           = ignore   # ignore/add/remove/force
 
 
-# Add or remove space before assignment '=' in enum. Overrides sp_enum_assign.
-sp_enum_before_assign                    = ignore   # ignore/add/remove/force
-
-# Add or remove space after assignment '=' in enum. Overrides sp_enum_assign.
-sp_enum_after_assign                     = ignore   # ignore/add/remove/force
+# Add or remove space before assignment '=' in enum. Overrides sp_enum_assign.
+sp_enum_before_assign                    = ignore   # ignore/add/remove/force
+#
+# Add or remove space after assignment '=' in enum. Overrides sp_enum_assign.
+sp_enum_after_assign                     = ignore   # ignore/add/remove/force
 
 # Add or remove space around preprocessor '##' concatenation operator. Default=Add
 
 # Add or remove space around preprocessor '##' concatenation operator. Default=Add
+# NOTE: is 2 worse than ignore
 sp_pp_concat                             = remove   # ignore/add/remove/force
 
 # Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. Default=Add
 sp_pp_concat                             = remove   # ignore/add/remove/force
 
 # Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. Default=Add
@@ -228,9 +265,11 @@ sp_pp_stringify                          = remove   # ignore/add/remove/force
 sp_bool                                  = add      # ignore/add/remove/force
 
 # Add or remove space around compare operator '<', '>', '==', etc
 sp_bool                                  = add      # ignore/add/remove/force
 
 # Add or remove space around compare operator '<', '>', '==', etc
+# NOTE: is 4 worse than ignore
 sp_compare                               = add      # ignore/add/remove/force
 
 # Add or remove space inside '(' and ')'
 sp_compare                               = add      # ignore/add/remove/force
 
 # Add or remove space inside '(' and ')'
+# NOTE: is 2 worse than ignore
 sp_inside_paren                          = remove   # ignore/add/remove/force
 
 # Add or remove space between nested parens
 sp_inside_paren                          = remove   # ignore/add/remove/force
 
 # Add or remove space between nested parens
@@ -240,261 +279,322 @@ sp_paren_paren                           = remove   # ignore/add/remove/force
 sp_balance_nested_parens                 = false    # false/true
 
 # Add or remove space between ')' and '{'
 sp_balance_nested_parens                 = false    # false/true
 
 # Add or remove space between ')' and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_paren_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove space before pointer star '*'
 sp_paren_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove space before pointer star '*'
-sp_before_ptr_star                       = ignore   # ignore/add/remove/force
+sp_before_ptr_star                       = add      # ignore/add/remove/force
 
 # Add or remove space before pointer star '*' that isn't followed by a variable name
 # If set to 'ignore', sp_before_ptr_star is used instead.
 
 # Add or remove space before pointer star '*' that isn't followed by a variable name
 # If set to 'ignore', sp_before_ptr_star is used instead.
-sp_before_unnamed_ptr_star               = ignore   # ignore/add/remove/force
+sp_before_unnamed_ptr_star               = add      # ignore/add/remove/force
 
 # Add or remove space between pointer stars '*'
 
 # Add or remove space between pointer stars '*'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_between_ptr_star                      = ignore   # ignore/add/remove/force
 
 # Add or remove space after pointer star '*', if followed by a word.
 sp_between_ptr_star                      = ignore   # ignore/add/remove/force
 
 # Add or remove space after pointer star '*', if followed by a word.
-sp_after_ptr_star                        = ignore   # ignore/add/remove/force
+sp_after_ptr_star                        = add      # ignore/add/remove/force
 
 # Add or remove space after a pointer star '*', if followed by a func proto/def.
 
 # Add or remove space after a pointer star '*', if followed by a func proto/def.
-sp_after_ptr_star_func                   = ignore   # ignore/add/remove/force
+sp_after_ptr_star_func                   = add      # ignore/add/remove/force
 
 # Add or remove space before a pointer star '*', if followed by a func proto/def.
 
 # Add or remove space before a pointer star '*', if followed by a func proto/def.
-sp_before_ptr_star_func                  = ignore   # ignore/add/remove/force
+sp_before_ptr_star_func                  = add      # ignore/add/remove/force
 
 # Add or remove space before a reference sign '&'
 
 # Add or remove space before a reference sign '&'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_byref                          = ignore   # ignore/add/remove/force
 
 # Add or remove space before a reference sign '&' that isn't followed by a variable name
 # If set to 'ignore', sp_before_byref is used instead.
 sp_before_byref                          = ignore   # ignore/add/remove/force
 
 # Add or remove space before a reference sign '&' that isn't followed by a variable name
 # If set to 'ignore', sp_before_byref is used instead.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_unnamed_byref                  = ignore   # ignore/add/remove/force
 
 # Add or remove space after reference sign '&', if followed by a word.
 sp_before_unnamed_byref                  = ignore   # ignore/add/remove/force
 
 # Add or remove space after reference sign '&', if followed by a word.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_byref                           = ignore   # ignore/add/remove/force
 
 # Add or remove space after a reference sign '&', if followed by a func proto/def.
 sp_after_byref                           = ignore   # ignore/add/remove/force
 
 # Add or remove space after a reference sign '&', if followed by a func proto/def.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_byref_func                      = ignore   # ignore/add/remove/force
 
 # Add or remove space before a reference sign '&', if followed by a func proto/def.
 sp_after_byref_func                      = ignore   # ignore/add/remove/force
 
 # Add or remove space before a reference sign '&', if followed by a func proto/def.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_byref_func                     = ignore   # ignore/add/remove/force
 
 # Add or remove space between type and word. Default=Force
 sp_before_byref_func                     = ignore   # ignore/add/remove/force
 
 # Add or remove space between type and word. Default=Force
-sp_after_type                            = force    # ignore/add/remove/force
+sp_after_type                            = add      # ignore/add/remove/force
 
 # Add or remove space in 'template <' vs 'template<'.
 # If set to ignore, sp_before_angle is used.
 
 # Add or remove space in 'template <' vs 'template<'.
 # If set to ignore, sp_before_angle is used.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_template_angle                        = ignore   # ignore/add/remove/force
 
 # Add or remove space before '<>'
 sp_template_angle                        = ignore   # ignore/add/remove/force
 
 # Add or remove space before '<>'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_angle                          = ignore   # ignore/add/remove/force
 
 # Add or remove space inside '<' and '>'
 sp_before_angle                          = ignore   # ignore/add/remove/force
 
 # Add or remove space inside '<' and '>'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_inside_angle                          = ignore   # ignore/add/remove/force
 
 # Add or remove space after '<>'
 sp_inside_angle                          = ignore   # ignore/add/remove/force
 
 # Add or remove space after '<>'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_angle                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between '<>' and '(' as found in 'new List<byte>();'
 sp_after_angle                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between '<>' and '(' as found in 'new List<byte>();'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_angle_paren                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between '<>' and a word as in 'List<byte> m;'
 sp_angle_paren                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between '<>' and a word as in 'List<byte> m;'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_angle_word                            = ignore   # ignore/add/remove/force
 
 # Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add
 sp_angle_word                            = ignore   # ignore/add/remove/force
 
 # Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add
-sp_angle_shift                           = add      # ignore/add/remove/force
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+sp_angle_shift                           = ignore   # ignore/add/remove/force
 
 # Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
 
 # Add or remove space before '(' of 'if', 'for', 'switch', and 'while'
-sp_before_sparen                         = ignore   # ignore/add/remove/force
+# NOTE: is 734 worse than ignore
+sp_before_sparen                         = remove   # ignore/add/remove/force
 
 # Add or remove space inside if-condition '(' and ')'
 
 # Add or remove space inside if-condition '(' and ')'
-sp_inside_sparen                         = ignore   # ignore/add/remove/force
+# NOTE: is 14 worse than ignore
+sp_inside_sparen                         = remove   # ignore/add/remove/force
 
 
-# Add or remove space before if-condition ')'. Overrides sp_inside_sparen.
-sp_inside_sparen_close                   = ignore   # ignore/add/remove/force
+# Add or remove space before if-condition ')'. Overrides sp_inside_sparen.
+sp_inside_sparen_close                   = ignore   # ignore/add/remove/force
 
 # Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
 
 # Add or remove space after ')' of 'if', 'for', 'switch', and 'while'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_sparen                          = ignore   # ignore/add/remove/force
 
 # Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while'
 sp_after_sparen                          = ignore   # ignore/add/remove/force
 
 # Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_sparen_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'invariant' and '(' in the D language.
 sp_sparen_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'invariant' and '(' in the D language.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_invariant_paren                       = ignore   # ignore/add/remove/force
 
 # Add or remove space after the ')' in 'invariant (C) c' in the D language.
 sp_invariant_paren                       = ignore   # ignore/add/remove/force
 
 # Add or remove space after the ')' in 'invariant (C) c' in the D language.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_invariant_paren                 = ignore   # ignore/add/remove/force
 
 # Add or remove space before empty statement ';' on 'if', 'for' and 'while'
 sp_after_invariant_paren                 = ignore   # ignore/add/remove/force
 
 # Add or remove space before empty statement ';' on 'if', 'for' and 'while'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_special_semi                          = ignore   # ignore/add/remove/force
 
 # Add or remove space before ';'. Default=Remove
 sp_before_semi                           = remove   # ignore/add/remove/force
 
 # Add or remove space before ';' in non-empty 'for' statements
 sp_special_semi                          = ignore   # ignore/add/remove/force
 
 # Add or remove space before ';'. Default=Remove
 sp_before_semi                           = remove   # ignore/add/remove/force
 
 # Add or remove space before ';' in non-empty 'for' statements
-sp_before_semi_for                       = ignore   # ignore/add/remove/force
+sp_before_semi_for                       = remove   # ignore/add/remove/force
 
 # Add or remove space before a semicolon of an empty part of a for statement.
 
 # Add or remove space before a semicolon of an empty part of a for statement.
-sp_before_semi_for_empty                 = ignore   # ignore/add/remove/force
+sp_before_semi_for_empty                 = add      # ignore/add/remove/force
 
 # Add or remove space after ';', except when followed by a comment. Default=Add
 
 # Add or remove space after ';', except when followed by a comment. Default=Add
+# NOTE: is 60 worse than ignore
 sp_after_semi                            = add      # ignore/add/remove/force
 
 # Add or remove space after ';' in non-empty 'for' statements. Default=Force
 sp_after_semi                            = add      # ignore/add/remove/force
 
 # Add or remove space after ';' in non-empty 'for' statements. Default=Force
-sp_after_semi_for                        = force    # ignore/add/remove/force
+sp_after_semi_for                        = add      # ignore/add/remove/force
 
 # Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; <here> ).
 
 # Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; <here> ).
-sp_after_semi_for_empty                  = ignore   # ignore/add/remove/force
+sp_after_semi_for_empty                  = add      # ignore/add/remove/force
 
 # Add or remove space before '[' (except '[]')
 
 # Add or remove space before '[' (except '[]')
-sp_before_square                         = ignore   # ignore/add/remove/force
+sp_before_square                         = remove   # ignore/add/remove/force
 
 # Add or remove space before '[]'
 
 # Add or remove space before '[]'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_squares                        = ignore   # ignore/add/remove/force
 
 # Add or remove space inside '[' and ']'
 sp_before_squares                        = ignore   # ignore/add/remove/force
 
 # Add or remove space inside '[' and ']'
-sp_inside_square                         = ignore   # ignore/add/remove/force
+sp_inside_square                         = remove   # ignore/add/remove/force
 
 # Add or remove space after ','
 
 # Add or remove space after ','
-sp_after_comma                           = ignore   # ignore/add/remove/force
+# NOTE: is 48 worse than ignore
+sp_after_comma                           = add      # ignore/add/remove/force
 
 # Add or remove space before ','
 sp_before_comma                          = remove   # ignore/add/remove/force
 
 # Add or remove space between an open paren and comma: '(,' vs '( ,'
 
 # Add or remove space before ','
 sp_before_comma                          = remove   # ignore/add/remove/force
 
 # Add or remove space between an open paren and comma: '(,' vs '( ,'
-sp_paren_comma                           = force    # ignore/add/remove/force
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+sp_paren_comma                           = ignore   # ignore/add/remove/force
 
 # Add or remove space before the variadic '...' when preceded by a non-punctuator
 
 # Add or remove space before the variadic '...' when preceded by a non-punctuator
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_ellipsis                       = ignore   # ignore/add/remove/force
 
 # Add or remove space after class ':'
 sp_before_ellipsis                       = ignore   # ignore/add/remove/force
 
 # Add or remove space after class ':'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_class_colon                     = ignore   # ignore/add/remove/force
 
 # Add or remove space before class ':'
 sp_after_class_colon                     = ignore   # ignore/add/remove/force
 
 # Add or remove space before class ':'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_class_colon                    = ignore   # ignore/add/remove/force
 
 # Add or remove space before case ':'. Default=Remove
 sp_before_case_colon                     = remove   # ignore/add/remove/force
 
 # Add or remove space between 'operator' and operator sign
 sp_before_class_colon                    = ignore   # ignore/add/remove/force
 
 # Add or remove space before case ':'. Default=Remove
 sp_before_case_colon                     = remove   # ignore/add/remove/force
 
 # Add or remove space between 'operator' and operator sign
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_operator                        = ignore   # ignore/add/remove/force
 
 # Add or remove space between the operator symbol and the open paren, as in 'operator ++('
 sp_after_operator                        = ignore   # ignore/add/remove/force
 
 # Add or remove space between the operator symbol and the open paren, as in 'operator ++('
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_operator_sym                    = ignore   # ignore/add/remove/force
 
 # Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a'
 sp_after_operator_sym                    = ignore   # ignore/add/remove/force
 
 # Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_cast                            = ignore   # ignore/add/remove/force
 
 # Add or remove spaces inside cast parens
 sp_after_cast                            = ignore   # ignore/add/remove/force
 
 # Add or remove spaces inside cast parens
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_inside_paren_cast                     = ignore   # ignore/add/remove/force
 
 # Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)'
 sp_inside_paren_cast                     = ignore   # ignore/add/remove/force
 
 # Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_cpp_cast_paren                        = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'sizeof' and '('
 sp_cpp_cast_paren                        = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'sizeof' and '('
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_sizeof_paren                          = ignore   # ignore/add/remove/force
 
 # Add or remove space after the tag keyword (Pawn)
 sp_sizeof_paren                          = ignore   # ignore/add/remove/force
 
 # Add or remove space after the tag keyword (Pawn)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_tag                             = ignore   # ignore/add/remove/force
 
 # Add or remove space inside enum '{' and '}'
 sp_after_tag                             = ignore   # ignore/add/remove/force
 
 # Add or remove space inside enum '{' and '}'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_inside_braces_enum                    = ignore   # ignore/add/remove/force
 
 # Add or remove space inside struct/union '{' and '}'
 sp_inside_braces_enum                    = ignore   # ignore/add/remove/force
 
 # Add or remove space inside struct/union '{' and '}'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_inside_braces_struct                  = ignore   # ignore/add/remove/force
 
 # Add or remove space inside '{' and '}'
 sp_inside_braces_struct                  = ignore   # ignore/add/remove/force
 
 # Add or remove space inside '{' and '}'
-sp_inside_braces                         = ignore   # ignore/add/remove/force
+sp_inside_braces                         = add      # ignore/add/remove/force
 
 # Add or remove space inside '{}'
 
 # Add or remove space inside '{}'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_inside_braces_empty                   = ignore   # ignore/add/remove/force
 
 # Add or remove space between return type and function name
 # A minimum of 1 is forced except for pointer return types.
 sp_inside_braces_empty                   = ignore   # ignore/add/remove/force
 
 # Add or remove space between return type and function name
 # A minimum of 1 is forced except for pointer return types.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_type_func                             = ignore   # ignore/add/remove/force
 
 # Add or remove space between function name and '(' on function declaration
 sp_type_func                             = ignore   # ignore/add/remove/force
 
 # Add or remove space between function name and '(' on function declaration
-sp_func_proto_paren                      = ignore   # ignore/add/remove/force
+sp_func_proto_paren                      = remove   # ignore/add/remove/force
 
 # Add or remove space between function name and '(' on function definition
 
 # Add or remove space between function name and '(' on function definition
-sp_func_def_paren                        = ignore   # ignore/add/remove/force
+# NOTE: is 14 worse than ignore
+sp_func_def_paren                        = remove   # ignore/add/remove/force
 
 # Add or remove space inside empty function '()'
 
 # Add or remove space inside empty function '()'
-sp_inside_fparens                        = ignore   # ignore/add/remove/force
+sp_inside_fparens                        = remove   # ignore/add/remove/force
 
 # Add or remove space inside function '(' and ')'
 
 # Add or remove space inside function '(' and ')'
-sp_inside_fparen                         = ignore   # ignore/add/remove/force
+# NOTE: is 8 worse than ignore
+sp_inside_fparen                         = remove   # ignore/add/remove/force
 
 # Add or remove space between ']' and '(' when part of a function call.
 
 # Add or remove space between ']' and '(' when part of a function call.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_square_fparen                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between ')' and '{' of function
 sp_square_fparen                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between ')' and '{' of function
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_fparen_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove space between function name and '(' on function calls
 sp_fparen_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove space between function name and '(' on function calls
-sp_func_call_paren                       = add      # ignore/add/remove/force
+# NOTE: is 28 worse than ignore
+sp_func_call_paren                       = remove   # ignore/add/remove/force
 
 # Add or remove space between function name and '()' on function calls without parameters.
 # If set to 'ignore' (the default), sp_func_call_paren is used.
 
 # Add or remove space between function name and '()' on function calls without parameters.
 # If set to 'ignore' (the default), sp_func_call_paren is used.
-sp_func_call_paren_empty                 = ignore   # ignore/add/remove/force
+sp_func_call_paren_empty                 = remove   # ignore/add/remove/force
 
 # Add or remove space between the user function name and '(' on function calls
 # You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file.
 
 # Add or remove space between the user function name and '(' on function calls
 # You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file.
-sp_func_call_user_paren                  = ignore   # ignore/add/remove/force
+sp_func_call_user_paren                  = remove   # ignore/add/remove/force
 
 # Add or remove space between a constructor/destructor and the open paren
 
 # Add or remove space between a constructor/destructor and the open paren
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_func_class_paren                      = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'return' and '('
 sp_func_class_paren                      = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'return' and '('
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_return_paren                          = ignore   # ignore/add/remove/force
 
 # Add or remove space between '__attribute__' and '('
 sp_return_paren                          = ignore   # ignore/add/remove/force
 
 # Add or remove space between '__attribute__' and '('
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_attribute_paren                       = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'defined' and '(' in '#if defined (FOO)'
 sp_attribute_paren                       = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'defined' and '(' in '#if defined (FOO)'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_defined_paren                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'throw' and '(' in 'throw (something)'
 sp_defined_paren                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'throw' and '(' in 'throw (something)'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_throw_paren                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between macro and value
 sp_throw_paren                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between macro and value
-sp_macro                                 = ignore   # ignore/add/remove/force
+sp_macro                                 = remove   # ignore/add/remove/force #force
 
 # Add or remove space between macro function ')' and value
 
 # Add or remove space between macro function ')' and value
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_macro_func                            = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'else' and '{' if on the same line
 sp_macro_func                            = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'else' and '{' if on the same line
-sp_else_brace                            = ignore   # ignore/add/remove/force
+sp_else_brace                            = add      # ignore/add/remove/force
 
 # Add or remove space between '}' and 'else' if on the same line
 
 # Add or remove space between '}' and 'else' if on the same line
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_brace_else                            = ignore   # ignore/add/remove/force
 
 # Add or remove space between '}' and the name of a typedef on the same line
 sp_brace_else                            = ignore   # ignore/add/remove/force
 
 # Add or remove space between '}' and the name of a typedef on the same line
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_brace_typedef                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'catch' and '{' if on the same line
 sp_brace_typedef                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'catch' and '{' if on the same line
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_catch_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between '}' and 'catch' if on the same line
 sp_catch_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between '}' and 'catch' if on the same line
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_brace_catch                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'finally' and '{' if on the same line
 sp_brace_catch                           = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'finally' and '{' if on the same line
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_finally_brace                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between '}' and 'finally' if on the same line
 sp_finally_brace                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between '}' and 'finally' if on the same line
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_brace_finally                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'try' and '{' if on the same line
 sp_brace_finally                         = ignore   # ignore/add/remove/force
 
 # Add or remove space between 'try' and '{' if on the same line
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_try_brace                             = ignore   # ignore/add/remove/force
 
 # Add or remove space between get/set and '{' if on the same line
 sp_try_brace                             = ignore   # ignore/add/remove/force
 
 # Add or remove space between get/set and '{' if on the same line
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_getset_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove space before the '::' operator
 sp_getset_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove space before the '::' operator
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_dc                             = ignore   # ignore/add/remove/force
 
 # Add or remove space after the '::' operator
 sp_before_dc                             = ignore   # ignore/add/remove/force
 
 # Add or remove space after the '::' operator
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_dc                              = ignore   # ignore/add/remove/force
 
 # Add or remove around the D named array initializer ':' operator
 sp_after_dc                              = ignore   # ignore/add/remove/force
 
 # Add or remove around the D named array initializer ':' operator
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_d_array_colon                         = ignore   # ignore/add/remove/force
 
 # Add or remove space after the '!' (not) operator. Default=Remove
 sp_d_array_colon                         = ignore   # ignore/add/remove/force
 
 # Add or remove space after the '!' (not) operator. Default=Remove
@@ -505,89 +605,109 @@ sp_inv                                   = remove   # ignore/add/remove/force
 
 # Add or remove space after the '&' (address-of) operator. Default=Remove
 # This does not affect the spacing after a '&' that is part of a type.
 
 # Add or remove space after the '&' (address-of) operator. Default=Remove
 # This does not affect the spacing after a '&' that is part of a type.
-sp_addr                                  = remove   # ignore/add/remove/force
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+sp_addr                                  = ignore   # ignore/add/remove/force
 
 # Add or remove space around the '.' or '->' operators. Default=Remove
 
 # Add or remove space around the '.' or '->' operators. Default=Remove
+# NOTE: is 4 worse than ignore
 sp_member                                = remove   # ignore/add/remove/force
 
 # Add or remove space after the '*' (dereference) operator. Default=Remove
 # This does not affect the spacing after a '*' that is part of a type.
 sp_member                                = remove   # ignore/add/remove/force
 
 # Add or remove space after the '*' (dereference) operator. Default=Remove
 # This does not affect the spacing after a '*' that is part of a type.
-sp_deref                                 = remove   # ignore/add/remove/force
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+sp_deref                                 = ignore   # ignore/add/remove/force
 
 # Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove
 
 # Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove
+# NOTE: is 2 worse than ignore
 sp_sign                                  = remove   # ignore/add/remove/force
 
 # Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove
 sp_incdec                                = remove   # ignore/add/remove/force
 
 # Add or remove space before a backslash-newline at the end of a line. Default=Add
 sp_sign                                  = remove   # ignore/add/remove/force
 
 # Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove
 sp_incdec                                = remove   # ignore/add/remove/force
 
 # Add or remove space before a backslash-newline at the end of a line. Default=Add
-sp_before_nl_cont                        = add      # ignore/add/remove/force
+sp_before_nl_cont                        = add      # ignore/add/remove/force #force
 
 # Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'
 
 # Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_oc_scope                        = ignore   # ignore/add/remove/force
 
 # Add or remove space after the colon in message specs
 # '-(int) f:(int) x;' vs '-(int) f: (int) x;'
 sp_after_oc_scope                        = ignore   # ignore/add/remove/force
 
 # Add or remove space after the colon in message specs
 # '-(int) f:(int) x;' vs '-(int) f: (int) x;'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_oc_colon                        = ignore   # ignore/add/remove/force
 
 # Add or remove space before the colon in message specs
 # '-(int) f: (int) x;' vs '-(int) f : (int) x;'
 sp_after_oc_colon                        = ignore   # ignore/add/remove/force
 
 # Add or remove space before the colon in message specs
 # '-(int) f: (int) x;' vs '-(int) f : (int) x;'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_oc_colon                       = ignore   # ignore/add/remove/force
 
 # Add or remove space after the colon in message specs
 # '[object setValue:1];' vs '[object setValue: 1];'
 sp_before_oc_colon                       = ignore   # ignore/add/remove/force
 
 # Add or remove space after the colon in message specs
 # '[object setValue:1];' vs '[object setValue: 1];'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_send_oc_colon                   = ignore   # ignore/add/remove/force
 
 # Add or remove space before the colon in message specs
 # '[object setValue:1];' vs '[object setValue :1];'
 sp_after_send_oc_colon                   = ignore   # ignore/add/remove/force
 
 # Add or remove space before the colon in message specs
 # '[object setValue:1];' vs '[object setValue :1];'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_send_oc_colon                  = ignore   # ignore/add/remove/force
 
 # Add or remove space after the (type) in message specs
 # '-(int)f: (int) x;' vs '-(int)f: (int)x;'
 sp_before_send_oc_colon                  = ignore   # ignore/add/remove/force
 
 # Add or remove space after the (type) in message specs
 # '-(int)f: (int) x;' vs '-(int)f: (int)x;'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_oc_type                         = ignore   # ignore/add/remove/force
 
 # Add or remove space after the first (type) in message specs
 # '-(int) f:(int)x;' vs '-(int)f:(int)x;'
 sp_after_oc_type                         = ignore   # ignore/add/remove/force
 
 # Add or remove space after the first (type) in message specs
 # '-(int) f:(int)x;' vs '-(int)f:(int)x;'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_oc_return_type                  = ignore   # ignore/add/remove/force
 
 # Add or remove space between '@selector' and '('
 # '@selector(msgName)' vs '@selector (msgName)'
 # Also applies to @protocol() constructs
 sp_after_oc_return_type                  = ignore   # ignore/add/remove/force
 
 # Add or remove space between '@selector' and '('
 # '@selector(msgName)' vs '@selector (msgName)'
 # Also applies to @protocol() constructs
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_oc_at_sel                       = ignore   # ignore/add/remove/force
 
 # Add or remove space between '@selector(x)' and the following word
 # '@selector(foo) a:' vs '@selector(foo)a:'
 sp_after_oc_at_sel                       = ignore   # ignore/add/remove/force
 
 # Add or remove space between '@selector(x)' and the following word
 # '@selector(foo) a:' vs '@selector(foo)a:'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_oc_at_sel_parens                = ignore   # ignore/add/remove/force
 
 # Add or remove space inside '@selector' parens
 # '@selector(foo)' vs '@selector( foo )'
 # Also applies to @protocol() constructs
 sp_after_oc_at_sel_parens                = ignore   # ignore/add/remove/force
 
 # Add or remove space inside '@selector' parens
 # '@selector(foo)' vs '@selector( foo )'
 # Also applies to @protocol() constructs
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_inside_oc_at_sel_parens               = ignore   # ignore/add/remove/force
 
 # Add or remove space before a block pointer caret
 # '^int (int arg){...}' vs. ' ^int (int arg){...}'
 sp_inside_oc_at_sel_parens               = ignore   # ignore/add/remove/force
 
 # Add or remove space before a block pointer caret
 # '^int (int arg){...}' vs. ' ^int (int arg){...}'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_before_oc_block_caret                 = ignore   # ignore/add/remove/force
 
 # Add or remove space after a block pointer caret
 # '^int (int arg){...}' vs. '^ int (int arg){...}'
 sp_before_oc_block_caret                 = ignore   # ignore/add/remove/force
 
 # Add or remove space after a block pointer caret
 # '^int (int arg){...}' vs. '^ int (int arg){...}'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_after_oc_block_caret                  = ignore   # ignore/add/remove/force
 
 # Add or remove space around the ':' in 'b ? t : f'
 sp_after_oc_block_caret                  = ignore   # ignore/add/remove/force
 
 # Add or remove space around the ':' in 'b ? t : f'
-sp_cond_colon                            = ignore   # ignore/add/remove/force
+sp_cond_colon                            = add      # ignore/add/remove/force
 
 # Add or remove space around the '?' in 'b ? t : f'
 
 # Add or remove space around the '?' in 'b ? t : f'
-sp_cond_question                         = ignore   # ignore/add/remove/force
+sp_cond_question                         = add      # ignore/add/remove/force
 
 # Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here.
 
 # Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_case_label                            = ignore   # ignore/add/remove/force
 
 # Control the space around the D '..' operator.
 sp_case_label                            = ignore   # ignore/add/remove/force
 
 # Control the space around the D '..' operator.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_range                                 = ignore   # ignore/add/remove/force
 
 # Control the space after the opening of a C++ comment '// A' vs '//A'
 sp_range                                 = ignore   # ignore/add/remove/force
 
 # Control the space after the opening of a C++ comment '// A' vs '//A'
-sp_cmt_cpp_start                         = ignore   # ignore/add/remove/force
+# NOTE: is 246 worse than ignore
+sp_cmt_cpp_start                         = add      # ignore/add/remove/force
 
 # Controls the spaces between #else or #endif and a trailing comment
 
 # Controls the spaces between #else or #endif and a trailing comment
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 sp_endif_cmt                             = ignore   # ignore/add/remove/force
 
 #
 sp_endif_cmt                             = ignore   # ignore/add/remove/force
 
 #
@@ -595,18 +715,22 @@ sp_endif_cmt                             = ignore   # ignore/add/remove/force
 #
 
 # Whether to keep non-indenting tabs
 #
 
 # Whether to keep non-indenting tabs
-align_keep_tabs                          = false    # false/true
+align_keep_tabs                          = false    # false/true #force
 
 # Whether to use tabs for aligning
 
 # Whether to use tabs for aligning
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_with_tabs                          = false    # false/true
 
 # Whether to bump out to the next tab when aligning
 align_with_tabs                          = false    # false/true
 
 # Whether to bump out to the next tab when aligning
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_on_tabstop                         = false    # false/true
 
 # Whether to left-align numbers
 align_on_tabstop                         = false    # false/true
 
 # Whether to left-align numbers
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_number_left                        = false    # false/true
 
 # Align variable definitions in prototypes and functions
 align_number_left                        = false    # false/true
 
 # Align variable definitions in prototypes and functions
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_func_params                        = false    # false/true
 
 # Align parameters in single-line functions that have the same name.
 align_func_params                        = false    # false/true
 
 # Align parameters in single-line functions that have the same name.
@@ -620,114 +744,142 @@ align_var_def_span                       = 0        # number
 #  0=Part of the type     'void *   foo;'
 #  1=Part of the variable 'void     *foo;'
 #  2=Dangling             'void    *foo;'
 #  0=Part of the type     'void *   foo;'
 #  1=Part of the variable 'void     *foo;'
 #  2=Dangling             'void    *foo;'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_var_def_star_style                 = 0        # number
 
 # How to align the '&' in variable definitions.
 #  0=Part of the type
 #  1=Part of the variable
 #  2=Dangling
 align_var_def_star_style                 = 0        # number
 
 # How to align the '&' in variable definitions.
 #  0=Part of the type
 #  1=Part of the variable
 #  2=Dangling
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_var_def_amp_style                  = 0        # number
 
 # The threshold for aligning variable definitions (0=no limit)
 align_var_def_amp_style                  = 0        # number
 
 # The threshold for aligning variable definitions (0=no limit)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_var_def_thresh                     = 0        # number
 
 # The gap for aligning variable definitions
 align_var_def_thresh                     = 0        # number
 
 # The gap for aligning variable definitions
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_var_def_gap                        = 0        # number
 
 # Whether to align the colon in struct bit fields
 align_var_def_gap                        = 0        # number
 
 # Whether to align the colon in struct bit fields
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_var_def_colon                      = false    # false/true
 
 # Whether to align any attribute after the variable name
 align_var_def_colon                      = false    # false/true
 
 # Whether to align any attribute after the variable name
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_var_def_attribute                  = false    # false/true
 
 # Whether to align inline struct/enum/union variable definitions
 align_var_def_attribute                  = false    # false/true
 
 # Whether to align inline struct/enum/union variable definitions
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_var_def_inline                     = false    # false/true
 
 # The span for aligning on '=' in assignments (0=don't align)
 align_assign_span                        = 0        # number
 
 # The threshold for aligning on '=' in assignments (0=no limit)
 align_var_def_inline                     = false    # false/true
 
 # The span for aligning on '=' in assignments (0=don't align)
 align_assign_span                        = 0        # number
 
 # The threshold for aligning on '=' in assignments (0=no limit)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_assign_thresh                      = 0        # number
 
 # The span for aligning on '=' in enums (0=don't align)
 align_assign_thresh                      = 0        # number
 
 # The span for aligning on '=' in enums (0=don't align)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_enum_equ_span                      = 0        # number
 
 # The threshold for aligning on '=' in enums (0=no limit)
 align_enum_equ_span                      = 0        # number
 
 # The threshold for aligning on '=' in enums (0=no limit)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_enum_equ_thresh                    = 0        # number
 
 # The span for aligning struct/union (0=don't align)
 align_var_struct_span                    = 0        # number
 
 # The threshold for aligning struct/union member definitions (0=no limit)
 align_enum_equ_thresh                    = 0        # number
 
 # The span for aligning struct/union (0=don't align)
 align_var_struct_span                    = 0        # number
 
 # The threshold for aligning struct/union member definitions (0=no limit)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_var_struct_thresh                  = 0        # number
 
 # The gap for aligning struct/union member definitions
 align_var_struct_thresh                  = 0        # number
 
 # The gap for aligning struct/union member definitions
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_var_struct_gap                     = 0        # number
 
 # The span for aligning struct initializer values (0=don't align)
 align_var_struct_gap                     = 0        # number
 
 # The span for aligning struct initializer values (0=don't align)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_struct_init_span                   = 0        # number
 
 # The minimum space between the type and the synonym of a typedef
 align_struct_init_span                   = 0        # number
 
 # The minimum space between the type and the synonym of a typedef
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_typedef_gap                        = 0        # number
 
 # The span for aligning single-line typedefs (0=don't align)
 align_typedef_gap                        = 0        # number
 
 # The span for aligning single-line typedefs (0=don't align)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_typedef_span                       = 0        # number
 
 # How to align typedef'd functions with other typedefs
 # 0: Don't mix them at all
 # 1: align the open paren with the types
 # 2: align the function type name with the other type names
 align_typedef_span                       = 0        # number
 
 # How to align typedef'd functions with other typedefs
 # 0: Don't mix them at all
 # 1: align the open paren with the types
 # 2: align the function type name with the other type names
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_typedef_func                       = 0        # number
 
 # Controls the positioning of the '*' in typedefs. Just try it.
 # 0: Align on typedef type, ignore '*'
 # 1: The '*' is part of type name: typedef int  *pint;
 # 2: The '*' is part of the type, but dangling: typedef int *pint;
 align_typedef_func                       = 0        # number
 
 # Controls the positioning of the '*' in typedefs. Just try it.
 # 0: Align on typedef type, ignore '*'
 # 1: The '*' is part of type name: typedef int  *pint;
 # 2: The '*' is part of the type, but dangling: typedef int *pint;
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_typedef_star_style                 = 0        # number
 
 # Controls the positioning of the '&' in typedefs. Just try it.
 # 0: Align on typedef type, ignore '&'
 # 1: The '&' is part of type name: typedef int  &pint;
 # 2: The '&' is part of the type, but dangling: typedef int &pint;
 align_typedef_star_style                 = 0        # number
 
 # Controls the positioning of the '&' in typedefs. Just try it.
 # 0: Align on typedef type, ignore '&'
 # 1: The '&' is part of type name: typedef int  &pint;
 # 2: The '&' is part of the type, but dangling: typedef int &pint;
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_typedef_amp_style                  = 0        # number
 
 # The span for aligning comments that end lines (0=don't align)
 align_right_cmt_span                     = 0        # number
 
 # If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment
 align_typedef_amp_style                  = 0        # number
 
 # The span for aligning comments that end lines (0=don't align)
 align_right_cmt_span                     = 0        # number
 
 # If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_right_cmt_mix                      = false    # false/true
 
 # If a trailing comment is more than this number of columns away from the text it follows,
 # it will qualify for being aligned. This has to be > 0 to do anything.
 align_right_cmt_mix                      = false    # false/true
 
 # If a trailing comment is more than this number of columns away from the text it follows,
 # it will qualify for being aligned. This has to be > 0 to do anything.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_right_cmt_gap                      = 0        # number
 
 # Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore)
 align_right_cmt_gap                      = 0        # number
 
 # Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_right_cmt_at_col                   = 0        # number
 
 # The span for aligning function prototypes (0=don't align)
 align_func_proto_span                    = 0        # number
 
 # Minimum gap between the return type and the function name.
 align_right_cmt_at_col                   = 0        # number
 
 # The span for aligning function prototypes (0=don't align)
 align_func_proto_span                    = 0        # number
 
 # Minimum gap between the return type and the function name.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_func_proto_gap                     = 0        # number
 
 # Align function protos on the 'operator' keyword instead of what follows
 align_func_proto_gap                     = 0        # number
 
 # Align function protos on the 'operator' keyword instead of what follows
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_on_operator                        = false    # false/true
 
 # Whether to mix aligning prototype and variable declarations.
 # If true, align_var_def_XXX options are used instead of align_func_proto_XXX options.
 align_on_operator                        = false    # false/true
 
 # Whether to mix aligning prototype and variable declarations.
 # If true, align_var_def_XXX options are used instead of align_func_proto_XXX options.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_mix_var_proto                      = false    # false/true
 
 # Align single-line functions with function prototypes, uses align_func_proto_span
 align_mix_var_proto                      = false    # false/true
 
 # Align single-line functions with function prototypes, uses align_func_proto_span
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_single_line_func                   = false    # false/true
 
 # Aligning the open brace of single-line functions.
 # Requires align_single_line_func=true, uses align_func_proto_span
 align_single_line_func                   = false    # false/true
 
 # Aligning the open brace of single-line functions.
 # Requires align_single_line_func=true, uses align_func_proto_span
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_single_line_brace                  = false    # false/true
 
 # Gap for align_single_line_brace.
 align_single_line_brace                  = false    # false/true
 
 # Gap for align_single_line_brace.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_single_line_brace_gap              = 0        # number
 
 # The span for aligning ObjC msg spec (0=don't align)
 align_single_line_brace_gap              = 0        # number
 
 # The span for aligning ObjC msg spec (0=don't align)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_oc_msg_spec_span                   = 0        # number
 
 # Whether to align macros wrapped with a backslash and a newline.
 align_oc_msg_spec_span                   = 0        # number
 
 # Whether to align macros wrapped with a backslash and a newline.
@@ -735,18 +887,22 @@ align_oc_msg_spec_span                   = 0        # number
 align_nl_cont                            = false    # false/true
 
 # The minimum space between label and value of a preprocessor define
 align_nl_cont                            = false    # false/true
 
 # The minimum space between label and value of a preprocessor define
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_pp_define_gap                      = 0        # number
 
 # The span for aligning on '#define' bodies (0=don't align)
 align_pp_define_span                     = 0        # number
 
 # Align lines that start with '<<' with previous '<<'. Default=true
 align_pp_define_gap                      = 0        # number
 
 # The span for aligning on '#define' bodies (0=don't align)
 align_pp_define_span                     = 0        # number
 
 # Align lines that start with '<<' with previous '<<'. Default=true
-align_left_shift                         = true     # false/true
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+align_left_shift                         = false    # false/true
 
 # Span for aligning parameters in an Obj-C message call on the ':' (0=don't align)
 
 # Span for aligning parameters in an Obj-C message call on the ':' (0=don't align)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_oc_msg_colon_span                  = 0        # number
 
 # Aligning parameters in an Obj-C '+' or '-' declaration on the ':'
 align_oc_msg_colon_span                  = 0        # number
 
 # Aligning parameters in an Obj-C '+' or '-' declaration on the ':'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 align_oc_decl_colon                      = false    # false/true
 
 #
 align_oc_decl_colon                      = false    # false/true
 
 #
@@ -757,118 +913,142 @@ align_oc_decl_colon                      = false    # false/true
 nl_collapse_empty_body                   = false    # false/true
 
 # Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'
 nl_collapse_empty_body                   = false    # false/true
 
 # Don't split one-line braced assignments - 'foo_t f = { 1, 2 };'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_assign_leave_one_liners               = false    # false/true
 
 # Don't split one-line braced statements inside a class xx { } body
 nl_assign_leave_one_liners               = false    # false/true
 
 # Don't split one-line braced statements inside a class xx { } body
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_class_leave_one_liners                = false    # false/true
 
 # Don't split one-line enums: 'enum foo { BAR = 15 };'
 nl_class_leave_one_liners                = false    # false/true
 
 # Don't split one-line enums: 'enum foo { BAR = 15 };'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_enum_leave_one_liners                 = false    # false/true
 
 # Don't split one-line get or set functions
 nl_enum_leave_one_liners                 = false    # false/true
 
 # Don't split one-line get or set functions
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_getset_leave_one_liners               = false    # false/true
 
 # Don't split one-line function definitions - 'int foo() { return 0; }'
 nl_getset_leave_one_liners               = false    # false/true
 
 # Don't split one-line function definitions - 'int foo() { return 0; }'
-nl_func_leave_one_liners                 = false    # false/true
+nl_func_leave_one_liners                 = true     # false/true
 
 # Don't split one-line if/else statements - 'if(a) b++;'
 nl_if_leave_one_liners                   = true     # false/true
 
 # Add or remove newlines at the start of the file
 
 # Don't split one-line if/else statements - 'if(a) b++;'
 nl_if_leave_one_liners                   = true     # false/true
 
 # Add or remove newlines at the start of the file
-nl_start_of_file                         = ignore   # ignore/add/remove/force
+nl_start_of_file                         = remove   # ignore/add/remove/force #force
 
 # The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force'
 
 # The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_start_of_file_min                     = 0        # number
 
 # Add or remove newline at the end of the file
 nl_start_of_file_min                     = 0        # number
 
 # Add or remove newline at the end of the file
-nl_end_of_file                           = ignore   # ignore/add/remove/force
+nl_end_of_file                           = add      # ignore/add/remove/force
 
 # The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force')
 nl_end_of_file_min                       = 0        # number
 
 # Add or remove newline between '=' and '{'
 
 # The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force')
 nl_end_of_file_min                       = 0        # number
 
 # Add or remove newline between '=' and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_assign_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove newline between '=' and '[' (D only)
 nl_assign_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove newline between '=' and '[' (D only)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_assign_square                         = ignore   # ignore/add/remove/force
 
 # Add or remove newline after '= [' (D only). Will also affect the newline before the ']'
 nl_assign_square                         = ignore   # ignore/add/remove/force
 
 # Add or remove newline after '= [' (D only). Will also affect the newline before the ']'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_after_square_assign                   = ignore   # ignore/add/remove/force
 
 # The number of blank lines after a block of variable definitions
 nl_after_square_assign                   = ignore   # ignore/add/remove/force
 
 # The number of blank lines after a block of variable definitions
-nl_func_var_def_blk                      = 0        # number
+nl_func_var_def_blk                      = 0        # number #force
 
 # Add or remove newline between a function call's ')' and '{', as in:
 # list_for_each(item, &list) { }
 
 # Add or remove newline between a function call's ')' and '{', as in:
 # list_for_each(item, &list) { }
-nl_fcall_brace                           = ignore   # ignore/add/remove/force
+nl_fcall_brace                           = add      # ignore/add/remove/force
 
 # Add or remove newline between 'enum' and '{'
 
 # Add or remove newline between 'enum' and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_enum_brace                            = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'struct and '{'
 nl_enum_brace                            = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'struct and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_struct_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'union' and '{'
 nl_struct_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'union' and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_union_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'if' and '{'
 nl_union_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'if' and '{'
-nl_if_brace                              = ignore   # ignore/add/remove/force
+# NOTE: is 120 worse than ignore
+nl_if_brace                              = add      # ignore/add/remove/force
 
 # Add or remove newline between '}' and 'else'
 
 # Add or remove newline between '}' and 'else'
-nl_brace_else                            = ignore   # ignore/add/remove/force
+nl_brace_else                            = add      # ignore/add/remove/force
 
 # Add or remove newline between 'else if' and '{'
 # If set to ignore, nl_if_brace is used instead
 
 # Add or remove newline between 'else if' and '{'
 # If set to ignore, nl_if_brace is used instead
-nl_elseif_brace                          = ignore   # ignore/add/remove/force
+nl_elseif_brace                          = add      # ignore/add/remove/force
 
 # Add or remove newline between 'else' and '{'
 
 # Add or remove newline between 'else' and '{'
-nl_else_brace                            = ignore   # ignore/add/remove/force
+nl_else_brace                            = add      # ignore/add/remove/force
 
 # Add or remove newline between 'else' and 'if'
 
 # Add or remove newline between 'else' and 'if'
-nl_else_if                               = ignore   # ignore/add/remove/force
+nl_else_if                               = remove   # ignore/add/remove/force
 
 # Add or remove newline between '}' and 'finally'
 
 # Add or remove newline between '}' and 'finally'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_brace_finally                         = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'finally' and '{'
 nl_brace_finally                         = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'finally' and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_finally_brace                         = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'try' and '{'
 nl_finally_brace                         = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'try' and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_try_brace                             = ignore   # ignore/add/remove/force
 
 # Add or remove newline between get/set and '{'
 nl_try_brace                             = ignore   # ignore/add/remove/force
 
 # Add or remove newline between get/set and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_getset_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'for' and '{'
 nl_getset_brace                          = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'for' and '{'
-nl_for_brace                             = ignore   # ignore/add/remove/force
+# NOTE: is 23 worse than ignore
+nl_for_brace                             = add      # ignore/add/remove/force
 
 # Add or remove newline between 'catch' and '{'
 
 # Add or remove newline between 'catch' and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_catch_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between '}' and 'catch'
 nl_catch_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between '}' and 'catch'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_brace_catch                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'while' and '{'
 nl_brace_catch                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'while' and '{'
-nl_while_brace                           = ignore   # ignore/add/remove/force
+# NOTE: is 8 worse than ignore
+nl_while_brace                           = add      # ignore/add/remove/force
 
 # Add or remove newline between 'using' and '{'
 
 # Add or remove newline between 'using' and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_using_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between two open or close braces.
 # Due to general newline/brace handling, REMOVE may not work.
 nl_using_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between two open or close braces.
 # Due to general newline/brace handling, REMOVE may not work.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_brace_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'do' and '{'
 nl_brace_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'do' and '{'
-nl_do_brace                              = ignore   # ignore/add/remove/force
+nl_do_brace                              = add      # ignore/add/remove/force
 
 # Add or remove newline between '}' and 'while' of 'do' statement
 
 # Add or remove newline between '}' and 'while' of 'do' statement
-nl_brace_while                           = ignore   # ignore/add/remove/force
+nl_brace_while                           = add      # ignore/add/remove/force #force
 
 # Add or remove newline between 'switch' and '{'
 
 # Add or remove newline between 'switch' and '{'
-nl_switch_brace                          = ignore   # ignore/add/remove/force
+# NOTE: is 20 worse than ignore
+nl_switch_brace                          = add      # ignore/add/remove/force
 
 # Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc.
 # Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace.
 
 # Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc.
 # Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_multi_line_cond                       = false    # false/true
 
 # Force a newline in a define after the macro name for multi-line defines.
 nl_multi_line_cond                       = false    # false/true
 
 # Force a newline in a define after the macro name for multi-line defines.
@@ -878,160 +1058,178 @@ nl_multi_line_define                     = false    # false/true
 nl_before_case                           = false    # false/true
 
 # Add or remove newline between ')' and 'throw'
 nl_before_case                           = false    # false/true
 
 # Add or remove newline between ')' and 'throw'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_before_throw                          = ignore   # ignore/add/remove/force
 
 # Whether to put a newline after 'case' statement
 nl_after_case                            = false    # false/true
 
 # Newline between namespace and {
 nl_before_throw                          = ignore   # ignore/add/remove/force
 
 # Whether to put a newline after 'case' statement
 nl_after_case                            = false    # false/true
 
 # Newline between namespace and {
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_namespace_brace                       = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'template<>' and whatever follows.
 nl_namespace_brace                       = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'template<>' and whatever follows.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_template_class                        = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'class' and '{'
 nl_template_class                        = ignore   # ignore/add/remove/force
 
 # Add or remove newline between 'class' and '{'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_class_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline after each ',' in the constructor member initialization
 nl_class_brace                           = ignore   # ignore/add/remove/force
 
 # Add or remove newline after each ',' in the constructor member initialization
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_class_init_args                       = ignore   # ignore/add/remove/force
 
 # Add or remove newline between return type and function name in a function definition
 nl_class_init_args                       = ignore   # ignore/add/remove/force
 
 # Add or remove newline between return type and function name in a function definition
-nl_func_type_name                        = ignore   # ignore/add/remove/force
+nl_func_type_name                        = remove   # ignore/add/remove/force
 
 # Add or remove newline between return type and function name inside a class {}
 # Uses nl_func_type_name or nl_func_proto_type_name if set to ignore.
 
 # Add or remove newline between return type and function name inside a class {}
 # Uses nl_func_type_name or nl_func_proto_type_name if set to ignore.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_func_type_name_class                  = ignore   # ignore/add/remove/force
 
 # Add or remove newline between function scope and name in a definition
 # Controls the newline after '::' in 'void A::f() { }'
 nl_func_type_name_class                  = ignore   # ignore/add/remove/force
 
 # Add or remove newline between function scope and name in a definition
 # Controls the newline after '::' in 'void A::f() { }'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_func_scope_name                       = ignore   # ignore/add/remove/force
 
 # Add or remove newline between return type and function name in a prototype
 nl_func_scope_name                       = ignore   # ignore/add/remove/force
 
 # Add or remove newline between return type and function name in a prototype
-nl_func_proto_type_name                  = ignore   # ignore/add/remove/force
+# NOTE: is 1 worse than ignore
+nl_func_proto_type_name                  = remove   # ignore/add/remove/force
 
 # Add or remove newline between a function name and the opening '('
 
 # Add or remove newline between a function name and the opening '('
-nl_func_paren                            = ignore   # ignore/add/remove/force
+nl_func_paren                            = remove   # ignore/add/remove/force
 
 # Add or remove newline between a function name and the opening '(' in the definition
 
 # Add or remove newline between a function name and the opening '(' in the definition
-nl_func_def_paren                        = ignore   # ignore/add/remove/force
+nl_func_def_paren                        = remove   # ignore/add/remove/force
 
 # Add or remove newline after '(' in a function declaration
 
 # Add or remove newline after '(' in a function declaration
-nl_func_decl_start                       = ignore   # ignore/add/remove/force
+nl_func_decl_start                       = remove   # ignore/add/remove/force
 
 # Add or remove newline after '(' in a function definition
 
 # Add or remove newline after '(' in a function definition
-nl_func_def_start                        = ignore   # ignore/add/remove/force
+nl_func_def_start                        = remove   # ignore/add/remove/force
 
 
-# Overrides nl_func_decl_start when there is only one parameter.
-nl_func_decl_start_single                = ignore   # ignore/add/remove/force
-
-# Overrides nl_func_def_start when there is only one parameter.
-nl_func_def_start_single                 = ignore   # ignore/add/remove/force
+# Overrides nl_func_decl_start when there is only one parameter.
+nl_func_decl_start_single                = ignore   # ignore/add/remove/force
+#
+# Overrides nl_func_def_start when there is only one parameter.
+nl_func_def_start_single                 = ignore   # ignore/add/remove/force
 
 # Add or remove newline after each ',' in a function declaration
 
 # Add or remove newline after each ',' in a function declaration
-nl_func_decl_args                        = ignore   # ignore/add/remove/force
+nl_func_decl_args                        = remove   # ignore/add/remove/force
 
 # Add or remove newline after each ',' in a function definition
 
 # Add or remove newline after each ',' in a function definition
-nl_func_def_args                         = ignore   # ignore/add/remove/force
+nl_func_def_args                         = remove   # ignore/add/remove/force
 
 # Add or remove newline before the ')' in a function declaration
 
 # Add or remove newline before the ')' in a function declaration
-nl_func_decl_end                         = ignore   # ignore/add/remove/force
+nl_func_decl_end                         = remove   # ignore/add/remove/force
 
 # Add or remove newline before the ')' in a function definition
 
 # Add or remove newline before the ')' in a function definition
-nl_func_def_end                          = ignore   # ignore/add/remove/force
+nl_func_def_end                          = remove   # ignore/add/remove/force
 
 
-# Overrides nl_func_decl_end when there is only one parameter.
-nl_func_decl_end_single                  = ignore   # ignore/add/remove/force
-
-# Overrides nl_func_def_end when there is only one parameter.
-nl_func_def_end_single                   = ignore   # ignore/add/remove/force
+# Overrides nl_func_decl_end when there is only one parameter.
+nl_func_decl_end_single                  = ignore   # ignore/add/remove/force
+#
+# Overrides nl_func_def_end when there is only one parameter.
+nl_func_def_end_single                   = ignore   # ignore/add/remove/force
 
 # Add or remove newline between '()' in a function declaration.
 
 # Add or remove newline between '()' in a function declaration.
-nl_func_decl_empty                       = ignore   # ignore/add/remove/force
+nl_func_decl_empty                       = remove   # ignore/add/remove/force
 
 # Add or remove newline between '()' in a function definition.
 
 # Add or remove newline between '()' in a function definition.
-nl_func_def_empty                        = ignore   # ignore/add/remove/force
+nl_func_def_empty                        = remove   # ignore/add/remove/force
 
 # Add or remove newline between function signature and '{'
 
 # Add or remove newline between function signature and '{'
-nl_fdef_brace                            = ignore   # ignore/add/remove/force
+# NOTE: is 27 worse than ignore
+nl_fdef_brace                            = add      # ignore/add/remove/force
 
 # Whether to put a newline after 'return' statement
 nl_after_return                          = false    # false/true
 
 # Add or remove a newline between the return keyword and return expression.
 
 # Whether to put a newline after 'return' statement
 nl_after_return                          = false    # false/true
 
 # Add or remove a newline between the return keyword and return expression.
-nl_return_expr                           = ignore   # ignore/add/remove/force
+# NOTE: is 2 worse than ignore
+nl_return_expr                           = remove   # ignore/add/remove/force
 
 # Whether to put a newline after semicolons, except in 'for' statements
 nl_after_semicolon                       = false    # false/true
 
 # Whether to put a newline after brace open.
 # This also adds a newline before the matching brace close.
 
 # Whether to put a newline after semicolons, except in 'for' statements
 nl_after_semicolon                       = false    # false/true
 
 # Whether to put a newline after brace open.
 # This also adds a newline before the matching brace close.
-nl_after_brace_open                      = true     # false/true
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+nl_after_brace_open                      = false    # false/true
 
 # If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is
 # placed between the open brace and a trailing single-line comment.
 
 # If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is
 # placed between the open brace and a trailing single-line comment.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_after_brace_open_cmt                  = false    # false/true
 
 # Whether to put a newline after a virtual brace open with a non-empty body.
 # These occur in un-braced if/while/do/for statement bodies.
 nl_after_brace_open_cmt                  = false    # false/true
 
 # Whether to put a newline after a virtual brace open with a non-empty body.
 # These occur in un-braced if/while/do/for statement bodies.
-nl_after_vbrace_open                     = true     # false/true
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+nl_after_vbrace_open                     = false    # false/true
 
 # Whether to put a newline after a virtual brace open with an empty body.
 # These occur in un-braced if/while/do/for statement bodies.
 
 # Whether to put a newline after a virtual brace open with an empty body.
 # These occur in un-braced if/while/do/for statement bodies.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_after_vbrace_open_empty               = false    # false/true
 
 # Whether to put a newline after a brace close.
 # Does not apply if followed by a necessary ';'.
 nl_after_vbrace_open_empty               = false    # false/true
 
 # Whether to put a newline after a brace close.
 # Does not apply if followed by a necessary ';'.
-nl_after_brace_close                     = true     # false/true
+nl_after_brace_close                     = false    # false/true
 
 # Whether to put a newline after a virtual brace close.
 # Would add a newline before return in: 'if (foo) a++; return;'
 
 # Whether to put a newline after a virtual brace close.
 # Would add a newline before return in: 'if (foo) a++; return;'
-nl_after_vbrace_close                    = true     # false/true
+nl_after_vbrace_close                    = false    # false/true
 
 # Whether to alter newlines in '#define' macros
 
 # Whether to alter newlines in '#define' macros
-nl_define_macro                          = false    # false/true
+nl_define_macro                          = true     # false/true
 
 # Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'
 
 # Whether to not put blanks after '#ifxx', '#elxx', or before '#endif'
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_squeeze_ifdef                         = false    # false/true
 
 # Add or remove blank line before 'if'
 nl_squeeze_ifdef                         = false    # false/true
 
 # Add or remove blank line before 'if'
-nl_before_if                             = ignore   # ignore/add/remove/force
+nl_before_if                             = ignore   # ignore/add/remove/force #force
 
 # Add or remove blank line after 'if' statement
 
 # Add or remove blank line after 'if' statement
-nl_after_if                              = ignore   # ignore/add/remove/force
+nl_after_if                              = ignore   # ignore/add/remove/force #force
 
 # Add or remove blank line before 'for'
 
 # Add or remove blank line before 'for'
-nl_before_for                            = ignore   # ignore/add/remove/force
+nl_before_for                            = ignore   # ignore/add/remove/force #force
 
 # Add or remove blank line after 'for' statement
 
 # Add or remove blank line after 'for' statement
-nl_after_for                             = ignore   # ignore/add/remove/force
+nl_after_for                             = ignore   # ignore/add/remove/force #force
 
 # Add or remove blank line before 'while'
 
 # Add or remove blank line before 'while'
-nl_before_while                          = ignore   # ignore/add/remove/force
+nl_before_while                          = ignore   # ignore/add/remove/force #force
 
 # Add or remove blank line after 'while' statement
 
 # Add or remove blank line after 'while' statement
-nl_after_while                           = ignore   # ignore/add/remove/force
+nl_after_while                           = ignore   # ignore/add/remove/force #force
 
 # Add or remove blank line before 'switch'
 
 # Add or remove blank line before 'switch'
-nl_before_switch                         = ignore   # ignore/add/remove/force
+nl_before_switch                         = ignore   # ignore/add/remove/force #force
 
 # Add or remove blank line after 'switch' statement
 
 # Add or remove blank line after 'switch' statement
-nl_after_switch                          = ignore   # ignore/add/remove/force
+nl_after_switch                          = ignore   # ignore/add/remove/force #force
 
 # Add or remove blank line before 'do'
 
 # Add or remove blank line before 'do'
-nl_before_do                             = ignore   # ignore/add/remove/force
+nl_before_do                             = ignore   # ignore/add/remove/force #force
 
 # Add or remove blank line after 'do/while' statement
 
 # Add or remove blank line after 'do/while' statement
-nl_after_do                              = ignore   # ignore/add/remove/force
+nl_after_do                              = ignore   # ignore/add/remove/force #force
 
 # Whether to double-space commented-entries in struct/enum
 
 # Whether to double-space commented-entries in struct/enum
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_ds_struct_enum_cmt                    = false    # false/true
 
 # Whether to double-space before the close brace of a struct/union/enum
 # (lower priority than 'eat_blanks_before_close_brace')
 nl_ds_struct_enum_cmt                    = false    # false/true
 
 # Whether to double-space before the close brace of a struct/union/enum
 # (lower priority than 'eat_blanks_before_close_brace')
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_ds_struct_enum_close_brace            = false    # false/true
 
 # Add or remove a newline around a class colon.
 # Related to pos_class_colon, nl_class_init_args, and pos_comma.
 nl_ds_struct_enum_close_brace            = false    # false/true
 
 # Add or remove a newline around a class colon.
 # Related to pos_class_colon, nl_class_init_args, and pos_comma.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_class_colon                           = ignore   # ignore/add/remove/force
 
 # Change simple unbraced if statements into a one-liner
 nl_class_colon                           = ignore   # ignore/add/remove/force
 
 # Change simple unbraced if statements into a one-liner
@@ -1051,28 +1249,31 @@ nl_create_while_one_liner                = false    # false/true
 #
 
 # The position of arithmetic operators in wrapped expressions
 #
 
 # The position of arithmetic operators in wrapped expressions
-pos_arith                                = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_arith                                = lead     # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 # The position of assignment in wrapped expressions.
 # Do not affect '=' followed by '{'
 
 # The position of assignment in wrapped expressions.
 # Do not affect '=' followed by '{'
-pos_assign                               = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_assign                               = trail    # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 # The position of boolean operators in wrapped expressions
 
 # The position of boolean operators in wrapped expressions
-pos_bool                                 = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_bool                                 = lead     # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 # The position of comparison operators in wrapped expressions
 
 # The position of comparison operators in wrapped expressions
+# WARNING: Best is not unique (lead trail)
 pos_compare                              = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 # The position of conditional (b ? t : f) operators in wrapped expressions
 pos_compare                              = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 # The position of conditional (b ? t : f) operators in wrapped expressions
-pos_conditional                          = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_conditional                          = trail    # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 # The position of the comma in wrapped expressions
 
 # The position of the comma in wrapped expressions
-pos_comma                                = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
+pos_comma                                = trail    # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 # The position of the comma in the constructor initialization list
 
 # The position of the comma in the constructor initialization list
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 pos_class_comma                          = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 # The position of colons between constructor and member initialization
 pos_class_comma                          = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 # The position of colons between constructor and member initialization
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 pos_class_colon                          = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 #
 pos_class_colon                          = ignore   # ignore/lead/lead_break/lead_force/trail/trail_break/trail_force
 
 #
@@ -1083,9 +1284,11 @@ pos_class_colon                          = ignore   # ignore/lead/lead_break/lea
 code_width                               = 0        # number
 
 # Whether to fully split long 'for' statements at semi-colons
 code_width                               = 0        # number
 
 # Whether to fully split long 'for' statements at semi-colons
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 ls_for_split_full                        = false    # false/true
 
 # Whether to fully split long function protos/calls at commas
 ls_for_split_full                        = false    # false/true
 
 # Whether to fully split long function protos/calls at commas
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 ls_func_split_full                       = false    # false/true
 
 #
 ls_func_split_full                       = false    # false/true
 
 #
@@ -1093,105 +1296,124 @@ ls_func_split_full                       = false    # false/true
 #
 
 # The maximum consecutive newlines
 #
 
 # The maximum consecutive newlines
-nl_max                                   = 3        # number
+nl_max                                   = 3        # number #force
 
 # The number of newlines after a function prototype, if followed by another function prototype
 
 # The number of newlines after a function prototype, if followed by another function prototype
+# WARNING: Best is not unique (0 1)
 nl_after_func_proto                      = 0        # number
 
 # The number of newlines after a function prototype, if not followed by another function prototype
 nl_after_func_proto                      = 0        # number
 
 # The number of newlines after a function prototype, if not followed by another function prototype
+# WARNING: Best is not unique (0 1)
 nl_after_func_proto_group                = 0        # number
 
 # The number of newlines after '}' of a multi-line function body
 nl_after_func_body                       = 0        # number
 
 # The number of newlines after '}' of a single line function body
 nl_after_func_proto_group                = 0        # number
 
 # The number of newlines after '}' of a multi-line function body
 nl_after_func_body                       = 0        # number
 
 # The number of newlines after '}' of a single line function body
+# WARNING: Best is not unique (0 1)
 nl_after_func_body_one_liner             = 0        # number
 
 # The minimum number of newlines before a multi-line comment.
 # Doesn't apply if after a brace open or another multi-line comment.
 nl_after_func_body_one_liner             = 0        # number
 
 # The minimum number of newlines before a multi-line comment.
 # Doesn't apply if after a brace open or another multi-line comment.
+# WARNING: Best is not unique (0 1)
 nl_before_block_comment                  = 0        # number
 
 # The minimum number of newlines before a single-line C comment.
 # Doesn't apply if after a brace open or other single-line C comments.
 nl_before_block_comment                  = 0        # number
 
 # The minimum number of newlines before a single-line C comment.
 # Doesn't apply if after a brace open or other single-line C comments.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_before_c_comment                      = 0        # number
 
 # The minimum number of newlines before a CPP comment.
 # Doesn't apply if after a brace open or other CPP comments.
 nl_before_c_comment                      = 0        # number
 
 # The minimum number of newlines before a CPP comment.
 # Doesn't apply if after a brace open or other CPP comments.
+# WARNING: Best is not unique (0 1)
 nl_before_cpp_comment                    = 0        # number
 
 # Whether to force a newline after a multi-line comment.
 nl_before_cpp_comment                    = 0        # number
 
 # Whether to force a newline after a multi-line comment.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_after_multiline_comment               = false    # false/true
 
 # The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
 # Will not change the newline count if after a brace open.
 # 0 = No change.
 nl_after_multiline_comment               = false    # false/true
 
 # The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
 # Will not change the newline count if after a brace open.
 # 0 = No change.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_before_access_spec                    = 0        # number
 
 # The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
 # 0 = No change.
 nl_before_access_spec                    = 0        # number
 
 # The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label.
 # 0 = No change.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_after_access_spec                     = 0        # number
 
 # The number of newlines between a function def and the function comment.
 # 0 = No change.
 nl_after_access_spec                     = 0        # number
 
 # The number of newlines between a function def and the function comment.
 # 0 = No change.
+# WARNING: Best is not unique (0 2)
 nl_comment_func_def                      = 0        # number
 
 # The number of newlines after a try-catch-finally block that isn't followed by a brace close.
 # 0 = No change.
 nl_comment_func_def                      = 0        # number
 
 # The number of newlines after a try-catch-finally block that isn't followed by a brace close.
 # 0 = No change.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_after_try_catch_finally               = 0        # number
 
 # The number of newlines before and after a property, indexer or event decl.
 # 0 = No change.
 nl_after_try_catch_finally               = 0        # number
 
 # The number of newlines before and after a property, indexer or event decl.
 # 0 = No change.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_around_cs_property                    = 0        # number
 
 # The number of newlines between the get/set/add/remove handlers in C#.
 # 0 = No change.
 nl_around_cs_property                    = 0        # number
 
 # The number of newlines between the get/set/add/remove handlers in C#.
 # 0 = No change.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 nl_between_get_set                       = 0        # number
 
 # Whether to remove blank lines after '{'
 nl_between_get_set                       = 0        # number
 
 # Whether to remove blank lines after '{'
-eat_blanks_after_open_brace              = false    # false/true
+eat_blanks_after_open_brace              = true     # false/true #force
 
 # Whether to remove blank lines before '}'
 
 # Whether to remove blank lines before '}'
-eat_blanks_before_close_brace            = false    # false/true
+eat_blanks_before_close_brace            = true     # false/true #force
 
 #
 # Code modifying options (non-whitespace)
 #
 
 # Add or remove braces on single-line 'do' statement
 
 #
 # Code modifying options (non-whitespace)
 #
 
 # Add or remove braces on single-line 'do' statement
-mod_full_brace_do                        = ignore   # ignore/add/remove/force
+mod_full_brace_do                        = add      # ignore/add/remove/force
 
 # Add or remove braces on single-line 'for' statement
 
 # Add or remove braces on single-line 'for' statement
-mod_full_brace_for                       = ignore   # ignore/add/remove/force
+# NOTE: is 16 worse than ignore
+mod_full_brace_for                       = remove   # ignore/add/remove/force
 
 # Add or remove braces on single-line function definitions. (Pawn)
 
 # Add or remove braces on single-line function definitions. (Pawn)
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 mod_full_brace_function                  = ignore   # ignore/add/remove/force
 
 # Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
 mod_full_brace_function                  = ignore   # ignore/add/remove/force
 
 # Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'.
-mod_full_brace_if                        = ignore   # ignore/add/remove/force
+# NOTE: is 35 worse than ignore
+mod_full_brace_if                        = remove   # ignore/add/remove/force
 
 # Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if.
 # If any must be braced, they are all braced.  If all can be unbraced, then the braces are removed.
 
 # Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if.
 # If any must be braced, they are all braced.  If all can be unbraced, then the braces are removed.
-mod_full_brace_if_chain                  = false    # false/true
+mod_full_brace_if_chain                  = true     # false/true #force
 
 # Don't remove braces around statements that span N newlines
 
 # Don't remove braces around statements that span N newlines
-mod_full_brace_nl                        = 0        # number
+mod_full_brace_nl                        = 2        # number #force
 
 # Add or remove braces on single-line 'while' statement
 
 # Add or remove braces on single-line 'while' statement
-mod_full_brace_while                     = ignore   # ignore/add/remove/force
+mod_full_brace_while                     = remove   # ignore/add/remove/force
 
 # Add or remove braces on single-line 'using ()' statement
 
 # Add or remove braces on single-line 'using ()' statement
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 mod_full_brace_using                     = ignore   # ignore/add/remove/force
 
 # Add or remove unnecessary paren on 'return' statement
 mod_full_brace_using                     = ignore   # ignore/add/remove/force
 
 # Add or remove unnecessary paren on 'return' statement
-mod_paren_on_return                      = ignore   # ignore/add/remove/force
+mod_paren_on_return                      = remove   # ignore/add/remove/force
 
 # Whether to change optional semicolons to real semicolons
 
 # Whether to change optional semicolons to real semicolons
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 mod_pawn_semicolon                       = false    # false/true
 
 # Add parens on 'while' and 'if' statement around bools
 mod_full_paren_if_bool                   = false    # false/true
 
 # Whether to remove superfluous semicolons
 mod_pawn_semicolon                       = false    # false/true
 
 # Add parens on 'while' and 'if' statement around bools
 mod_full_paren_if_bool                   = false    # false/true
 
 # Whether to remove superfluous semicolons
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 mod_remove_extra_semicolon               = false    # false/true
 
 # If a function body exceeds the specified number of newlines and doesn't have a comment after
 mod_remove_extra_semicolon               = false    # false/true
 
 # If a function body exceeds the specified number of newlines and doesn't have a comment after
@@ -1211,24 +1433,29 @@ mod_add_long_ifdef_endif_comment         = 0        # number
 mod_add_long_ifdef_else_comment          = 0        # number
 
 # If TRUE, will sort consecutive single-line 'import' statements [Java, D]
 mod_add_long_ifdef_else_comment          = 0        # number
 
 # If TRUE, will sort consecutive single-line 'import' statements [Java, D]
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 mod_sort_import                          = false    # false/true
 
 # If TRUE, will sort consecutive single-line 'using' statements [C#]
 mod_sort_import                          = false    # false/true
 
 # If TRUE, will sort consecutive single-line 'using' statements [C#]
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 mod_sort_using                           = false    # false/true
 
 # If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C]
 # This is generally a bad idea, as it may break your code.
 mod_sort_using                           = false    # false/true
 
 # If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C]
 # This is generally a bad idea, as it may break your code.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 mod_sort_include                         = false    # false/true
 
 # If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace.
 mod_sort_include                         = false    # false/true
 
 # If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace.
-mod_move_case_break                      = true     # false/true
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+mod_move_case_break                      = false    # false/true
 
 # Will add or remove the braces around a fully braced case statement.
 # Will only remove the braces if there are no variable declarations in the block.
 
 # Will add or remove the braces around a fully braced case statement.
 # Will only remove the braces if there are no variable declarations in the block.
-mod_case_brace                           = ignore   # ignore/add/remove/force
+# NOTE: is 41 worse than ignore
+mod_case_brace                           = remove   # ignore/add/remove/force
 
 # If TRUE, it will remove a void 'return;' that appears as the last statement in a function.
 
 # If TRUE, it will remove a void 'return;' that appears as the last statement in a function.
-mod_remove_empty_return                  = true     # false/true
+mod_remove_empty_return                  = true     # false/true #force
 
 #
 # Comment modifications
 
 #
 # Comment modifications
@@ -1241,66 +1468,82 @@ cmt_width                                = 0        # number
 # 0: no reflowing (apart from the line wrapping due to cmt_width)
 # 1: no touching at all
 # 2: full reflow
 # 0: no reflowing (apart from the line wrapping due to cmt_width)
 # 1: no touching at all
 # 2: full reflow
-cmt_reflow_mode                          = 1        # number
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+cmt_reflow_mode                          = 0        # number
 
 # If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars.
 # Default is true.
 
 # If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars.
 # Default is true.
-cmt_indent_multi                         = true     # false/true
+cmt_indent_multi                         = false    # false/true
 
 # Whether to group c-comments that look like they are in a block
 
 # Whether to group c-comments that look like they are in a block
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_c_group                              = false    # false/true
 
 # Whether to put an empty '/*' on the first line of the combined c-comment
 cmt_c_group                              = false    # false/true
 
 # Whether to put an empty '/*' on the first line of the combined c-comment
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_c_nl_start                           = false    # false/true
 
 # Whether to put a newline before the closing '*/' of the combined c-comment
 cmt_c_nl_start                           = false    # false/true
 
 # Whether to put a newline before the closing '*/' of the combined c-comment
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_c_nl_end                             = false    # false/true
 
 # Whether to group cpp-comments that look like they are in a block
 cmt_c_nl_end                             = false    # false/true
 
 # Whether to group cpp-comments that look like they are in a block
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_cpp_group                            = false    # false/true
 
 # Whether to put an empty '/*' on the first line of the combined cpp-comment
 cmt_cpp_group                            = false    # false/true
 
 # Whether to put an empty '/*' on the first line of the combined cpp-comment
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_cpp_nl_start                         = false    # false/true
 
 # Whether to put a newline before the closing '*/' of the combined cpp-comment
 cmt_cpp_nl_start                         = false    # false/true
 
 # Whether to put a newline before the closing '*/' of the combined cpp-comment
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_cpp_nl_end                           = false    # false/true
 
 # Whether to change cpp-comments into c-comments
 cmt_cpp_to_c                             = false    # false/true
 
 # Whether to put a star on subsequent comment lines
 cmt_cpp_nl_end                           = false    # false/true
 
 # Whether to change cpp-comments into c-comments
 cmt_cpp_to_c                             = false    # false/true
 
 # Whether to put a star on subsequent comment lines
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_star_cont                            = false    # false/true
 
 # The number of spaces to insert at the start of subsequent comment lines
 cmt_star_cont                            = false    # false/true
 
 # The number of spaces to insert at the start of subsequent comment lines
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_sp_before_star_cont                  = 0        # number
 
 # The number of spaces to insert after the star on subsequent comment lines
 cmt_sp_before_star_cont                  = 0        # number
 
 # The number of spaces to insert after the star on subsequent comment lines
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_sp_after_star_cont                   = 0        # number
 
 # For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
 # the comment are the same length. Default=True
 cmt_sp_after_star_cont                   = 0        # number
 
 # For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of
 # the comment are the same length. Default=True
-cmt_multi_check_last                     = true     # false/true
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+cmt_multi_check_last                     = false    # false/true
 
 # The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment.
 # Will substitute $(filename) with the current file's name.
 
 # The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment.
 # Will substitute $(filename) with the current file's name.
+# WARNING: unsupported string
 cmt_insert_file_header                   = ""         # string
 
 # The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment.
 # Will substitute $(filename) with the current file's name.
 cmt_insert_file_header                   = ""         # string
 
 # The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment.
 # Will substitute $(filename) with the current file's name.
+# WARNING: unsupported string
 cmt_insert_file_footer                   = ""         # string
 
 # The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment.
 # Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff.
 # Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... }
 cmt_insert_file_footer                   = ""         # string
 
 # The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment.
 # Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff.
 # Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... }
+# WARNING: unsupported string
 cmt_insert_func_header                   = ""         # string
 
 # The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment.
 # Will substitute $(class) with the class name.
 cmt_insert_func_header                   = ""         # string
 
 # The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment.
 # Will substitute $(class) with the class name.
+# WARNING: unsupported string
 cmt_insert_class_header                  = ""         # string
 
 # If a preprocessor is encountered when stepping backwards from a function name, then
 # this option decides whether the comment should be inserted.
 # Affects cmt_insert_func_header and cmt_insert_class_header.
 cmt_insert_class_header                  = ""         # string
 
 # If a preprocessor is encountered when stepping backwards from a function name, then
 # this option decides whether the comment should be inserted.
 # Affects cmt_insert_func_header and cmt_insert_class_header.
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 cmt_insert_before_preproc                = false    # false/true
 
 #
 cmt_insert_before_preproc                = false    # false/true
 
 #
@@ -1308,27 +1551,33 @@ cmt_insert_before_preproc                = false    # false/true
 #
 
 # Control indent of preprocessors inside #if blocks at brace level 0
 #
 
 # Control indent of preprocessors inside #if blocks at brace level 0
+# WARNING: Indifferent... please decide manually.
 pp_indent                                = ignore   # ignore/add/remove/force
 
 # Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false)
 pp_indent_at_level                       = false    # false/true
 
 # If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1.
 pp_indent                                = ignore   # ignore/add/remove/force
 
 # Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false)
 pp_indent_at_level                       = false    # false/true
 
 # If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1.
-pp_indent_count                          = 1        # number
+# WARNING: Code doesn't seem to use this feature - delete from the config?
+pp_indent_count                          = 0        # number
 
 # Add or remove space after # based on pp_level of #if blocks
 
 # Add or remove space after # based on pp_level of #if blocks
-pp_space                                 = ignore   # ignore/add/remove/force
+pp_space                                 = remove   # ignore/add/remove/force
 
 # Sets the number of spaces added with pp_space
 
 # Sets the number of spaces added with pp_space
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 pp_space_count                           = 0        # number
 
 # The indent for #region and #endregion in C# and '#pragma region' in C/C++
 pp_space_count                           = 0        # number
 
 # The indent for #region and #endregion in C# and '#pragma region' in C/C++
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 pp_indent_region                         = 0        # number
 
 # Whether to indent the code between #region and #endregion
 pp_indent_region                         = 0        # number
 
 # Whether to indent the code between #region and #endregion
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 pp_region_indent_code                    = false    # false/true
 
 # If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level
 pp_region_indent_code                    = false    # false/true
 
 # If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level
+# WARNING: Code doesn't seem to use this feature - delete from the config?
 pp_indent_if                             = 0        # number
 
 # Control whether to indent the code between #if, #else and #endif when not at file-level
 pp_indent_if                             = 0        # number
 
 # Control whether to indent the code between #if, #else and #endif when not at file-level
index 0075bc8493c3dd2f87cb624a52beef4debf2c062..d25c769b08ba7957c0f11460657a2c759df8a564 100644 (file)
@@ -809,22 +809,22 @@ void WarpZone_StartFrame()
        for(e = world; (e = nextent(e)); )
        {
                if(warpzone_warpzones_exist) { WarpZone_StoreProjectileData(e); }
        for(e = world; (e = nextent(e)); )
        {
                if(warpzone_warpzones_exist) { WarpZone_StoreProjectileData(e); }
-               
+
                if(IS_REAL_CLIENT(e))
                {
                        if(e.solid == SOLID_NOT) // not spectating?
                        if(e.movetype == MOVETYPE_NOCLIP || e.movetype == MOVETYPE_FLY || e.movetype == MOVETYPE_FLY_WORLDONLY) // not spectating? (this is to catch observers)
                        {
                                other = e; // player
                if(IS_REAL_CLIENT(e))
                {
                        if(e.solid == SOLID_NOT) // not spectating?
                        if(e.movetype == MOVETYPE_NOCLIP || e.movetype == MOVETYPE_FLY || e.movetype == MOVETYPE_FLY_WORLDONLY) // not spectating? (this is to catch observers)
                        {
                                other = e; // player
-                       
+
                                // warpzones
                                // warpzones
-                               if(warpzone_warpzones_exist) { 
-                               self = WarpZone_Find(e.origin + e.mins, e.origin + e.maxs); 
+                               if(warpzone_warpzones_exist) {
+                               self = WarpZone_Find(e.origin + e.mins, e.origin + e.maxs);
                                if(self)
                                if(!WarpZoneLib_ExactTrigger_Touch())
                                        if(WarpZone_PlaneDist(self, e.origin + e.view_ofs) <= 0)
                                                WarpZone_Teleport(self, e, -1, 0); } // NOT triggering targets by this!
                                if(self)
                                if(!WarpZoneLib_ExactTrigger_Touch())
                                        if(WarpZone_PlaneDist(self, e.origin + e.view_ofs) <= 0)
                                                WarpZone_Teleport(self, e, -1, 0); } // NOT triggering targets by this!
-                       
+
                                // teleporters
                                self = Teleport_Find(e.origin + e.mins, e.origin + e.maxs);
                                if(self)
                                // teleporters
                                self = Teleport_Find(e.origin + e.mins, e.origin + e.maxs);
                                if(self)
@@ -832,7 +832,7 @@ void WarpZone_StartFrame()
                                        Simple_TeleportPlayer(self, other); // NOT triggering targets by this!
                        }
                }
                                        Simple_TeleportPlayer(self, other); // NOT triggering targets by this!
                        }
                }
-               
+
                if(IS_NOT_A_CLIENT(e))
                {
                        if(warpzone_warpzones_exist)
                if(IS_NOT_A_CLIENT(e))
                {
                        if(warpzone_warpzones_exist)