]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix inconsistency with electro refire time
authorDr. Jaska <drjaska83@gmail.com>
Sun, 12 Sep 2021 11:49:33 +0000 (11:49 +0000)
committerterencehill <piuntn@gmail.com>
Sun, 12 Sep 2021 11:49:33 +0000 (11:49 +0000)
.gitlab-ci.yml
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
qcsrc/common/weapons/weapon/electro.qc

index 3dcd27e44522dcda0eebd6fff804cb140af5159c..a530e348e51753326e346c4108e85540f630805e 100644 (file)
@@ -32,7 +32,7 @@ test_sv_game:
     - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints\r
     - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache\r
     - make\r
-    - EXPECT=d1b8209ef263b8fbb59dbb205049af52\r
+    - EXPECT=c9d7c5e14b9e684c7f1379a5e21234ae\r
     - HASH=$(${ENGINE} -noconfig -nohome +timestamps 1 +exec serverbench.cfg\r
       | tee /dev/stderr\r
       | sed -e 's,^\[[^]]*\] ,,'\r
index 1026700fc36ab0d026853d7b7442f4f3a0941070..3a213f8bbc2a83881790bbcecb5d263f368f95ba 100644 (file)
@@ -218,8 +218,8 @@ set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_lifetime 4
 set g_balance_electro_secondary_limit 0
 set g_balance_electro_secondary_radius 150
-set g_balance_electro_secondary_refire 0.2
-set g_balance_electro_secondary_refire2 1.6
+set g_balance_electro_secondary_refire 1.2
+set g_balance_electro_secondary_refire2 0.2
 set g_balance_electro_secondary_speed 1000
 set g_balance_electro_secondary_speed_up 200
 set g_balance_electro_secondary_speed_z 0
index d82db5a1545c761c6644db9ec564bd221374aef9..59f59903fbd10cd48cc320ba93a3d77b20b207c4 100644 (file)
@@ -219,7 +219,7 @@ set g_balance_electro_secondary_lifetime 5
 set g_balance_electro_secondary_limit 0
 set g_balance_electro_secondary_radius 150
 set g_balance_electro_secondary_refire 0.3
-set g_balance_electro_secondary_refire2 0
+set g_balance_electro_secondary_refire2 0.3
 set g_balance_electro_secondary_speed 900
 set g_balance_electro_secondary_speed_up 200
 set g_balance_electro_secondary_speed_z 0
index 8a1e40c299b03dbacc57616a1e912df55602b065..d1c3c175c71e9908d4dd27173d15989305a251fd 100644 (file)
@@ -218,8 +218,8 @@ set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_lifetime 4
 set g_balance_electro_secondary_limit 0
 set g_balance_electro_secondary_radius 150
-set g_balance_electro_secondary_refire 0.2
-set g_balance_electro_secondary_refire2 1.6
+set g_balance_electro_secondary_refire 1.2
+set g_balance_electro_secondary_refire2 0.2
 set g_balance_electro_secondary_speed 1000
 set g_balance_electro_secondary_speed_up 200
 set g_balance_electro_secondary_speed_z 0
index 611f67bcebcf4da5bf997e3f956d048d62f1bd42..d85c76918758e1b491ede88612c65b0faa18f6d7 100644 (file)
@@ -218,8 +218,8 @@ set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_lifetime 3
 set g_balance_electro_secondary_limit 0
 set g_balance_electro_secondary_radius 150
-set g_balance_electro_secondary_refire 0.2
-set g_balance_electro_secondary_refire2 1.5
+set g_balance_electro_secondary_refire 1.1
+set g_balance_electro_secondary_refire2 0.2
 set g_balance_electro_secondary_speed 900
 set g_balance_electro_secondary_speed_up 200
 set g_balance_electro_secondary_speed_z 0
index 7715b7c46d707322746680f1f450a5b2cdb9f375..c0b7afc40c0852800d269dccbc916f58f4bea9e6 100644 (file)
@@ -218,8 +218,8 @@ set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_lifetime 4
 set g_balance_electro_secondary_limit 0
 set g_balance_electro_secondary_radius 150
-set g_balance_electro_secondary_refire 0.2
-set g_balance_electro_secondary_refire2 1.6
+set g_balance_electro_secondary_refire 1.2
+set g_balance_electro_secondary_refire2 0.2
 set g_balance_electro_secondary_speed 1000
 set g_balance_electro_secondary_speed_up 200
 set g_balance_electro_secondary_speed_z 0
index 4a6ee87d5cc16ac5bb008897ba88007994da9813..cd577e1e45103118fc1929caeab091981d8d1700 100644 (file)
@@ -468,10 +468,10 @@ void W_Electro_CheckAttack(Weapon thiswep, entity actor, .entity weaponentity, i
        {
                W_Electro_Attack_Orb(thiswep, actor, weaponentity);
                actor.(weaponentity).electro_count -= 1;
+               actor.(weaponentity).electro_secondarytime = time;
                weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack);
                return;
        }
-       // WEAPONTODO: when the player releases the button, cut down the length of refire2?
        w_ready(thiswep, actor, weaponentity, fire);
 }
 
@@ -524,6 +524,7 @@ METHOD(Electro, wr_think, void(entity thiswep, entity actor, .entity weaponentit
 
     if(fire & 1)
     {
+        if(time >= actor.(weaponentity).electro_secondarytime + WEP_CVAR_SEC(electro, refire2) * W_WeaponRateFactor(actor))
         if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(electro, refire)))
         {
                 W_Electro_Attack_Bolt(thiswep, actor, weaponentity);
@@ -532,13 +533,13 @@ METHOD(Electro, wr_think, void(entity thiswep, entity actor, .entity weaponentit
     }
     else if(fire & 2)
     {
-        if(time >= actor.(weaponentity).electro_secondarytime)
-        if(weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(electro, refire)))
+        if(time >= actor.(weaponentity).electro_secondarytime + WEP_CVAR_SEC(electro, refire) * W_WeaponRateFactor(actor))
+        if(weapon_prepareattack(thiswep, actor, weaponentity, true, -1))
         {
             W_Electro_Attack_Orb(thiswep, actor, weaponentity);
             actor.(weaponentity).electro_count = WEP_CVAR_SEC(electro, count);
+            actor.(weaponentity).electro_secondarytime = time;
             weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(electro, animtime), W_Electro_CheckAttack);
-            actor.(weaponentity).electro_secondarytime = time + WEP_CVAR_SEC(electro, refire2) * W_WeaponRateFactor(actor);
         }
     }
 }