From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sun, 5 Feb 2023 01:24:35 +0000 (+0100) Subject: q3compat: make q3 jump pad compatibility configurable X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d7e92850ad62a58aaa5dfd67b1a6eaf3e053d157;p=xonotic%2Fxonotic-data.pk3dir.git q3compat: make q3 jump pad compatibility configurable --- diff --git a/qcsrc/common/mapobjects/trigger/jumppads.qc b/qcsrc/common/mapobjects/trigger/jumppads.qc index 07af623dd..8d6704ae0 100644 --- a/qcsrc/common/mapobjects/trigger/jumppads.qc +++ b/qcsrc/common/mapobjects/trigger/jumppads.qc @@ -135,7 +135,7 @@ bool jumppad_push(entity this, entity targ) vector org = targ.origin; - if(STAT(Q3COMPAT)) + if(STAT(Q3COMPAT) && (STAT(Q3COMPAT_JUMPPADS) >= 1) || (STAT(Q3COMPAT_JUMPPADS) >= 2)) { org = (this.absmin + this.absmax) * 0.5; } diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index 53f78cc5a..3e51fb26d 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -354,7 +354,11 @@ bool autocvar_sv_slick_applygravity; #endif REGISTER_STAT(SLICK_APPLYGRAVITY, bool, autocvar_sv_slick_applygravity) +#ifdef SVQC +int autocvar_sv_q3compat_jumppads; +#endif REGISTER_STAT(Q3COMPAT, int, q3compat) +REGISTER_STAT(Q3COMPAT_JUMPPADS, int, autocvar_sv_q3compat_jumppads) #ifdef SVQC #include "physics/movetypes/movetypes.qh" diff --git a/xonotic-server.cfg b/xonotic-server.cfg index 7d7b94733..df0ebf2f8 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -503,6 +503,7 @@ sv_gameplayfix_gravityunaffectedbyticrate 1 sv_gameplayfix_nogravityonground 1 set sv_q3compat_changehitbox 0 "use Q3 player hitbox dimensions and camera height on Q3 maps (maps with an entry in a .arena or .defi file)" +set sv_q3compat_jumppads 1 "calculate the jump pad trajectory starting at the center of the push trigger instead of the player origin, \"0\" = never, \"1\" = on Q3 maps, \"2\" = on all maps" set g_movement_highspeed 1 "multiplier scale for movement speed (applies to sv_maxspeed and sv_maxairspeed, also applies to air acceleration when g_movement_highspeed_q3_compat is set to 0)" set g_movement_highspeed_q3_compat 0 "apply speed modifiers to air movement in a more Q3-compatible way (only apply speed buffs and g_movement_highspeed to max air speed, not to acceleration)"