From: Dr. Jaska Date: Sun, 12 Sep 2021 11:49:33 +0000 (+0000) Subject: Fix inconsistency with electro refire time X-Git-Tag: xonotic-v0.8.5~351^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b88055b3d2a8bda473630931824c65839d2b139d;p=xonotic%2Fxonotic-data.pk3dir.git Fix inconsistency with electro refire time --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3dcd27e44..a530e348e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache - make - - EXPECT=d1b8209ef263b8fbb59dbb205049af52 + - EXPECT=c9d7c5e14b9e684c7f1379a5e21234ae - HASH=$(${ENGINE} -noconfig -nohome +timestamps 1 +exec serverbench.cfg | tee /dev/stderr | sed -e 's,^\[[^]]*\] ,,' diff --git a/bal-wep-mario.cfg b/bal-wep-mario.cfg index 1026700fc..3a213f8bb 100644 --- a/bal-wep-mario.cfg +++ b/bal-wep-mario.cfg @@ -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 diff --git a/bal-wep-nexuiz25.cfg b/bal-wep-nexuiz25.cfg index d82db5a15..59f59903f 100644 --- a/bal-wep-nexuiz25.cfg +++ b/bal-wep-nexuiz25.cfg @@ -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 diff --git a/bal-wep-samual.cfg b/bal-wep-samual.cfg index 8a1e40c29..d1c3c175c 100644 --- a/bal-wep-samual.cfg +++ b/bal-wep-samual.cfg @@ -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 diff --git a/bal-wep-xdf.cfg b/bal-wep-xdf.cfg index 611f67bce..d85c76918 100644 --- a/bal-wep-xdf.cfg +++ b/bal-wep-xdf.cfg @@ -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 diff --git a/bal-wep-xonotic.cfg b/bal-wep-xonotic.cfg index 7715b7c46..c0b7afc40 100644 --- a/bal-wep-xonotic.cfg +++ b/bal-wep-xonotic.cfg @@ -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 diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index 4a6ee87d5..cd577e1e4 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -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); } } }