From: Rudolf Polzer Date: Sat, 3 Mar 2012 11:46:00 +0000 (+0100) Subject: player model LOD: fix origin, actually work X-Git-Tag: xonotic-v0.6.0~26 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=940d9edb6421f3db27f88c1ab889e70195671c71;p=xonotic%2Fxonotic-data.pk3dir.git player model LOD: fix origin, actually work --- diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 8762592cd..27fb70d86 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -53,8 +53,8 @@ void CSQCPlayer_LOD_Apply(void) } else { - float distance = vlen(self.origin - other.origin); - float f = (distance + 100.0) * autocvar_cl_playerdetailreduction; + float distance = vlen(self.origin - view_origin); + float f = (distance * current_viewzoom + 100.0) * autocvar_cl_playerdetailreduction; f *= 1.0 / bound(0.01, view_quality, 1); if(f > autocvar_cl_loddistance2) self.modelindex = self.lodmodelindex2;