]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add cvars for electro secondary bouncefactor/bouncestop
authorRudolf Polzer <divverent@alientrap.org>
Tue, 16 Nov 2010 06:45:54 +0000 (07:45 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 16 Nov 2010 06:47:27 +0000 (07:47 +0100)
12 files changed:
balance25.cfg
balanceLeeStricklin.cfg
balanceNexSVN.cfg
balanceSamual.cfg
balanceTest.cfg
balanceXonotic.cfg
balancetZork.cfg
qcsrc/client/Main.qc
qcsrc/client/main.qh
qcsrc/client/projectile.qc
qcsrc/server/cl_client.qc
qcsrc/server/w_electro.qc

index 9a0792012eede4d6804b8b1a9e1a9ffecc4dec63..001572fe589b5ee33f24286d85038b7df27df4e8 100644 (file)
@@ -384,6 +384,8 @@ set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_damageforcescale 4
 set g_balance_electro_secondary_count 1
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
 set g_balance_electro_combo_damage 80
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 200
index 1e72552ae0d54d01d9c24cad2e2e9f01d08d4410..62847823ff8d9849e6ab543b1ce45299992c1197 100644 (file)
@@ -395,6 +395,8 @@ set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 10
 set g_balance_electro_secondary_damageforcescale 4
 set g_balance_electro_secondary_count 3
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
 set g_balance_electro_combo_damage 70
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 200
index b17358db78c33622da6105166687aea151d10e3d..e4c4a69d182c2c80305399538503410e2eeb7736 100644 (file)
@@ -383,6 +383,8 @@ set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_damageforcescale 4
 set g_balance_electro_secondary_count 1
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
 set g_balance_electro_combo_damage 80
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 200
index 5858ec21360f5e23c67acf8cecbb9f256140fe15..b82fa6632e83386fd6359c473631ddcc4236f7c4 100644 (file)
@@ -384,6 +384,8 @@ set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_damageforcescale 4
 set g_balance_electro_secondary_count 3
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
 set g_balance_electro_combo_damage 50
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 200
index 3efe125a7367881af4cea58aa0e501498511fab5..e9b797ef59b5a44a1a988404bb451ea377a8fff3 100644 (file)
@@ -384,6 +384,8 @@ set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 10
 set g_balance_electro_secondary_damageforcescale 2
 set g_balance_electro_secondary_count 3
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
 set g_balance_electro_combo_damage 80
 set g_balance_electro_combo_edgedamage 10
 set g_balance_electro_combo_force 150
index 2f0587dde0e9aa46fd4feab21643500784f4a9f2..de110e3d5449f44ec48cd623c41ae85a3c5d29e7 100644 (file)
@@ -384,6 +384,8 @@ set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 10
 set g_balance_electro_secondary_damageforcescale 4
 set g_balance_electro_secondary_count 3
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
 set g_balance_electro_combo_damage 40
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 80
index 3ba4264870a96ff28beed9370b75a8c696aa676a..e1183bc8e51abf2253599c7d717dae196bff4e67 100644 (file)
@@ -405,6 +405,8 @@ set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 10
 set g_balance_electro_secondary_damageforcescale 2
 set g_balance_electro_secondary_count 3
+set g_balance_electro_secondary_bouncefactor 0.5
+set g_balance_electro_secondary_bouncestop 0.075
 
 set g_balance_electro_combo_damage 80
 set g_balance_electro_combo_edgedamage 10
index d358a59a536db28ea46dd630f8c4e7b941264fe4..ced8061ba9e2a58137580c79d715590165fa09a6 100644 (file)
@@ -1087,8 +1087,10 @@ void Ent_Init()
 
        g_weaponswitchdelay = ReadByte() / 255.0;
 
-       g_balance_grenadelauncher_secondary_bouncefactor = ReadCoord();
-       g_balance_grenadelauncher_secondary_bouncestop = ReadCoord();
+       g_balance_grenadelauncher_bouncefactor = ReadCoord();
+       g_balance_grenadelauncher_bouncestop = ReadCoord();
+       g_balance_electro_secondary_bouncefactor = ReadCoord();
+       g_balance_electro_secondary_bouncestop = ReadCoord();
 
        nex_scope = !ReadByte();
        campingrifle_scope = !ReadByte();
index 2294ffd1557b080e7ac8d03f1d54d0613cea1254..625a4ba7be05f5be814f088858d5a64f2233d163 100644 (file)
@@ -161,5 +161,7 @@ float calledhooks;
 
 .float ping, ping_packetloss, ping_movementloss;
 
-float g_balance_grenadelauncher_secondary_bouncefactor;
-float g_balance_grenadelauncher_secondary_bouncestop;
+float g_balance_grenadelauncher_bouncefactor;
+float g_balance_grenadelauncher_bouncestop;
+float g_balance_electro_secondary_bouncefactor;
+float g_balance_electro_secondary_bouncestop;
index fb07b21b8fd18473dfdb9168d5b56b4342b5873d..a2cef76454919d6afdc77dd7620de3bde273c7bd 100644 (file)
@@ -315,6 +315,8 @@ void Ent_Projectile()
                                self.maxs = '0 0 -4';
                                self.move_movetype = MOVETYPE_BOUNCE;
                                self.move_touch = SUB_Null;
+                               self.move_bounce_factor = g_balance_electro_secondary_bouncefactor;
+                               self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
                                break;
                        case PROJECTILE_ROCKET:
                                loopsound(self, CHAN_PROJECTILE, "weapons/rocket_fly.wav", VOL_BASE, ATTN_NORM);
@@ -330,8 +332,8 @@ void Ent_Projectile()
                                self.maxs = '3 3 3';
                                self.move_movetype = MOVETYPE_BOUNCE;
                                self.move_touch = SUB_Null;
-                               self.move_bounce_factor = g_balance_grenadelauncher_secondary_bouncefactor;
-                               self.move_bounce_stopspeed = g_balance_grenadelauncher_secondary_bouncestop;
+                               self.move_bounce_factor = g_balance_grenadelauncher_bouncefactor;
+                               self.move_bounce_stopspeed = g_balance_grenadelauncher_bouncestop;
                                break;
                        case PROJECTILE_MINE:
                                self.mins = '-4 -4 -4';
index 2a79d6a4add237e2080e9fe345a3bee520dfc328..8168f7fb3c9c08658b5ff4c836e039f22bf588dd 100644 (file)
@@ -1075,6 +1075,9 @@ void PutClientInServer (void)
        //      ctf_playerchanged();
 }
 
+.float ebouncefactor, ebouncestop; // electro's values
+// TODO do we need all these fields, or should we stop autodetecting runtime
+// changes and just have a console command to update this?
 float ClientInit_SendEntity(entity to, float sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_INIT);
@@ -1099,6 +1102,8 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay
        WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_bouncefactor
        WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop
+       WriteCoord(MSG_ENTITY, self.ebouncefactor); // g_balance_grenadelauncher_bouncefactor
+       WriteCoord(MSG_ENTITY, self.ebouncestop); // 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
        WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
@@ -1128,6 +1133,16 @@ void ClientInit_CheckUpdate()
                self.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
                self.SendFlags |= 1;
        }
+       if(self.ebouncefactor != cvar("g_balance_electro_bouncefactor"))
+       {
+               self.ebouncefactor = cvar("g_balance_electro_bouncefactor");
+               self.SendFlags |= 1;
+       }
+       if(self.ebouncestop != cvar("g_balance_electro_bouncestop"))
+       {
+               self.ebouncestop = cvar("g_balance_electro_bouncestop");
+               self.SendFlags |= 1;
+       }
 }
 
 void ClientInit_Spawn()
index 014fc34e51d15a4a176b793d7f34f35378ea24bc..1600a1c9a1fe7f8b860743d9b556a1b07f11bd06 100644 (file)
@@ -178,8 +178,8 @@ void W_Electro_Attack2()
        proj.event_damage = W_Plasma_Damage;
        proj.flags = FL_PROJECTILE;
        
-       //proj.bouncefactor = cvar("g_balance_electro_secondary_bouncefactor");
-       //proj.bouncestop = cvar("g_balance_electro_secondary_bouncestop");
+       proj.bouncefactor = cvar("g_balance_electro_secondary_bouncefactor");
+       proj.bouncestop = cvar("g_balance_electro_secondary_bouncestop");
        
 #if 0
        entity p2;