]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
player model LOD: fix origin, actually work
authorRudolf Polzer <divverent@alientrap.org>
Sat, 3 Mar 2012 11:46:00 +0000 (12:46 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 3 Mar 2012 11:46:00 +0000 (12:46 +0100)
qcsrc/client/csqcmodel_hooks.qc

index 8762592cd24a572237e3c7ffb6822c7cd614d3be..27fb70d86461ea1cee14ad79ac5fd8ee8a51afe1 100644 (file)
@@ -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;