From: Rudolf Polzer Date: Wed, 10 Nov 2010 06:22:20 +0000 (+0100) Subject: grenade launcher: move bouncefactor to a common cvar for both modes (as it wasn't... X-Git-Tag: xonotic-v0.1.0preview~168 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e92b8aac3fe5aa3a2f66db6834c64a06ffcec943;p=xonotic%2Fxonotic-data.pk3dir.git grenade launcher: move bouncefactor to a common cvar for both modes (as it wasn't csqc networked properly) --- diff --git a/balance25.cfg b/balance25.cfg index 2754c1666..49a450f80 100644 --- a/balance25.cfg +++ b/balance25.cfg @@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3 set g_balance_grenadelauncher_primary_ammo 2 set g_balance_grenadelauncher_primary_health 25 set g_balance_grenadelauncher_primary_damageforcescale 4 -set g_balance_grenadelauncher_primary_bouncefactor 0.5 -set g_balance_grenadelauncher_primary_bouncestop 0.075 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0 set g_balance_grenadelauncher_secondary_type 1 @@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3 set g_balance_grenadelauncher_secondary_ammo 2 set g_balance_grenadelauncher_secondary_health 10 set g_balance_grenadelauncher_secondary_damageforcescale 4 -set g_balance_grenadelauncher_secondary_bouncefactor 0.5 -set g_balance_grenadelauncher_secondary_bouncestop 0.075 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0 + +set g_balance_grenadelauncher_bouncefactor 0.5 +set g_balance_grenadelauncher_bouncestop 0.075 // }}} // {{{ minelayer // TODO set g_balance_minelayer_damage 35 diff --git a/balanceLeeStricklin.cfg b/balanceLeeStricklin.cfg index 613a8ebda..9735e07a5 100644 --- a/balanceLeeStricklin.cfg +++ b/balanceLeeStricklin.cfg @@ -305,8 +305,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3 set g_balance_grenadelauncher_primary_ammo 2 set g_balance_grenadelauncher_primary_health 72 set g_balance_grenadelauncher_primary_damageforcescale 0 -set g_balance_grenadelauncher_primary_bouncefactor 0.7 -set g_balance_grenadelauncher_primary_bouncestop 0.12 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0 set g_balance_grenadelauncher_secondary_type 1 @@ -325,9 +323,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3 set g_balance_grenadelauncher_secondary_ammo 2 set g_balance_grenadelauncher_secondary_health 40 set g_balance_grenadelauncher_secondary_damageforcescale 0 -set g_balance_grenadelauncher_secondary_bouncefactor 0.7 -set g_balance_grenadelauncher_secondary_bouncestop 0.12 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0 + +set g_balance_grenadelauncher_bouncefactor 0.7 +set g_balance_grenadelauncher_bouncestop 0.12 // }}} // {{{ minelayer // TODO set g_balance_minelayer_damage 35 diff --git a/balanceNexSVN.cfg b/balanceNexSVN.cfg index c8134dc71..4649a6eaa 100644 --- a/balanceNexSVN.cfg +++ b/balanceNexSVN.cfg @@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3 set g_balance_grenadelauncher_primary_ammo 2 set g_balance_grenadelauncher_primary_health 25 set g_balance_grenadelauncher_primary_damageforcescale 4 -set g_balance_grenadelauncher_primary_bouncefactor 0.5 -set g_balance_grenadelauncher_primary_bouncestop 0.075 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0 set g_balance_grenadelauncher_secondary_type 1 set g_balance_grenadelauncher_secondary_damage 70 @@ -313,9 +311,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3 set g_balance_grenadelauncher_secondary_ammo 2 set g_balance_grenadelauncher_secondary_health 10 set g_balance_grenadelauncher_secondary_damageforcescale 4 -set g_balance_grenadelauncher_secondary_bouncefactor 0.5 -set g_balance_grenadelauncher_secondary_bouncestop 0.075 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0 + +set g_balance_grenadelauncher_bouncefactor 0.5 +set g_balance_grenadelauncher_bouncestop 0.075 // }}} // {{{ minelayer // TODO set g_balance_minelayer_damage 35 diff --git a/balanceSamual.cfg b/balanceSamual.cfg index 8b7c0c26d..fc16e2ee3 100644 --- a/balanceSamual.cfg +++ b/balanceSamual.cfg @@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3 set g_balance_grenadelauncher_primary_ammo 2 set g_balance_grenadelauncher_primary_health 25 set g_balance_grenadelauncher_primary_damageforcescale 4 -set g_balance_grenadelauncher_primary_bouncefactor 0.5 -set g_balance_grenadelauncher_primary_bouncestop 0.075 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0 set g_balance_grenadelauncher_secondary_type 1 @@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3 set g_balance_grenadelauncher_secondary_ammo 2 set g_balance_grenadelauncher_secondary_health 70 set g_balance_grenadelauncher_secondary_damageforcescale 4 -set g_balance_grenadelauncher_secondary_bouncefactor 0.5 -set g_balance_grenadelauncher_secondary_bouncestop 0.075 set g_balance_grenadelauncher_secondary_remote_detonateprimary 1 + +set g_balance_grenadelauncher_bouncefactor 0.5 +set g_balance_grenadelauncher_bouncestop 0.075 // }}} // {{{ minelayer // TODO set g_balance_minelayer_damage 35 diff --git a/balanceTest.cfg b/balanceTest.cfg index 97c99888a..4bfe87bbd 100644 --- a/balanceTest.cfg +++ b/balanceTest.cfg @@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3 set g_balance_grenadelauncher_primary_ammo 2 set g_balance_grenadelauncher_primary_health 25 set g_balance_grenadelauncher_primary_damageforcescale 4 -set g_balance_grenadelauncher_primary_bouncefactor 0.5 -set g_balance_grenadelauncher_primary_bouncestop 0.075 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0 set g_balance_grenadelauncher_secondary_type 1 @@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3 set g_balance_grenadelauncher_secondary_ammo 2 set g_balance_grenadelauncher_secondary_health 10 set g_balance_grenadelauncher_secondary_damageforcescale 4 -set g_balance_grenadelauncher_secondary_bouncefactor 0.5 -set g_balance_grenadelauncher_secondary_bouncestop 0.075 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0 + +set g_balance_grenadelauncher_bouncefactor 0.5 +set g_balance_grenadelauncher_bouncestop 0.075 // }}} // {{{ minelayer // TODO set g_balance_minelayer_damage 35 diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index 416a2cdca..55d0fe69f 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.4 set g_balance_grenadelauncher_primary_ammo 2 set g_balance_grenadelauncher_primary_health 80 set g_balance_grenadelauncher_primary_damageforcescale 0 -set g_balance_grenadelauncher_primary_bouncefactor 0.5 -set g_balance_grenadelauncher_primary_bouncestop 0.12 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0 set g_balance_grenadelauncher_secondary_type 1 @@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.4 set g_balance_grenadelauncher_secondary_ammo 2 set g_balance_grenadelauncher_secondary_health 40 set g_balance_grenadelauncher_secondary_damageforcescale 0 -set g_balance_grenadelauncher_secondary_bouncefactor 0.5 -set g_balance_grenadelauncher_secondary_bouncestop 0.12 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0 + +set g_balance_grenadelauncher_bouncefactor 0.5 +set g_balance_grenadelauncher_bouncestop 0.12 // }}} // {{{ minelayer // TODO set g_balance_minelayer_damage 35 diff --git a/balancetZork.cfg b/balancetZork.cfg index 918523021..7bf8285d9 100644 --- a/balancetZork.cfg +++ b/balancetZork.cfg @@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3 set g_balance_grenadelauncher_primary_ammo 2 set g_balance_grenadelauncher_primary_health 25 set g_balance_grenadelauncher_primary_damageforcescale 4 -set g_balance_grenadelauncher_primary_bouncefactor 0.5 -set g_balance_grenadelauncher_primary_bouncestop 0.075 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0 set g_balance_grenadelauncher_secondary_type 1 @@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3 set g_balance_grenadelauncher_secondary_ammo 2 set g_balance_grenadelauncher_secondary_health 10 set g_balance_grenadelauncher_secondary_damageforcescale 4 -set g_balance_grenadelauncher_secondary_bouncefactor 0.5 -set g_balance_grenadelauncher_secondary_bouncestop 0.075 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0 + +set g_balance_grenadelauncher_bouncefactor 0.5 +set g_balance_grenadelauncher_bouncestop 0.075 // }}} // {{{ minelayer // TODO set g_balance_minelayer_damage 35 diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 35eff19e6..b9acee43c 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1091,8 +1091,8 @@ float ClientInit_SendEntity(entity to, float sf) WriteString(MSG_ENTITY, ""); WriteByte(MSG_ENTITY, self.count * 255.0); // g_balance_armor_blockpercent WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay - WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_secondary_bouncefactor - WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_secondary_bouncestop + WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_bouncefactor + WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop WriteByte(MSG_ENTITY, cvar("g_balance_nex_secondary")); // client has to know if it should zoom or not WriteByte(MSG_ENTITY, cvar("g_balance_campingrifle_secondary")); // client has to know if it should zoom or not return TRUE; @@ -1111,14 +1111,14 @@ void ClientInit_CheckUpdate() self.cnt = cvar("g_balance_weaponswitchdelay"); self.SendFlags |= 1; } - if(self.bouncefactor != cvar("g_balance_grenadelauncher_secondary_bouncefactor")) + if(self.bouncefactor != cvar("g_balance_grenadelauncher_bouncefactor")) { - self.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor"); + self.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor"); self.SendFlags |= 1; } - if(self.bouncestop != cvar("g_balance_grenadelauncher_secondary_bouncestop")) + if(self.bouncestop != cvar("g_balance_grenadelauncher_bouncestop")) { - self.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop"); + self.bouncestop = cvar("g_balance_grenadelauncher_bouncestop"); self.SendFlags |= 1; } } diff --git a/qcsrc/server/w_grenadelauncher.qc b/qcsrc/server/w_grenadelauncher.qc index e92b2b260..75d3d7e7b 100644 --- a/qcsrc/server/w_grenadelauncher.qc +++ b/qcsrc/server/w_grenadelauncher.qc @@ -174,8 +174,8 @@ void W_Grenade_Attack (void) gren.bot_dodge = TRUE; gren.bot_dodgerating = cvar("g_balance_grenadelauncher_primary_damage"); gren.movetype = MOVETYPE_BOUNCE; - gren.bouncefactor = cvar("g_balance_grenadelauncher_primary_bouncefactor"); - gren.bouncestop = cvar("g_balance_grenadelauncher_primary_bouncestop"); + gren.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor"); + gren.bouncestop = cvar("g_balance_grenadelauncher_bouncestop"); PROJECTILE_MAKETRIGGER(gren); gren.projectiledeathtype = WEP_GRENADE_LAUNCHER; setorigin(gren, w_shotorg); @@ -221,8 +221,8 @@ void W_Grenade_Attack2 (void) gren.bot_dodge = TRUE; gren.bot_dodgerating = cvar("g_balance_grenadelauncher_secondary_damage"); gren.movetype = MOVETYPE_BOUNCE; - gren.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor"); - gren.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop"); + gren.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor"); + gren.bouncestop = cvar("g_balance_grenadelauncher_bouncestop"); PROJECTILE_MAKETRIGGER(gren); gren.projectiledeathtype = WEP_GRENADE_LAUNCHER | HITTYPE_SECONDARY; setorigin(gren, w_shotorg);