]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rebase q3 haste changes on top of Mario's buff timers work
authorMorosophos <morosophos@teichisma.info>
Mon, 9 Sep 2019 20:25:11 +0000 (23:25 +0300)
committerMorosophos <morosophos@teichisma.info>
Mon, 9 Sep 2019 20:25:11 +0000 (23:25 +0300)
buffs-xdf.cfg [new file with mode: 0644]
physicsXDF.cfg
qcsrc/common/physics/player.qc
qcsrc/server/autocvars.qh
xonotic-server.cfg

diff --git a/buffs-xdf.cfg b/buffs-xdf.cfg
new file mode 100644 (file)
index 0000000..fcc3b5b
--- /dev/null
@@ -0,0 +1,79 @@
+seta cl_buffs_autoreplace 1
+set g_buffs -1
+set g_buffs_effects 1
+set g_buffs_waypoint_distance 1024
+set g_buffs_pickup_anyway 1
+set g_buffs_pickup_delay 0
+set g_buffs_randomize 0
+set g_buffs_random_lifetime 0.1
+set g_buffs_random_location 0
+set g_buffs_random_location_attempts 10
+set g_buffs_spawn_count 0
+set g_buffs_replace_powerups 0
+set g_buffs_drop 0
+set g_buffs_cooldown_activate 0
+set g_buffs_cooldown_respawn 0
+set g_buffs_ammo 0
+set g_buffs_ammo_time 60
+set g_buffs_resistance 1
+set g_buffs_resistance_time 60
+set g_buffs_resistance_blockpercent 0.5
+set g_buffs_medic 0
+set g_buffs_medic_time 60
+set g_buffs_medic_survive_chance 0.6
+set g_buffs_medic_survive_health 5
+set g_buffs_medic_rot 0.2
+set g_buffs_medic_max 1.5
+set g_buffs_medic_regen 1.7
+set g_buffs_medic_heal_amount 15
+set g_buffs_medic_heal_range 400
+set g_buffs_medic_heal_delay 1
+set g_buffs_vengeance 1
+set g_buffs_vengeance_time 60
+set g_buffs_vengeance_damage_multiplier 0.4
+set g_buffs_bash 0
+set g_buffs_bash_time 60
+set g_buffs_bash_force 2
+set g_buffs_bash_force_self 1.2
+set g_buffs_disability 0
+set g_buffs_disability_time 60
+set g_buffs_disability_slowtime 3
+set g_buffs_disability_speed 0.7
+set g_buffs_disability_rate 1.5
+set g_buffs_disability_weaponspeed 0.7
+set g_buffs_speed 1
+set g_buffs_speed_time 30
+set g_buffs_speed_speed 1.3  // q3 haste lasts 30 seconds
+set g_buffs_speed_rate 0.7692307692   // 1/1.3
+set g_buffs_speed_weaponspeed 1  // do not increase projectile speed
+set g_buffs_speed_damage_take 1
+set g_buffs_speed_regen 1.2
+set g_buffs_vampire 1
+set g_buffs_vampire_time 60
+set g_buffs_vampire_damage_steal 0.4
+set g_buffs_jump 0
+set g_buffs_jump_time 60
+set g_buffs_jump_height 600
+set g_buffs_invisible 1
+set g_buffs_invisible_time 60
+set g_buffs_invisible_alpha 0.15
+set g_buffs_inferno 0
+set g_buffs_inferno_time 60
+set g_buffs_inferno_damagemultiplier 0.3
+set g_buffs_inferno_burntime_factor 2
+set g_buffs_inferno_burntime_min_time 0.5
+set g_buffs_inferno_burntime_target_damage 150
+set g_buffs_inferno_burntime_target_time 5
+set g_buffs_swapper 0
+set g_buffs_swapper_time 60
+set g_buffs_swapper_range 1500
+set g_buffs_magnet 0
+set g_buffs_magnet_time 60
+set g_buffs_magnet_range_item 250
+set g_buffs_magnet_range_buff 100
+set g_buffs_luck 0
+set g_buffs_luck_time 60
+set g_buffs_luck_chance 0.15
+set g_buffs_luck_damagemultiplier 2
+set g_buffs_flight 0
+set g_buffs_flight_time 60
index e0bea6a0ea560a17c0c442a280c7293417b84505..d08c07ac806d19e7564ef7b67be03cf86cf859d8 100644 (file)
@@ -44,3 +44,5 @@ sv_jumpspeedcap_min 0
 sv_jumpspeedcap_max 0.5
 sv_jumpspeedcap_max_disable_on_ramps 1
 g_teleport_maxspeed 600
+// A cvar to toggle speed buff into q3 haste compat mode
+g_movement_highspeed_q3_compat 1
index acef8c97ad183273d5e944e5c119838bc4d6eb54..6fcf452e473321b8b63ee8c8a4f0a8366273f71b 100644 (file)
@@ -41,14 +41,18 @@ void Physics_UpdateStats(entity this)
 
        MUTATOR_CALLHOOK(PlayerPhysics_UpdateStats, this);
        float maxspd_mod = PHYS_HIGHSPEED(this);
-
-       STAT(MOVEVARS_AIRACCEL_QW, this) = AdjustAirAccelQW(Physics_ClientOption(this, "airaccel_qw", autocvar_sv_airaccel_qw), maxspd_mod);
-       STAT(MOVEVARS_AIRSTRAFEACCEL_QW, this) = (Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw))
-               ? AdjustAirAccelQW(Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw), maxspd_mod)
-               : 0;
-       STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod;
-       STAT(MOVEVARS_MAXSPEED, this) = Physics_ClientOption(this, "maxspeed", autocvar_sv_maxspeed) * maxspd_mod; // also slow walking
-
+        STAT(MOVEVARS_MAXSPEED, this) = Physics_ClientOption(this, "maxspeed", autocvar_sv_maxspeed) * maxspd_mod; // also slow walking
+        if (autocvar_g_movement_highspeed_q3_compat) {
+          STAT(MOVEVARS_AIRACCEL_QW, this) = Physics_ClientOption(this, "airaccel_qw", autocvar_sv_airaccel_qw);
+          STAT(MOVEVARS_AIRSTRAFEACCEL_QW, this) = Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw);
+          STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw);
+        } else {
+          STAT(MOVEVARS_AIRACCEL_QW, this) = AdjustAirAccelQW(Physics_ClientOption(this, "airaccel_qw", autocvar_sv_airaccel_qw), maxspd_mod);
+          STAT(MOVEVARS_AIRSTRAFEACCEL_QW, this) = (Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw))
+            ? AdjustAirAccelQW(Physics_ClientOption(this, "airstrafeaccel_qw", autocvar_sv_airstrafeaccel_qw), maxspd_mod)
+            : 0;
+          STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod;
+        }
        bool vq3compat = autocvar_sv_vq3compat && autocvar_sv_vq3compat_changehitbox; // NOTE: these hitboxes are off by 1 due to engine differences
        STAT(PL_MIN, this) = (vq3compat) ? '-15 -15 -24' : autocvar_sv_player_mins;
        STAT(PL_MAX, this) = (vq3compat) ? '15 15 32' : autocvar_sv_player_maxs;
@@ -61,7 +65,12 @@ void Physics_UpdateStats(entity this)
        // fix some new settings
        STAT(MOVEVARS_AIRACCEL_QW_STRETCHFACTOR, this) = Physics_ClientOption(this, "airaccel_qw_stretchfactor", autocvar_sv_airaccel_qw_stretchfactor);
        STAT(MOVEVARS_MAXAIRSTRAFESPEED, this) = Physics_ClientOption(this, "maxairstrafespeed", autocvar_sv_maxairstrafespeed);
-       STAT(MOVEVARS_MAXAIRSPEED, this) = Physics_ClientOption(this, "maxairspeed", autocvar_sv_maxairspeed);
+        if (autocvar_g_movement_highspeed_q3_compat) {
+          STAT(MOVEVARS_MAXAIRSPEED, this) = Physics_ClientOption(this, "maxairspeed", autocvar_sv_maxairspeed) * maxspd_mod;
+        } else {
+          STAT(MOVEVARS_MAXAIRSPEED, this) = Physics_ClientOption(this, "maxairspeed", autocvar_sv_maxairspeed);
+        }
+
        STAT(MOVEVARS_AIRSTRAFEACCELERATE, this) = Physics_ClientOption(this, "airstrafeaccelerate", autocvar_sv_airstrafeaccelerate);
        STAT(MOVEVARS_WARSOWBUNNY_TURNACCEL, this) = Physics_ClientOption(this, "warsowbunny_turnaccel", autocvar_sv_warsowbunny_turnaccel);
        STAT(MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION, this) = Physics_ClientOption(this, "airaccel_sideways_friction", autocvar_sv_airaccel_sideways_friction);
index 7f3c0b7207b0b21f257e76ad357c215d5aa9de17..2c77cc85ab6c5d42e820f9b39d4b76b121da796d 100644 (file)
@@ -169,6 +169,7 @@ float autocvar_g_maxspeed;
 bool autocvar_g_mirrordamage_onlyweapons;
 
 float autocvar_g_movement_highspeed = 1;
+bool autocvar_g_movement_highspeed_q3_compat = 0;
 string autocvar_g_mutatormsg;
 //float autocvar_g_nick_flood_penalty;
 int autocvar_g_nick_flood_penalty_red;
index 89a04782f8828ccf4329fe30a10a48121bfdf864..84183daa95e888e46ba884dab0e73e7fe3183e9d 100644 (file)
@@ -487,6 +487,7 @@ set sv_q3acompat_machineshotgunswap 0 "shorthand for swapping machinegun and sho
 set sv_vq3compat 0 "toggle for some compatibility hacks (for VQ3 and CPM map compatibility in mapinfo files)"
 
 set g_movement_highspeed 1 "movement speed modification factor (only changes movement when above maxspeed)"
+set g_movement_highspeed_q3_compat 0 "apply g_movement_highspeed in q3-compatible way (recommended for q3 defrag maps)"
 
 set g_maxspeed 0 "player speed limit, faster players are killed (0 for unlimited speed)"