From: bones_was_here Date: Tue, 14 Jul 2020 13:34:46 +0000 (+1000) Subject: Rename sv_q3defragcompat_changehitbox to sv_q3compat_changehitbox X-Git-Tag: xonotic-v0.8.5~352^2~63 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5cf00f1c0205addd0d7af5fa0f9faa5c6afde29c;p=xonotic%2Fxonotic-data.pk3dir.git Rename sv_q3defragcompat_changehitbox to sv_q3compat_changehitbox --- diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index e24973610..f357766e5 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -53,13 +53,13 @@ void Physics_UpdateStats(entity this) : 0; STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod; } - bool q3dfcompat = q3compat && autocvar_sv_q3defragcompat_changehitbox; // NOTE: these hitboxes are off by 1 due to engine differences - STAT(PL_MIN, this) = (q3dfcompat) ? '-15 -15 -20' : autocvar_sv_player_mins; - STAT(PL_MAX, this) = (q3dfcompat) ? '15 15 36' : autocvar_sv_player_maxs; - STAT(PL_VIEW_OFS, this) = (q3dfcompat) ? '0 0 30' : autocvar_sv_player_viewoffset; - STAT(PL_CROUCH_MIN, this) = (q3dfcompat) ? '-15 -15 -20' : autocvar_sv_player_crouch_mins; - STAT(PL_CROUCH_MAX, this) = (q3dfcompat) ? '15 15 20' : autocvar_sv_player_crouch_maxs; - STAT(PL_CROUCH_VIEW_OFS, this) = (q3dfcompat) ? '0 0 16' : autocvar_sv_player_crouch_viewoffset; + bool q3hb = q3compat && autocvar_sv_q3compat_changehitbox; // NOTE: these hitboxes are off by 1 due to engine differences + STAT(PL_MIN, this) = (q3hb) ? '-15 -15 -20' : autocvar_sv_player_mins; + STAT(PL_MAX, this) = (q3hb) ? '15 15 36' : autocvar_sv_player_maxs; + STAT(PL_VIEW_OFS, this) = (q3hb) ? '0 0 30' : autocvar_sv_player_viewoffset; + STAT(PL_CROUCH_MIN, this) = (q3hb) ? '-15 -15 -20' : autocvar_sv_player_crouch_mins; + STAT(PL_CROUCH_MAX, this) = (q3hb) ? '15 15 20' : autocvar_sv_player_crouch_maxs; + STAT(PL_CROUCH_VIEW_OFS, this) = (q3hb) ? '0 0 16' : autocvar_sv_player_crouch_viewoffset; // old stats // fix some new settings diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 6c14aa795..3dac0d4b6 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -532,4 +532,4 @@ bool autocvar_sv_showspectators; bool autocvar_g_weaponswitch_debug; bool autocvar_g_weaponswitch_debug_alternate; bool autocvar_g_allow_checkpoints; -bool autocvar_sv_q3defragcompat_changehitbox = false; +bool autocvar_sv_q3compat_changehitbox = false; diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index c83527331..720c60df9 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -613,8 +613,7 @@ void PutPlayerInServer(entity this) this.respawn_flags = 0; this.respawn_time = 0; STAT(RESPAWN_TIME, this) = 0; - bool q3dfcompat = q3compat && autocvar_sv_q3defragcompat_changehitbox; - this.scale = ((q3dfcompat) ? 0.9 : autocvar_sv_player_scale); + this.scale = ((q3compat && autocvar_sv_q3compat_changehitbox) ? 0.9 : autocvar_sv_player_scale); this.fade_time = 0; this.pain_frame = 0; this.pain_finished = 0;