]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/terencehill/newpanelhud' into fruitiex/panelhud
authorFruitieX <fruitiex@gmail.com>
Sat, 14 May 2011 13:04:28 +0000 (16:04 +0300)
committerFruitieX <fruitiex@gmail.com>
Sat, 14 May 2011 13:04:28 +0000 (16:04 +0300)
95 files changed:
annoy_balance.cfg [deleted file]
balance25.cfg
balanceLeeStricklin.cfg
balanceSamual.cfg
balanceXonotic.cfg
balancetZork.cfg
defaultXonotic.cfg
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/miscfunctions.qc
qcsrc/client/movetypes.qc
qcsrc/common/constants.qh
qcsrc/common/gamecommand.qc
qcsrc/common/mapinfo.qc
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/menu/item/dialog.c
qcsrc/menu/xonotic/util.qc
qcsrc/server/arena.qc
qcsrc/server/autocvars.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/defs.qh
qcsrc/server/frags.txt [deleted file]
qcsrc/server/g_swamp.qc [deleted file]
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/progs.src
qcsrc/server/sv_stats.qc [deleted file]
qcsrc/server/todo.txt
qcsrc/server/w_hagar.qc
qcsrc/server/w_nex.qc
sound/weapons/hagar_beep.ogg [new file with mode: 0644]
sound/weapons/hagar_load.ogg [new file with mode: 0644]
textures/campingrifle.tga
textures/campingrifle_glow.tga
textures/campingrifle_pants.tga [deleted file]
textures/campingrifle_shirt.tga [deleted file]
textures/crylink.tga
textures/crylink_gloss.tga
textures/crylink_glow.jpg
textures/crylink_pants.tga [deleted file]
textures/crylink_reflect.tga
textures/electro.tga
textures/electro_glow.tga
textures/electro_pants.tga [deleted file]
textures/electro_plasma.tga
textures/electro_plasma_glow.tga
textures/glauncher_glow.tga [new file with mode: 0644]
textures/glauncher_pants.tga [deleted file]
textures/glscope.tga
textures/glscope_glow.tga
textures/hagar2.tga
textures/hagar2_glow.tga
textures/hagar2_pants.tga [deleted file]
textures/hlac_accessory.tga
textures/hlac_accessory_glow.tga [new file with mode: 0644]
textures/hlac_accessory_pants.tga [deleted file]
textures/hlac_body.tga
textures/hlac_body_glow.tga
textures/hlac_body_pants.tga [deleted file]
textures/hlac_body_shirt.tga
textures/hlac_metal.tga
textures/hlac_metal_glow.tga
textures/hlac_plasma.tga
textures/hookgun_pants.tga [deleted file]
textures/hookgun_shirt.tga [new file with mode: 0644]
textures/laser.tga
textures/laser_glow.tga
textures/laser_pants.tga [deleted file]
textures/minelayer.tga
textures/minelayer_glow.tga
textures/nex.tga
textures/nex_glow.tga
textures/nex_pants.tga [deleted file]
textures/portalgun.tga
textures/portalgun_glow.tga
textures/rl_glow.tga [new file with mode: 0644]
textures/rl_pants.tga [deleted file]
textures/seeker.tga
textures/seeker_glow.tga
textures/seeker_pants.tga [deleted file]
textures/seeker_shirt.tga [new file with mode: 0644]
textures/shotgun2_glow.tga
textures/shotgun2_shirt.tga
textures/shotgun_sight.tga
textures/shotgun_sight_glow.tga [new file with mode: 0644]
textures/uzi_glow.tga
textures/uzi_pants.tga [deleted file]
xonotic-credits.txt

diff --git a/annoy_balance.cfg b/annoy_balance.cfg
deleted file mode 100644 (file)
index 184eb4e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// TEMPORARY CONFIG FOR BALANCE TESTING PURPOSES
-
-// ANNOY people with the BALANCE
-alias annoy                "sv_cmd adminmsg 0 \"${* q}\" 70"
-       // show message for 70 sec, clear previous one
-alias annoy_s              "annoy $*; echo \ 1SERVER^7: $*"
-       // annoy_s goes to rcon2irc (this echo fakes a chat message's output)
-alias printbalance         "annoy NOTE: Current balance is ^1$curbalance"
-       // refresh the balance status bar (call this every 60 sec)
-alias printbalance_s       "annoy_s NOTE: Next match will run ^1$curbalance"
-       // announce the balance for next match
-alias switchbalance_samual "exec balanceXonotic.cfg; set curbalance fruit; printbalance_s"
-alias switchbalance_fruit  "exec balanceSamual.cfg; set curbalance samual; printbalance_s"
-alias switchbalance        "switchbalance_$curbalance"
-       // toggle between the balances
-alias sv_hook_gameend      "switchbalance"
-       // do this at the end of each match
-set curbalance fruit
-alias annoybalance         "printbalance; defer 60 annoybalance"
-annoybalance
-       // our timer
\ No newline at end of file
index bf8d40cf6e2826d943cf4c2a9b91c3838c62fed5..ea66cd177f6f04e0e947e3e5e5415f0bfd1a0291 100644 (file)
@@ -539,6 +539,12 @@ set g_balance_hagar_primary_lifetime 30
 set g_balance_hagar_primary_refire 0.15
 set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
+set g_balance_hagar_secondary_load 0
+set g_balance_hagar_secondary_load_speed 0.6
+set g_balance_hagar_secondary_load_max 4
+set g_balance_hagar_secondary_load_hold 0
+set g_balance_hagar_secondary_load_releasedeath 1
+set g_balance_hagar_secondary_load_abort 1
 set g_balance_hagar_secondary_damage 37
 set g_balance_hagar_secondary_edgedamage 15
 set g_balance_hagar_secondary_force 100
index 820456e8a313c8a8fadb1969885b20114257f30e..bd72a707171645065832e2d1ed644c5a80353ef2 100644 (file)
@@ -539,6 +539,12 @@ set g_balance_hagar_primary_lifetime 30
 set g_balance_hagar_primary_refire 0.15
 set g_balance_hagar_primary_ammo 2
 set g_balance_hagar_secondary 1
+set g_balance_hagar_secondary_load 0
+set g_balance_hagar_secondary_load_speed 0.6
+set g_balance_hagar_secondary_load_max 4
+set g_balance_hagar_secondary_load_hold 0
+set g_balance_hagar_secondary_load_releasedeath 1
+set g_balance_hagar_secondary_load_abort 1
 set g_balance_hagar_secondary_damage 43
 set g_balance_hagar_secondary_edgedamage 15
 set g_balance_hagar_secondary_force 100
index b5945c864f0c3a82616f1b2d4ae0d2a1872647fd..441b604020d6636fb1d90ea0ffcf1c25889d8765 100644 (file)
@@ -539,6 +539,12 @@ set g_balance_hagar_primary_lifetime 5
 set g_balance_hagar_primary_refire 0.15
 set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
+set g_balance_hagar_secondary_load 0
+set g_balance_hagar_secondary_load_speed 0.6
+set g_balance_hagar_secondary_load_max 4
+set g_balance_hagar_secondary_load_hold 0
+set g_balance_hagar_secondary_load_releasedeath 1
+set g_balance_hagar_secondary_load_abort 1
 set g_balance_hagar_secondary_damage 35
 set g_balance_hagar_secondary_edgedamage 17.5
 set g_balance_hagar_secondary_force 100
index 4f78941da24444189d84af80bf605b22b588cea5..5bffd7df9a9067f4fd498e468628d334fdf55b2f 100644 (file)
@@ -539,15 +539,21 @@ set g_balance_hagar_primary_lifetime 5
 set g_balance_hagar_primary_refire 0.12
 set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 14
-set g_balance_hagar_secondary_edgedamage 6
-set g_balance_hagar_secondary_force 70
+set g_balance_hagar_secondary_load 0
+set g_balance_hagar_secondary_load_speed 0.6
+set g_balance_hagar_secondary_load_max 4
+set g_balance_hagar_secondary_load_hold 0
+set g_balance_hagar_secondary_load_releasedeath 1
+set g_balance_hagar_secondary_load_abort 1
+set g_balance_hagar_secondary_damage 14 // default for _load: 32
+set g_balance_hagar_secondary_edgedamage 6 // default for _load: 10
+set g_balance_hagar_secondary_force 70 // default for _load: 160
 set g_balance_hagar_secondary_radius 125
-set g_balance_hagar_secondary_spread 0.15
+set g_balance_hagar_secondary_spread 0.15 // default for _load: 0.08
 set g_balance_hagar_secondary_speed 1800
 set g_balance_hagar_secondary_lifetime_min 5
 set g_balance_hagar_secondary_lifetime_rand 0
-set g_balance_hagar_secondary_refire 0.12
+set g_balance_hagar_secondary_refire 0.12 // default for _load: 0.8
 set g_balance_hagar_secondary_ammo 1
 set g_balance_hagar_reload_ammo 0 //default: 25
 set g_balance_hagar_reload_time 2
index 69aa7d1b534d16ea3882c442e9bd841e121310ac..8a09f03e514a7a3299c23a7e71e26f928b7e6b61 100644 (file)
@@ -538,6 +538,12 @@ set g_balance_hagar_primary_lifetime 30
 set g_balance_hagar_primary_refire 0.2
 set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
+set g_balance_hagar_secondary_load 0
+set g_balance_hagar_secondary_load_speed 0.6
+set g_balance_hagar_secondary_load_max 4
+set g_balance_hagar_secondary_load_hold 0
+set g_balance_hagar_secondary_load_releasedeath 1
+set g_balance_hagar_secondary_load_abort 1
 set g_balance_hagar_secondary_damage 30
 set g_balance_hagar_secondary_edgedamage 15
 set g_balance_hagar_secondary_force 50
index ee2570b9dd8aace0f0156fa2dc27dadbb1ad27ca..b0509bba35716be9f58ac7c01ef2f75ab2fca083 100644 (file)
@@ -205,6 +205,9 @@ seta crosshair_ring_nex_currentcharge_movingavg_rate 0.05
 seta crosshair_ring_minelayer 1
 seta crosshair_ring_minelayer_alpha 0.15
 
+seta crosshair_ring_hagar 1
+seta crosshair_ring_hagar_alpha 0.15
+
 seta crosshair_ring_reload 1 "main cvar to enable or disable ammo crosshair rings"
 seta crosshair_ring_reload_size 2.5    "reload ring size"
 seta crosshair_ring_reload_alpha 0.2   "reload ring alpha"
@@ -216,7 +219,7 @@ fov 90
 seta cl_velocityzoom 0 "velocity based zooming of fov, negative values zoom out"
 seta cl_velocityzoomtime 0.3   "time value for averaging speed values"
 seta cl_zoomfactor 5   "how much +zoom will zoom (1-16)"
-seta cl_zoomspeed 3.5  "how fast it will zoom (0.5-16), negative values mean instant zoom"
+seta cl_zoomspeed 8    "how fast it will zoom (0.5-16), negative values mean instant zoom"
 seta cl_zoomsensitivity 0      "how zoom changes sensitivity (0 = weakest, 1 = strongest)"
 freelook 1
 sensitivity 6
@@ -1525,8 +1528,8 @@ seta scoreboard_fadeoutspeed 5 "speed at which scoreboard fades out, higher is f
 seta scoreboard_highlight 1 "enable highlighting for rows and columns in the scoreboard"
 seta scoreboard_highlight_alpha 0.10 "highlight alpha value (depends on hud_scoreboard_highlight 1)"
 seta scoreboard_highlight_alpha_self 0.25 "self highlight alpha value"
-seta scoreboard_offset_left 0.04 "how many pixels the scoreboard is offset from the left screen edge"
-seta scoreboard_offset_right 0.148 "how many pixels the scoreboard is offset from the right screen edge"
+seta scoreboard_offset_left 0.15 "how many pixels the scoreboard is offset from the left screen edge"
+seta scoreboard_offset_right 0.15 "how many pixels the scoreboard is offset from the right screen edge"
 seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
 
 seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
index b3b0569489d992798c0ea9355f3a7a5296730968..666fd8823e1eec2930fec848188efd9deb85ece0 100644 (file)
@@ -263,6 +263,8 @@ float nex_scope;
 
 float minelayer_maxmines;
 
+float hagar_maxrockets;
+
 float bgmtime;
 
 string weaponorder_byimpulse;
index 7be0913a67b40af465488c9e7495ece4210c7cba..03cbd528a2cf3cbf983ef500bc57edcaf3addee3 100644 (file)
@@ -698,7 +698,8 @@ void Ent_ReadPlayerScore()
 #ifdef DP_CSQC_ENTITY_REMOVE_IS_B0RKED
        if(!isNew && n != self.sv_entnum)
        {
-               print(_("A CSQC entity changed its owner!\n"));
+               //print(_("A CSQC entity changed its owner!\n"));
+               print(sprintf(_("A CSQC entity changed its owner! (edict: %d, classname: %s)\n"), num_for_edict(self), self.classname));
                isNew = true;
                Ent_Remove();
                self.enttype = ENT_CLIENT_SCORES;
@@ -770,10 +771,6 @@ void Ent_ReadTeamScore()
        HUD_UpdateTeamPos(o);
 }
 
-void Net_Reset()
-{
-}
-
 void Ent_ClientData()
 {
        float f;
@@ -956,7 +953,8 @@ void(float bIsNewEntity) CSQC_Ent_Update =
        if(self.enttype)
                if(t != self.enttype)
                {
-                       print(_("A CSQC entity changed its type!\n"));
+                       //print(_("A CSQC entity changed its type!\n"));
+                       print(sprintf(_("A CSQC entity changed its type! (edict: %d, classname: %s)\n"), num_for_edict(self), self.classname));
                        Ent_Remove();
                        bIsNewEntity = 1;
                }
@@ -995,7 +993,8 @@ void(float bIsNewEntity) CSQC_Ent_Update =
                case ENT_CLIENT_ACCURACY: Ent_ReadAccuracy(); break;
                case ENT_CLIENT_SHOWNAMES: Ent_ShowNames(); break;
                default:
-                       error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
+                       //error(strcat(_("unknown entity type in CSQC_Ent_Update: %d\n"), self.enttype));
+                       error(sprintf(_("Unknown entity type in CSQC_Ent_Update (enttype: %d, edict: %d, classname: %s)\n"), self.enttype, num_for_edict(self), self.classname));
                        break;
        }
 
@@ -1117,6 +1116,8 @@ void Ent_Init()
 
        minelayer_maxmines = ReadByte();
 
+       hagar_maxrockets = ReadByte();
+
        g_trueaim_minrange = ReadCoord();
 
        if(!postinit)
index 17f2f40af25f1b9a02cd7b01ed4ef2aeb47d6480..f1ba9abfde0f30860099e4e41237845b8040e580 100644 (file)
@@ -454,6 +454,7 @@ void CSQC_UpdateView(float w, float h)
                        eventchase_target_origin = pmove_org - v_forward * eventchase_current_distance * (trace_fraction - 0.1);
 
                        R_SetView(VF_ORIGIN, eventchase_target_origin);
+                       R_SetView(VF_ANGLES, view_angles);
                }
                else if(autocvar_chase_active < 0) // time to disable chase_active if it was set by this code
                {
@@ -1167,6 +1168,13 @@ void CSQC_UpdateView(float w, float h)
                                        ring_rgb = wcross_color;
                                        ring_image = "gfx/crosshair_ring.tga";
                                }
+                               else if (activeweapon == WEP_HAGAR && getstati(STAT_HAGAR_LOAD) && autocvar_crosshair_ring_hagar)
+                               {
+                                       ring_value = bound(0, getstati(STAT_HAGAR_LOAD) / hagar_maxrockets, 1);
+                                       ring_alpha = autocvar_crosshair_ring_hagar_alpha;
+                                       ring_rgb = wcross_color;
+                                       ring_image = "gfx/crosshair_ring.tga";
+                               }
 
                                if(autocvar_crosshair_ring_reload && weapon_clipsize) // forces there to be only an ammo ring 
                                {
index 2fe09ea1ea77ec130472162c69e58e41223616f8..1e48eed9de3e68e53a636a1fcbeb3a1c277d9ec9 100644 (file)
@@ -100,6 +100,8 @@ float autocvar_crosshair_ring;
 float autocvar_crosshair_ring_inner;
 float autocvar_crosshair_ring_minelayer;
 float autocvar_crosshair_ring_minelayer_alpha;
+float autocvar_crosshair_ring_hagar;
+float autocvar_crosshair_ring_hagar_alpha;
 float autocvar_crosshair_ring_nex;
 float autocvar_crosshair_ring_nex_alpha;
 float autocvar_crosshair_ring_nex_currentcharge_movingavg_rate;
index 4588ebb6c6c4ed921f06cc6b7e14e96cf9bcbc3c..247dc4b35a64dedc2c7de722420154e9084df48e 100644 (file)
@@ -325,34 +325,11 @@ float PreviewExists(string name)
        if(autocvar_cl_readpicture_force)
                return false;
 
-       file = strcat(name, ".tga");
-       f = fopen(file, FILE_READ);
-       if(f >= 0)
-       {
-               fclose(f);
-               return true;
-       }
-       file = strcat(name, ".png");
-       f = fopen(file, FILE_READ);
-       if(f >= 0)
-       {
-               fclose(f);
-               return true;
-       }
-       file = strcat(name, ".jpg");
-       f = fopen(file, FILE_READ);
-       if(f >= 0)
-       {
-               fclose(f);
-               return true;
-       }
-       file = strcat(name, ".pcx");
-       f = fopen(file, FILE_READ);
-       if(f >= 0)
-       {
-               fclose(f);
-               return true;
-       }
+       if (fexists(strcat(name, ".tga"))) return true;
+       if (fexists(strcat(name, ".png"))) return true;
+       if (fexists(strcat(name, ".jpg"))) return true;
+       if (fexists(strcat(name, ".pcx"))) return true;
+
        return false;
 }
 
index 1d6a6e393d59dd6bc450d7b2311702db573204c7..9a17dea35694f9ee005b836f603d65071a2ac7ba 100644 (file)
@@ -156,10 +156,10 @@ float _Movetype_UnstickEntity() // SV_UnstickEntity
                if(!_Movetype_TestEntityPosition('0 0 -1' * i)) goto success;
                if(!_Movetype_TestEntityPosition('0 0 1' * i)) goto success;
        }
-       dprint("Some entity is stuck\n");
+       dprint(sprintf(_("Can't unstick an entity (edict: %d, classname: %s, origin: %s)\n"), num_for_edict(self), self.classname, vtos(self.move_origin)));
        return FALSE;
 :success
-       dprint("Unstuck some entity\n");
+       dprint(sprintf(_("Sucessfully unstuck an entity (edict: %d, classname: %s, origin: %s)\n"), num_for_edict(self), self.classname, vtos(self.move_origin)));
        _Movetype_LinkEdict(TRUE);
        return TRUE;
 }
index 53eb9eed355449cf322fbea12ec43ee937e43afb..507cff85abcdb2780ee6af7054a6500d5f9f18d6 100644 (file)
@@ -63,6 +63,7 @@ const float TE_CSQC_NOTIFY = 112;
 const float TE_CSQC_WEAPONCOMPLAIN = 113;
 const float TE_CSQC_NEX_SCOPE = 116;
 const float TE_CSQC_MINELAYER_MAXMINES = 117;
+const float TE_CSQC_HAGAR_MAXROCKETS = 118;
 
 const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
 const float RACE_NET_CHECKPOINT_CLEAR = 1;
@@ -319,6 +320,7 @@ const float STAT_NEX_CHARGEPOOL = 53;
 const float STAT_HIT_TIME = 54;
 const float STAT_TYPEHIT_TIME = 55;
 const float STAT_LAYED_MINES = 56;
+const float STAT_HAGAR_LOAD = 57;
 
 // see DP source, quakedef.h
 const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
@@ -634,6 +636,7 @@ float WR_RELOAD         = 9; // (SVQC) does not need to do anything
 float WR_RESETPLAYER    = 10; // (SVQC) does not need to do anything
 float WR_IMPACTEFFECT  = 11; // (CSQC) impact effect
 float WR_SWITCHABLE    = 12; // (CSQC) impact effect
+float WR_PLAYERDEATH    = 13; // (SVQC) does not need to do anything
 
 float HUD_PANEL_WEAPONS                = 0;
 float HUD_PANEL_AMMO           = 1;
index 3b93c4cae9fb31e8e003b38d6f9f7cceeced7ddc..518cf74971a645dde3c412c1a1eaabee9b5ae1b8 100644 (file)
@@ -210,10 +210,8 @@ float GameCommand_Generic(string command)
        {
                if(argv(1) == "add" && argc == 3)
                {
-                       f = fopen(strcat("maps/", argv(2), ".bsp"), FILE_READ);
-                       if(f != -1)
-                               fclose(f);
-                       else {
+                       if (!fexists(strcat("maps/", argv(2), ".bsp")))
+                       {
                                print("maplist: ERROR: ", argv(2), " does not exist!\n");
                                return TRUE;
                        }
@@ -771,10 +769,8 @@ float GameCommand_Generic(string command)
                                        s = rpn_pop();
                                        if(!rpn_error)
                                        {
-                                               f = fopen(s, FILE_READ);
-                                               if(f != -1)
-                                                       fclose(f);
-                                               else {
+                                               if (!fexists(s))
+                                               {
                                                        print("rpn: ERROR: ", s, " does not exist!\n");
                                                        rpn_error = TRUE;
                                                }
@@ -783,13 +779,10 @@ float GameCommand_Generic(string command)
                                        s = rpn_get();
                                        if(!rpn_error)
                                        {
-                                               f = fopen(s, FILE_READ);
-                                               if(f != -1) {
-                                                       fclose(f);
+                                               if (fexists(s))
                                                        rpn_setf(1);
-                                               } else {
+                                               else
                                                        rpn_setf(0);
-                                               }
                                        }
                                } else if(rpncmd == "localtime") {
                                        rpn_set(strftime(TRUE, rpn_get()));
index 58f0cc852a6e07383df3dadd8ce1d4e466c5a15a..a6b0788088216c93b53f2a0dfa96aabc5ed5e820 100644 (file)
@@ -875,12 +875,8 @@ float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametype
                                if(MapInfo_Map_supportedGametypes & i)
                                        fputs(fh, sprintf("gametype %s // defaults: %s\n", MapInfo_Type_ToString(i), _MapInfo_GetDefaultEx(i)));
 
-                       fh2 = fopen(strcat("scripts/", pFilename, ".arena"), FILE_READ);
-                       if(fh2 >= 0)
-                       {
-                               fclose(fh2);
+                       if(fexists(strcat("scripts/", pFilename, ".arena")))
                                fputs(fh, "settemp_for_type all sv_q3acompat_machineshotgunswap 1\n");
-                       }
 
                        fputs(fh, "// optional: fog density red green blue alpha mindist maxdist\n");
                        fputs(fh, "// optional: settemp_for_type (all|gametypename) cvarname value\n");
index baf60b5d88156d8f03f91b1e03701eed049a1424..89cb92baf3fce6b4f08d881a208db2f106f67c63 100644 (file)
@@ -236,6 +236,16 @@ string fstrunzone(string s)
        return sc;
 }
 
+float fexists(string f)
+{
+    float fh;
+    fh = fopen(f, FILE_READ);
+    if (fh < 0)
+        return FALSE;
+    fclose(fh);
+    return TRUE;
+}
+
 // Databases (hash tables)
 #define DB_BUCKETS 8192
 void db_save(float db, string pFilename)
index d95c99e95fd39cb9424088998a109dd09f281334..49afad22d7f19bc62f552b8dcdbf3884f7e8654d 100644 (file)
@@ -34,6 +34,8 @@ float median(float a, float b, float c);
 // works for up to 10 decimals!
 string ftos_decimals(float number, float decimals);
 
+float fexists(string f);
+
 vector colormapPaletteColor(float c, float isPants);
 
 // unzone the string, and return it as tempstring. Safe to be called on string_null
index 800a12681e4eb3d8b95ba4c0206baf1691cf5f3a..da6a4013cecd772051b12c76aac0f0a74a681a1c 100644 (file)
@@ -152,7 +152,7 @@ void Dialog_configureDialog(entity me)
 
        me.fill(me);
 
-       if(me.closable)
+       if(me.closable && me.borderLines > 0)
        {
                closebutton = me.closeButton = spawnButton();
                closebutton.configureButton(closebutton, "", 0, me.closeButtonImage);
index 121f8ac2370f00ab410508a88052fe5207914eac..8544276bb2a73cdc50bd580d15a5a34e28550f92 100644 (file)
@@ -466,15 +466,11 @@ string resolvemod(string m)
 
 float updateCompression()
 {
-       float fh;
        float have_dds, have_jpg, have_tga;
        float can_dds;
-       if((have_dds = ((fh = fopen("dds/particles/particlefont.dds", FILE_READ)) >= 0)))
-               fclose(fh);
-       if((have_jpg = ((fh = fopen("particles/particlefont.jpg", FILE_READ)) >= 0)))
-               fclose(fh);
-       if((have_tga = ((fh = fopen("particles/particlefont.tga", FILE_READ)) >= 0)))
-               fclose(fh);
+       have_dds = (fexists("dds/particles/particlefont.dds"));
+       have_dds = (fexists("particles/particlefont.jpg"));
+       have_dds = (fexists("particles/particlefont.tga"));
        can_dds = GL_Have_TextureCompression();
        if(have_dds && (have_jpg || have_tga))
        {
index 5110d373b8a682e657e1a5f10201c2c91303dbba..a58ccb2a54dbb3061519b37ef40c60ba92ad6609 100644 (file)
@@ -328,7 +328,7 @@ void count_alive_players()
                                totalalive += 1;
                        }
                }
-               FOR_EACH_PLAYER(self) {
+               FOR_EACH_REALCLIENT(self) {
                        self.redalive_stat = redalive;
                        self.bluealive_stat = bluealive;
                }
@@ -358,7 +358,7 @@ void count_alive_players()
                                totalalive += 1;
                        }
                }
-               FOR_EACH_PLAYER(self) {
+               FOR_EACH_REALCLIENT(self) {
                        self.redalive_stat = redalive;
                        self.bluealive_stat = bluealive;
                        self.yellowalive_stat = yellowalive;
index 3263d2ed1ea5fb4c41f61847ed90d2af271b6369..70719e0d7c9f03e09f3c24c16634b251db7074b5 100644 (file)
@@ -321,6 +321,12 @@ float autocvar_g_balance_hagar_primary_radius;
 float autocvar_g_balance_hagar_primary_refire;
 float autocvar_g_balance_hagar_primary_speed;
 float autocvar_g_balance_hagar_secondary;
+float autocvar_g_balance_hagar_secondary_load;
+float autocvar_g_balance_hagar_secondary_load_speed;
+float autocvar_g_balance_hagar_secondary_load_max;
+float autocvar_g_balance_hagar_secondary_load_hold;
+float autocvar_g_balance_hagar_secondary_load_releasedeath;
+float autocvar_g_balance_hagar_secondary_load_abort;
 float autocvar_g_balance_hagar_secondary_ammo;
 float autocvar_g_balance_hagar_secondary_damage;
 float autocvar_g_balance_hagar_secondary_edgedamage;
index 608fcf08c2fa6814bf56e778687d17a787c367c0..a655b0199f6af4e21cc46f741bf761f69f0bbac9 100644 (file)
@@ -1079,6 +1079,7 @@ void PutClientInServer (void)
                        if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars
                                self.weapon_load[j] = cvar(strcat("g_balance_", e.netname, "_reload_ammo"));
                }
+               self.weapon_forbidchange = FALSE;
 
                oldself = self;
                self = spot;
@@ -1136,6 +1137,7 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_secondary); // client has to know if it should zoom or not
        WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
        WriteByte(MSG_ENTITY, autocvar_g_balance_minelayer_limit); // minelayer max mines
+       WriteByte(MSG_ENTITY, autocvar_g_balance_hagar_secondary_load_max); // hagar max loadable rockets
        WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange);
        return TRUE;
 }
@@ -2397,6 +2399,7 @@ void SpectateCopy(entity spectatee) {
        self.weapon = spectatee.weapon;
        self.nex_charge = spectatee.nex_charge;
        self.nex_chargepool_ammo = spectatee.nex_chargepool_ammo;
+       self.hagar_load = spectatee.hagar_load;
        self.minelayer_mines = spectatee.minelayer_mines;
        self.punchangle = spectatee.punchangle;
        self.view_ofs = spectatee.view_ofs;
@@ -2753,7 +2756,26 @@ void PlayerPreThink (void)
                                        self.glowmod_z = -1;
                        }
                        else
+                       {
+                               // set weapon and player glowmod
                                self.glowmod = colormapPaletteColor(self.clientcolors & 0x0F, TRUE) * 2;
+
+                               if(self.weapon == WEP_NEX && autocvar_g_balance_nex_charge)
+                               {
+                                       self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
+                                       self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
+                                       self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
+
+                                       if(self.nex_charge > autocvar_g_balance_nex_charge_animlimit)
+                                       {
+                                               self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
+                                               self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
+                                               self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
+                                       }
+                               }
+                               else
+                                       self.weaponentity_glowmod = self.glowmod;
+                       }
                        player_powerups();
                }
 
index 1f469a9b3169001b3e04d18a60e1d657dc8f883a..3e507f4ab644b2bb25f1d2eced3a7a3363e4b178 100644 (file)
@@ -627,6 +627,7 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                frag_inflictor = inflictor;
                frag_target = self;
                MUTATOR_CALLHOOK(PlayerDies);
+               weapon_action(self.weapon, WR_PLAYERDEATH);
 
                if(self.flagcarried)
                {
index e605a0637cbd98b18c5420d7a744388ae829e228..cab6ec6e75c5adcb56a8d7b07b417875a2a251c6 100644 (file)
@@ -197,6 +197,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
                self = oldself;
                if(startitem_failed)
                        return string_null;
+               wep.glowmod = own.weaponentity_glowmod;
                wep.think = thrown_wep_think;
                wep.nextthink = time + 0.5;
                return "";
@@ -232,6 +233,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
                        }
                        s = substring(s, 5, -1);
                }
+               wep.glowmod = own.weaponentity_glowmod;
                wep.think = thrown_wep_think;
                wep.nextthink = time + 0.5;
                return s;
@@ -282,6 +284,8 @@ void W_ThrowWeapon(vector velo, vector delta, float doreduce)
        w = self.weapon;
        if (w == 0)
                return; // just in case
+       if(self.weapon_forbidchange)
+               return;
        if(MUTATOR_CALLHOOK(ForbidThrowCurrentWeapon))
                return;
        if(!autocvar_g_weapon_throwable)
@@ -344,7 +348,7 @@ void W_WeaponFrame()
        {
                if (self.weaponentity.state == WS_CLEAR)
                {
-                       setanim(self, self.anim_draw, FALSE, TRUE, TRUE);
+                       //setanim(self, self.anim_draw, FALSE, TRUE, TRUE);
                        self.weaponentity.state = WS_RAISE;
                        weapon_action(self.switchweapon, WR_SETUP);
 
@@ -407,7 +411,6 @@ void W_WeaponFrame()
                        v_forward = fo;
                        v_right = ri;
                        v_up = up;
-                       self.weaponentity_glowmod = '0 0 0'; // reset glowmod, weapon think function only *might* set it
                        weapon_action(self.weapon, WR_THINK);
                }
                if (time + self.weapon_frametime * 0.5 >= self.weapon_nextthink)
index 1ac1f78bfa199d6f73758b0b5de64395286a08de..4233e7d92d755b7651a60362f27080c192e888c7 100644 (file)
@@ -34,6 +34,10 @@ float W_WeaponRateFactor()
 
 void W_SwitchWeapon_Force(entity e, float w)
 {
+       // don't switch to another weapon if we're not allowed to
+       if(e.weapon_forbidchange)
+               return;
+
        e.cnt = e.switchweapon;
        e.switchweapon = w;
        e.selectweapon = w;
@@ -1253,6 +1257,8 @@ void weapon_thinkf(float fr, float t, void() func)
        self.weapon_think = func;
        //dprint("next ", ftos(self.weapon_nextthink), "\n");
 
+    // The shoot animation looks TERRIBLE without animation blending! Yay for moonwalking while shooting!
+    /*
        if (restartanim)
        if (t)
        if (!self.crouch) // shoot anim stands up, this looks bad
@@ -1265,6 +1271,7 @@ void weapon_thinkf(float fr, float t, void() func)
                anim_z = anim_y / (t + sys_frametime);
                setanim(self, anim, FALSE, TRUE, TRUE);
        }
+    */
 };
 
 void weapon_boblayer1(float spd, vector org)
index 8a3f95d02834f0fefe8f3d06dce6d8c5d22a301f..19f0c24a5981c6d2c4001623c99188b17fc5abf7 100644 (file)
@@ -210,6 +210,7 @@ void w_clear();
 void w_ready();
 // VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies)
 .float weapon_nextthink;
+.float weapon_forbidchange;
 .void() weapon_think;
 
 //float        PLAYER_WEAPONSELECTION_DELAY = );
@@ -650,6 +651,8 @@ string deathmessage;
 .float nex_charge_rottime;
 .float nex_chargepool_ammo;
 
+.float hagar_load;
+
 float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended)
 
 float serverflags;
diff --git a/qcsrc/server/frags.txt b/qcsrc/server/frags.txt
deleted file mode 100644 (file)
index 1daf099..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-TODO: remove the .frags field, except for the following values:
-
-0 = regular player
--2 = ???, used by arena
--666 = spectator
-
-Anything else shall go through PlayerScore!
diff --git a/qcsrc/server/g_swamp.qc b/qcsrc/server/g_swamp.qc
deleted file mode 100644 (file)
index fe64e7c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-*              t_swamp.c
-*              Adds spawnfunc_trigger_swamp and suppoart routines for xonotic 1.2.1+
-*              Author tZork (Jakob MG) 
-*              jakob@games43.se
-*              2005 11 29
-*/
-
index bf033e4d6801531fd003a22fe7116efd2b67736d..6ee4e117964d16ff1a3e01d624dd098caa2de62e 100644 (file)
@@ -833,6 +833,8 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
        addstat(STAT_NEX_CHARGEPOOL, AS_FLOAT, nex_chargepool_ammo);
 
+       addstat(STAT_HAGAR_LOAD, AS_INT, hagar_load);
+
        if(g_ca || g_freezetag)
        {
                addstat(STAT_REDALIVE, AS_INT, redalive_stat);
@@ -944,19 +946,6 @@ void spawnfunc_light (void)
        remove(self);
 }
 
-float TryFile( string pFilename )
-{
-       local float lHandle;
-       dprint("TryFile(\"", pFilename, "\")\n");
-       lHandle = fopen( pFilename, FILE_READ );
-       if( lHandle != -1 ) {
-               fclose( lHandle );
-               return TRUE;
-       } else {
-               return FALSE;
-       }
-};
-
 string GetGametype()
 {
        return GametypeNameFromType(game);
@@ -1000,14 +989,12 @@ float MapHasRightSize(string map)
        if(autocvar_g_maplist_check_waypoints)
        {
                dprint("checkwp "); dprint(map);
-               fh = fopen(strcat("maps/", map, ".waypoints"), FILE_READ);
-               if(fh < 0)
+               if(!fexists(strcat("maps/", map, ".waypoints")))
                {
                        dprint(": no waypoints\n");
                        return FALSE;
                }
                dprint(": has waypoints\n");
-               fclose(fh);
        }
 
        // open map size restriction file
index 9ee54dd343fdf95ab04d41784be0f7c5400918cf..0602ed9d87b3f436234bb0e681333d6a4f17491b 100644 (file)
@@ -620,16 +620,6 @@ void GetCvars(float f)
        }
 }
 
-float fexists(string f)
-{
-    float fh;
-    fh = fopen(f, FILE_READ);
-    if (fh < 0)
-        return FALSE;
-    fclose(fh);
-    return TRUE;
-}
-
 void backtrace(string msg)
 {
     float dev, war;
@@ -1995,7 +1985,8 @@ float SUB_NoImpactCheck()
        // these stop the projectile from moving, so...
        if(trace_dphitcontents == 0)
        {
-               dprint("A hit happened with zero hit contents... DEBUG THIS, this should never happen for projectiles! Projectile will self-destruct.\n");
+               //dprint("A hit happened with zero hit contents... DEBUG THIS, this should never happen for projectiles! Projectile will self-destruct.\n");
+               dprint(sprintf(_("A hit from a projectile happened with no hit contents! DEBUG THIS, this should never happen for projectiles! Profectile will self-destruct. (edict: %d, classname: %s, origin: %s)\n"), num_for_edict(self), self.classname, vtos(self.origin)));
                checkclient();
        }
     if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
index 4cddbbc70fbb74608645299b7bf36724047e2c32..f56dc59f18f15979d5cdd8e5defb06826babdaf9 100644 (file)
@@ -85,6 +85,8 @@ void freezetag_Freeze(entity attacker)
        freezetag_Ice_Think();
        self = oldself;
 
+       RemoveGrapplingHook(self);
+
        // add waypoint
        WaypointSprite_Spawn("freezetag_frozen", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attached, TRUE);
        if(self.waypointsprite_attached)
index d55c803148e6b0d598c392fed11dac8cd4276d61..488dd10206bc1c4f11d9c5b51beee49c14fb50aa 100644 (file)
@@ -96,7 +96,6 @@ t_jumppads.qc
 t_teleporters.qc
 
 sv_main.qc
-sv_stats.qc
 
 g_triggers.qc
 g_models.qc
diff --git a/qcsrc/server/sv_stats.qc b/qcsrc/server/sv_stats.qc
deleted file mode 100644 (file)
index 0924cba..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-
-// Accuracy
-//.float shots;
-//.float hits;
-
index c8f83abf78b29ead3fa1fee48d1a8c88f03d89a0..bbe81a2f6d19ae2d28b4bb6108e9942151ac73ca 100644 (file)
@@ -1 +1,3 @@
-http://www.alientrap.org/devwiki/index.php?n=Xonotic.Todo (and get this Todo actually updated :P)
+http://dev.xonotic.org/projects/xonotic/issues
+
+also: Maybe actually decide upon what to do with this todo file? No one uses it :P Just use the development tracker.
\ No newline at end of file
index df0d96679890f3b824cfda07b5dbc5384f2f9ce2..7dfd4461365e42cbcf9f70817a12fcaf87f1be6f 100644 (file)
@@ -112,6 +112,154 @@ void W_Hagar_Attack2 (void)
        other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
+.float hagar_loadstep, hagar_loadblock, hagar_loadbeep;
+void W_Hagar_Attack2_Load_Release (void)
+{
+       // time to release the rockets we've loaded
+
+       local entity missile;
+       local float counter, shots;
+       local vector s;
+       vector forward, right, up;
+
+       if(!self.hagar_load)
+               return;
+
+       weapon_prepareattack_do(1, autocvar_g_balance_hagar_secondary_refire);
+
+       W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", CHAN_WEAPON, autocvar_g_balance_hagar_secondary_damage);
+       pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+
+       forward = v_forward;
+       right = v_right;
+       up = v_up;
+
+       shots = self.hagar_load;
+       missile = world;
+       while (counter < shots)
+       {
+               missile = spawn ();
+               missile.owner = missile.realowner = self;
+               missile.classname = "missile";
+               missile.bot_dodge = TRUE;
+               missile.bot_dodgerating = autocvar_g_balance_hagar_secondary_damage;
+
+               missile.touch = W_Hagar_Touch; // not bouncy
+               missile.use = W_Hagar_Explode2;
+               missile.think = adaptor_think2use_hittype_splash;
+               missile.nextthink = time + autocvar_g_balance_hagar_secondary_lifetime_min + random() * autocvar_g_balance_hagar_secondary_lifetime_rand;
+               PROJECTILE_MAKETRIGGER(missile);
+               missile.projectiledeathtype = WEP_HAGAR;
+               setorigin (missile, w_shotorg);
+               setsize(missile, '0 0 0', '0 0 0');
+               missile.movetype = MOVETYPE_FLY;
+
+               s = '0 0 0';
+               if (counter == 0)
+                       s = '0 0 0';
+               else
+               {
+                       makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
+                       s_y = v_forward_x;
+                       s_z = v_forward_y;
+               }
+               s = s * cvar("g_balance_hagar_secondary_spread") * g_weaponspreadfactor;
+               W_SetupProjectileVelocityEx(missile, w_shotdir + right * s_y + up * s_z, v_up, cvar("g_balance_hagar_secondary_speed"), 0, 0, 0, FALSE);
+
+               missile.angles = vectoangles (missile.velocity);
+               missile.flags = FL_PROJECTILE;
+
+               CSQCProjectile(missile, TRUE, PROJECTILE_HAGAR, TRUE);
+
+               other = missile; MUTATOR_CALLHOOK(EditProjectile);
+
+               counter = counter + 1;
+       }
+
+       weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_hagar_secondary_refire, w_ready);
+       self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_refire;
+       self.hagar_load = 0;
+}
+
+void W_Hagar_Attack2_Load (void)
+{
+       // loadable hagar secondary attack, must always run each frame
+
+       local float loaded, enough_ammo;
+       loaded = self.hagar_load >= autocvar_g_balance_hagar_secondary_load_max;
+
+       // this is different than WR_CHECKAMMO when it comes to reloading
+       if(autocvar_g_balance_hagar_reload_ammo)
+               enough_ammo = self.weapon_load[WEP_HAGAR] >= autocvar_g_balance_hagar_secondary_ammo;
+       else
+               enough_ammo = self.ammo_rockets >= autocvar_g_balance_hagar_secondary_ammo;
+
+       if(self.BUTTON_ATCK2)
+       {
+               if(self.BUTTON_ATCK && autocvar_g_balance_hagar_secondary_load_abort)
+               {
+                       if(self.hagar_load)
+                       {
+                               // if we pressed primary fire while loading, unload all rockets and abort
+                               W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_secondary_ammo * self.hagar_load * -1, autocvar_g_balance_hagar_reload_ammo); // give back ammo
+                               self.hagar_load = 0;
+                               sound(self, CHAN_WEAPON, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM);
+
+                               // pause until we can load rockets again, once we re-press the alt fire button
+                               self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_speed;
+
+                               // require letting go of the alt fire button before we can load again
+                               self.hagar_loadblock = TRUE;
+                       }
+               }
+               else
+               {
+                       // check if we can attempt to load another rocket
+                       if(!loaded && enough_ammo)
+                       {
+                               if(!self.hagar_loadblock && self.hagar_loadstep < time)
+                               {
+                                       W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_secondary_ammo, autocvar_g_balance_hagar_reload_ammo);
+                                       self.hagar_load += 1;
+                                       sound(self, CHAN_WEAPON2, "weapons/hagar_load.wav", VOL_BASE, ATTN_NORM);
+
+                                       self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_speed;
+                               }
+                       }
+                       else if(!self.hagar_loadbeep && self.hagar_load) // prevents the beep from playing each frame
+                       {
+                               // if this is the last rocket we can load, play a beep sound to notify the player
+                               sound(self, CHAN_WEAPON, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM);
+                               self.hagar_loadbeep = TRUE;
+                       }
+               }
+       }
+       else if(self.hagar_loadblock)
+       {
+               // the alt fire button has been released, so re-enable loading if blocked
+               self.hagar_loadblock = FALSE;
+       }
+
+       if(self.hagar_load)
+       {
+               self.weapon_forbidchange = TRUE;
+               if(!self.BUTTON_ATCK2 || ((loaded || !enough_ammo) && self.hagar_loadstep < time && !autocvar_g_balance_hagar_secondary_load_hold))
+                       W_Hagar_Attack2_Load_Release();
+       }
+       else
+       {
+               self.weapon_forbidchange = FALSE;
+               self.hagar_loadbeep = FALSE;
+       }
+
+       // we aren't checking ammo during an attack, so we must do it here
+       if not(weapon_action(self.weapon, WR_CHECKAMMO1) + weapon_action(self.weapon, WR_CHECKAMMO2))
+       {
+               W_SwitchToOtherWeapon(self);
+               return;
+       }
+}
+
 void spawnfunc_weapon_hagar (void)
 {
        weapon_defaultspawnfunc(WEP_HAGAR);
@@ -130,9 +278,14 @@ float w_hagar(float req)
                }
        else if (req == WR_THINK)
        {
+               local float loadable_secondary;
+               loadable_secondary = autocvar_g_balance_hagar_secondary_load && autocvar_g_balance_hagar_secondary;
+
+               if (loadable_secondary)
+                       W_Hagar_Attack2_Load(); // must always run each frame
                if(autocvar_g_balance_hagar_reload_ammo && self.clip_load < min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo)) // forced reload
                        weapon_action(self.weapon, WR_RELOAD);
-               else if (self.BUTTON_ATCK)
+               else if (self.BUTTON_ATCK && !self.hagar_load && !self.hagar_loadblock) // not while secondary is loaded or awaiting reset
                {
                        if (weapon_prepareattack(0, autocvar_g_balance_hagar_primary_refire))
                        {
@@ -140,7 +293,7 @@ float w_hagar(float req)
                                weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_hagar_primary_refire, w_ready);
                        }
                }
-               else if (self.BUTTON_ATCK2 && autocvar_g_balance_hagar_secondary)
+               else if (self.BUTTON_ATCK2 && !loadable_secondary && autocvar_g_balance_hagar_secondary)
                {
                        if (weapon_prepareattack(1, autocvar_g_balance_hagar_secondary_refire))
                        {
@@ -155,12 +308,21 @@ float w_hagar(float req)
                precache_model ("models/weapons/v_hagar.md3");
                precache_model ("models/weapons/h_hagar.iqm");
                precache_sound ("weapons/hagar_fire.wav");
+               precache_sound ("weapons/hagar_load.wav");
+               precache_sound ("weapons/hagar_beep.wav");
                //precache_sound ("weapons/reload.wav"); // until weapons have individual reload sounds, precache the reload sound somewhere else
        }
        else if (req == WR_SETUP)
        {
                weapon_setup(WEP_HAGAR);
                self.current_ammo = ammo_rockets;
+               self.hagar_loadblock = FALSE;
+
+               if(self.hagar_load)
+               {
+                       W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_secondary_ammo * self.hagar_load * -1, autocvar_g_balance_hagar_reload_ammo); // give back ammo if necessary
+                       self.hagar_load = 0;
+               }
        }
        else if (req == WR_CHECKAMMO1)
        {
@@ -174,9 +336,20 @@ float w_hagar(float req)
                ammo_amount += self.weapon_load[WEP_HAGAR] >= autocvar_g_balance_hagar_secondary_ammo;
                return ammo_amount;
        }
+       else if (req == WR_RESETPLAYER)
+       {
+               self.hagar_load = 0;
+       }
+       else if (req == WR_PLAYERDEATH)
+       {
+               // if we have any rockets loaded when we die, release them
+               if(self.hagar_load && autocvar_g_balance_hagar_secondary_load_releasedeath)
+                       W_Hagar_Attack2_Load_Release();
+       }
        else if (req == WR_RELOAD)
        {
-               W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav");
+               if not(self.hagar_load) // require releasing loaded rockets first
+                       W_Reload(min(autocvar_g_balance_hagar_primary_ammo, autocvar_g_balance_hagar_secondary_ammo), autocvar_g_balance_hagar_reload_ammo, autocvar_g_balance_hagar_reload_time, "weapons/reload.wav");
        }
        return TRUE;
 };
index 476d3e676810336d1aac791f3a97dfb4523bf9ca..04a1151910bf0f290a7f91eee114aeb97a8a9fc8 100644 (file)
@@ -194,20 +194,6 @@ float w_nex(float req)
                                }
                        }
                }
-
-               if(autocvar_g_balance_nex_charge)
-               {
-                       self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
-                       self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
-                       self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
-
-                       if(self.nex_charge > autocvar_g_balance_nex_charge_animlimit)
-                       {
-                               self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
-                               self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
-                               self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
-                       }
-               }
        }
        else if (req == WR_PRECACHE)
        {
diff --git a/sound/weapons/hagar_beep.ogg b/sound/weapons/hagar_beep.ogg
new file mode 100644 (file)
index 0000000..52ef8e8
Binary files /dev/null and b/sound/weapons/hagar_beep.ogg differ
diff --git a/sound/weapons/hagar_load.ogg b/sound/weapons/hagar_load.ogg
new file mode 100644 (file)
index 0000000..92b88be
Binary files /dev/null and b/sound/weapons/hagar_load.ogg differ
index 6d719e6bcf91efe4d7d2a8013334d8182ff3a0bf..6189b51e955ef834020ad83c48161715bb930984 100644 (file)
Binary files a/textures/campingrifle.tga and b/textures/campingrifle.tga differ
index b7a33d947a797cdc7e6d55de19bb5bbf48489fd2..f42532995fe5576d8658a0f0bca8c53c73a2d295 100644 (file)
Binary files a/textures/campingrifle_glow.tga and b/textures/campingrifle_glow.tga differ
diff --git a/textures/campingrifle_pants.tga b/textures/campingrifle_pants.tga
deleted file mode 100644 (file)
index 633d3dd..0000000
Binary files a/textures/campingrifle_pants.tga and /dev/null differ
diff --git a/textures/campingrifle_shirt.tga b/textures/campingrifle_shirt.tga
deleted file mode 100644 (file)
index 8944408..0000000
Binary files a/textures/campingrifle_shirt.tga and /dev/null differ
index f67d64674023a51a8e6db047c93f0fa08b779952..c07f02a704ebdd8c15b71c0bbb12b791ef9de3b7 100644 (file)
Binary files a/textures/crylink.tga and b/textures/crylink.tga differ
index 97016866eb5992a6b7e1b2d36f87cc8f374b8c7d..84e2c17c7cc98c5f5f23939840a4df3786e9cff8 100644 (file)
Binary files a/textures/crylink_gloss.tga and b/textures/crylink_gloss.tga differ
index e73aaaa406235fb467079d86d7a9f8e2d2878c99..de4be8ef2e8ae4ed5b4b3d5b41e1beeb8e0c0bc3 100644 (file)
Binary files a/textures/crylink_glow.jpg and b/textures/crylink_glow.jpg differ
diff --git a/textures/crylink_pants.tga b/textures/crylink_pants.tga
deleted file mode 100644 (file)
index cc53e76..0000000
Binary files a/textures/crylink_pants.tga and /dev/null differ
index 5c5109e69421dab0d1a04b236414c17d1376ddfc..ec7857b19711eca5205c80ef96abfc47ec9a82d2 100644 (file)
Binary files a/textures/crylink_reflect.tga and b/textures/crylink_reflect.tga differ
index 1fe74b161d971d7c2077766f8408139f32be58ef..adf55c2ed500e0c2b2d7969648f5032a7fbefbee 100644 (file)
Binary files a/textures/electro.tga and b/textures/electro.tga differ
index 91736effd5bc035d29967a7d367dd015d55ce784..9c6a5bfffea7e7d9f89b5cc72f4f86bd8141d2b9 100644 (file)
Binary files a/textures/electro_glow.tga and b/textures/electro_glow.tga differ
diff --git a/textures/electro_pants.tga b/textures/electro_pants.tga
deleted file mode 100644 (file)
index b8e7084..0000000
Binary files a/textures/electro_pants.tga and /dev/null differ
index f57bc18ac28b0f515e712010b2a6452e73a1c8a7..a0600288ccf65716713df08c7271eb3dc0495dfc 100644 (file)
Binary files a/textures/electro_plasma.tga and b/textures/electro_plasma.tga differ
index f57bc18ac28b0f515e712010b2a6452e73a1c8a7..a0600288ccf65716713df08c7271eb3dc0495dfc 100644 (file)
Binary files a/textures/electro_plasma_glow.tga and b/textures/electro_plasma_glow.tga differ
diff --git a/textures/glauncher_glow.tga b/textures/glauncher_glow.tga
new file mode 100644 (file)
index 0000000..bd93673
Binary files /dev/null and b/textures/glauncher_glow.tga differ
diff --git a/textures/glauncher_pants.tga b/textures/glauncher_pants.tga
deleted file mode 100644 (file)
index 1f3957e..0000000
Binary files a/textures/glauncher_pants.tga and /dev/null differ
index f582ce66330c979bf61ef4d4c7a1da4c3c38f851..22c345637d8653a92ab11333b871e6f2852cf106 100644 (file)
Binary files a/textures/glscope.tga and b/textures/glscope.tga differ
index f582ce66330c979bf61ef4d4c7a1da4c3c38f851..22c345637d8653a92ab11333b871e6f2852cf106 100644 (file)
Binary files a/textures/glscope_glow.tga and b/textures/glscope_glow.tga differ
index 2b77dd918ec3b9e572f72ff99861a600a79e9f0a..f05fef985c82aeaa1f5a3d9bd17ecc762be51a62 100644 (file)
Binary files a/textures/hagar2.tga and b/textures/hagar2.tga differ
index 9fff206a2252d8dd5b4659f5487a9794384e55bc..cd4b3531230f93534bfb8f7d506fdc4924106560 100644 (file)
Binary files a/textures/hagar2_glow.tga and b/textures/hagar2_glow.tga differ
diff --git a/textures/hagar2_pants.tga b/textures/hagar2_pants.tga
deleted file mode 100644 (file)
index 5992dbf..0000000
Binary files a/textures/hagar2_pants.tga and /dev/null differ
index 9fe31cc24a27a8ba5288f0eda032ca86a41000fa..7b86985c81a84e55c03bae2e1c96c076f6ed8008 100644 (file)
Binary files a/textures/hlac_accessory.tga and b/textures/hlac_accessory.tga differ
diff --git a/textures/hlac_accessory_glow.tga b/textures/hlac_accessory_glow.tga
new file mode 100644 (file)
index 0000000..c322008
Binary files /dev/null and b/textures/hlac_accessory_glow.tga differ
diff --git a/textures/hlac_accessory_pants.tga b/textures/hlac_accessory_pants.tga
deleted file mode 100644 (file)
index 23516cc..0000000
Binary files a/textures/hlac_accessory_pants.tga and /dev/null differ
index c4c6882a20a117012d1f9fd353d361fc01332c1f..fa24925a7629759cbce66a558dcfd8023680eaa2 100644 (file)
Binary files a/textures/hlac_body.tga and b/textures/hlac_body.tga differ
index fffafabf98da05b4f21a9397ca8d8ccb401345b5..c9c04abf94509c488eb69a5b729c4cae1253a92b 100644 (file)
Binary files a/textures/hlac_body_glow.tga and b/textures/hlac_body_glow.tga differ
diff --git a/textures/hlac_body_pants.tga b/textures/hlac_body_pants.tga
deleted file mode 100644 (file)
index 32ee034..0000000
Binary files a/textures/hlac_body_pants.tga and /dev/null differ
index c3bddd150d9ce505f1a8c36003d1e8a6b7b0bc02..32ee034605b015e575aa0cf4e19e796606611e97 100644 (file)
Binary files a/textures/hlac_body_shirt.tga and b/textures/hlac_body_shirt.tga differ
index 5842c4f6cab26636f7028212b11e8cef81e61827..264a8cdf01c989b7de02e9a79e3dccecd6f6302f 100644 (file)
Binary files a/textures/hlac_metal.tga and b/textures/hlac_metal.tga differ
index 3a6abf5f11b7c69828033b93b9656f1129d3fa72..a20be9f640afb5be9d83e3d036f603ef208bf059 100644 (file)
Binary files a/textures/hlac_metal_glow.tga and b/textures/hlac_metal_glow.tga differ
index 5603b16e7d9504dad8a9f5e0ab593e052af6e32a..956b2417621cca92ca207961f45ce971febfc183 100644 (file)
Binary files a/textures/hlac_plasma.tga and b/textures/hlac_plasma.tga differ
diff --git a/textures/hookgun_pants.tga b/textures/hookgun_pants.tga
deleted file mode 100644 (file)
index 327822d..0000000
Binary files a/textures/hookgun_pants.tga and /dev/null differ
diff --git a/textures/hookgun_shirt.tga b/textures/hookgun_shirt.tga
new file mode 100644 (file)
index 0000000..327822d
Binary files /dev/null and b/textures/hookgun_shirt.tga differ
index d651d382f94bf9222c76d5dd2137d227f45d2e7c..c0f2bc78c6b3152f84fdb0f821975d2709e68cbb 100644 (file)
Binary files a/textures/laser.tga and b/textures/laser.tga differ
index 9e7eb103576c3d36c9137e0099e345a9779cfc60..90e32e7235de79be24681b753b5960d0a90e9bd8 100644 (file)
Binary files a/textures/laser_glow.tga and b/textures/laser_glow.tga differ
diff --git a/textures/laser_pants.tga b/textures/laser_pants.tga
deleted file mode 100644 (file)
index 4566bc0..0000000
Binary files a/textures/laser_pants.tga and /dev/null differ
index e0fa48c143fe567db868cedf29197d9db07e116d..834a987bd6b2f438e9b97442679514bd1b973ac9 100644 (file)
Binary files a/textures/minelayer.tga and b/textures/minelayer.tga differ
index 163735f7fad65e232d8964bfe35c484ac3f4ebdb..34e865f0c844f10aceff71932a68e7a3a4c72a58 100644 (file)
Binary files a/textures/minelayer_glow.tga and b/textures/minelayer_glow.tga differ
index 1fdc59a78de9ddd16d543b19f8f2ec0013ebca62..7ff7027cf2cf6c926fc969570504968f4235346e 100644 (file)
Binary files a/textures/nex.tga and b/textures/nex.tga differ
index 915001cde7f06d2c0e8ceaeda8aea27a6785fe86..aa6c3247471dae4d14a9ca79d861e9253362bf70 100644 (file)
Binary files a/textures/nex_glow.tga and b/textures/nex_glow.tga differ
diff --git a/textures/nex_pants.tga b/textures/nex_pants.tga
deleted file mode 100644 (file)
index 6fc3833..0000000
Binary files a/textures/nex_pants.tga and /dev/null differ
index 420bf15654ce5d03e916ff5afe941e250b7ae61f..9da70356511e3cd27cd2921e480c4fbf9023895c 100644 (file)
Binary files a/textures/portalgun.tga and b/textures/portalgun.tga differ
index 1719b0511bb6f0d12870ce78e63a259a163ee141..3a36355fb213352f3961c378476a14bc65fa5280 100644 (file)
Binary files a/textures/portalgun_glow.tga and b/textures/portalgun_glow.tga differ
diff --git a/textures/rl_glow.tga b/textures/rl_glow.tga
new file mode 100644 (file)
index 0000000..755f96a
Binary files /dev/null and b/textures/rl_glow.tga differ
diff --git a/textures/rl_pants.tga b/textures/rl_pants.tga
deleted file mode 100644 (file)
index 9f7cd2e..0000000
Binary files a/textures/rl_pants.tga and /dev/null differ
index e275817b59e1f38d4834b0cbcf5d1bcb774119c2..3e70ade018be67a6d44da8b3f14ab34310f26b32 100644 (file)
Binary files a/textures/seeker.tga and b/textures/seeker.tga differ
index 84acdbc3eb3aaa05e7ebd752b9e80f9617536794..79acae87d3bb57273a92d795de47000366dc8a6e 100644 (file)
Binary files a/textures/seeker_glow.tga and b/textures/seeker_glow.tga differ
diff --git a/textures/seeker_pants.tga b/textures/seeker_pants.tga
deleted file mode 100644 (file)
index 471fe0c..0000000
Binary files a/textures/seeker_pants.tga and /dev/null differ
diff --git a/textures/seeker_shirt.tga b/textures/seeker_shirt.tga
new file mode 100644 (file)
index 0000000..471fe0c
Binary files /dev/null and b/textures/seeker_shirt.tga differ
index 863f3830b5588939a962f1fbccb5c12cb27b74c7..10e3c433c8c4209d54550b575adfd9011eaf3d71 100644 (file)
Binary files a/textures/shotgun2_glow.tga and b/textures/shotgun2_glow.tga differ
index 442ced63a698906dbc6a1590aefc4e1fda8f98d4..8bc227c20c4bded11eae9a2fef0236d7ce5159b4 100644 (file)
Binary files a/textures/shotgun2_shirt.tga and b/textures/shotgun2_shirt.tga differ
index bc74918718c1cab7839fc40ff1b343eeb64b360e..36ce078d00ce2a4f8d61845e77b6be70bb32b6a2 100644 (file)
Binary files a/textures/shotgun_sight.tga and b/textures/shotgun_sight.tga differ
diff --git a/textures/shotgun_sight_glow.tga b/textures/shotgun_sight_glow.tga
new file mode 100644 (file)
index 0000000..e432842
Binary files /dev/null and b/textures/shotgun_sight_glow.tga differ
index de6d9db3154cd66f59c4050565d236c44083055e..ee180f442a6901c84d14ce91c7225b64fe3349f0 100644 (file)
Binary files a/textures/uzi_glow.tga and b/textures/uzi_glow.tga differ
diff --git a/textures/uzi_pants.tga b/textures/uzi_pants.tga
deleted file mode 100644 (file)
index 62f6659..0000000
Binary files a/textures/uzi_pants.tga and /dev/null differ
index 00f0470cdccd97ec9f084a6736b749b26039c3c3..38371eca775dc8933fd400c6c89dffcf131d5ddb 100644 (file)
@@ -36,6 +36,7 @@ Jakob "tZork" Markström Gröhn
 mand1nga
 Merlijn Hofstra
 remaxim
+Stephan
 
 *Engine Code Additions & QA
 Rudolf "divVerent" Polzer