From: Mircea Kitsune Date: Mon, 11 Apr 2011 12:35:14 +0000 (+0300) Subject: No longer send the maximum number of rockets as a stat, but use the same system as... X-Git-Tag: xonotic-v0.5.0~263^2~10^2~81 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8ecbce2cfec216531c46cfacb4cf61dadcbaa5bf;p=xonotic%2Fxonotic-data.pk3dir.git No longer send the maximum number of rockets as a stat, but use the same system as minelayer_maxmines --- diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index b55feab3c..3619ab677 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -549,7 +549,7 @@ set g_balance_hagar_secondary_spread 0.15 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.6 set g_balance_hagar_secondary_ammo 1 set g_balance_hagar_reload_ammo 0 //default: 25 set g_balance_hagar_reload_time 2 diff --git a/qcsrc/client/Defs.qc b/qcsrc/client/Defs.qc index b3b056948..666fd8823 100644 --- a/qcsrc/client/Defs.qc +++ b/qcsrc/client/Defs.qc @@ -263,6 +263,8 @@ float nex_scope; float minelayer_maxmines; +float hagar_maxrockets; + float bgmtime; string weaponorder_byimpulse; diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 91ce46479..6bd440268 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -1099,6 +1099,8 @@ void Ent_Init() minelayer_maxmines = ReadByte(); + hagar_maxrockets = ReadByte(); + g_trueaim_minrange = ReadCoord(); if(!postinit) diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 059fd0f4e..6e2813a2c 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -1125,7 +1125,7 @@ void CSQC_UpdateView(float w, float h) } else if (activeweapon == WEP_HAGAR && getstati(STAT_HAGAR_LOAD) && autocvar_crosshair_ring_hagar) { - ring_value = bound(0, getstati(STAT_HAGAR_LOAD) / getstati(STAT_HAGAR_MAXLOAD), 1); + 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"; diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index 22fa7c262..18cf2f673 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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; @@ -318,7 +319,6 @@ const float STAT_HIT_TIME = 54; const float STAT_TYPEHIT_TIME = 55; const float STAT_LAYED_MINES = 56; const float STAT_HAGAR_LOAD = 57; -const float STAT_HAGAR_MAXLOAD = 58; // see DP source, quakedef.h const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 48c2d43e7..5fe137f19 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1121,6 +1121,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_maxload); // hagar max loadable rockets WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange); return TRUE; } @@ -2370,7 +2371,6 @@ void SpectateCopy(entity spectatee) { self.nex_charge = spectatee.nex_charge; self.nex_chargepool_ammo = spectatee.nex_chargepool_ammo; self.hagar_load = spectatee.hagar_load; - self.hagar_maxload = spectatee.hagar_maxload; self.minelayer_mines = spectatee.minelayer_mines; self.punchangle = spectatee.punchangle; self.view_ofs = spectatee.view_ofs; diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 27b908a58..34d773504 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -659,7 +659,6 @@ string deathmessage; .float nex_chargepool_ammo; .float hagar_load; -.float hagar_maxload; float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended) diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index c83ddd821..960caaeff 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -834,7 +834,6 @@ void spawnfunc_worldspawn (void) addstat(STAT_NEX_CHARGEPOOL, AS_FLOAT, nex_chargepool_ammo); addstat(STAT_HAGAR_LOAD, AS_FLOAT, hagar_load); - addstat(STAT_HAGAR_MAXLOAD, AS_FLOAT, hagar_maxload); if(g_ca || g_freezetag) { diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index 8e05bb5bf..3afc07165 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -266,8 +266,6 @@ float w_hagar(float req) { weapon_setup(WEP_HAGAR); self.current_ammo = ammo_rockets; - if(self.hagar_maxload != autocvar_g_balance_hagar_secondary_load_maxload) - self.hagar_maxload = autocvar_g_balance_hagar_secondary_load_maxload; } else if (req == WR_CHECKAMMO1) {