From: Mario Date: Sun, 12 Jan 2020 14:46:27 +0000 (+1000) Subject: Adjust DeFrag compatibility's player size adjustment to fit the visible player model... X-Git-Tag: xonotic-v0.8.5~1105^2~21 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fe92ff1f;p=xonotic%2Fxonotic-data.pk3dir.git Adjust DeFrag compatibility's player size adjustment to fit the visible player model more accurately --- diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 82dca5352..16cb27aec 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -54,11 +54,11 @@ void Physics_UpdateStats(entity this) STAT(MOVEVARS_AIRSPEEDLIMIT_NONQW, this) = Physics_ClientOption(this, "airspeedlimit_nonqw", autocvar_sv_airspeedlimit_nonqw) * maxspd_mod; } bool q3dfcompat = autocvar_sv_q3defragcompat && autocvar_sv_q3defragcompat_changehitbox; // NOTE: these hitboxes are off by 1 due to engine differences - STAT(PL_MIN, this) = (q3dfcompat) ? '-15 -15 -24' : autocvar_sv_player_mins; - STAT(PL_MAX, this) = (q3dfcompat) ? '15 15 32' : autocvar_sv_player_maxs; + 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 26' : autocvar_sv_player_viewoffset; - STAT(PL_CROUCH_MIN, this) = (q3dfcompat) ? '-15 -15 -24' : autocvar_sv_player_crouch_mins; - STAT(PL_CROUCH_MAX, this) = (q3dfcompat) ? '15 15 16' : autocvar_sv_player_crouch_maxs; + 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 12' : autocvar_sv_player_crouch_viewoffset; // old stats diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 1d5e240b3..d79c630f2 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -611,7 +611,8 @@ void PutPlayerInServer(entity this) this.respawn_flags = 0; this.respawn_time = 0; STAT(RESPAWN_TIME, this) = 0; - this.scale = autocvar_sv_player_scale; + bool q3dfcompat = autocvar_sv_q3defragcompat && autocvar_sv_q3defragcompat_changehitbox; + this.scale = ((q3dfcompat) ? 0.9 : autocvar_sv_player_scale); this.fade_time = 0; this.pain_frame = 0; this.pain_finished = 0;