From a6779087d34cf86b02e7553bea8c326e3750787a Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 3 Apr 2012 11:34:07 +0200 Subject: [PATCH] CSQCmodel LOD: don't screw up mins/maxs ;) --- qcsrc/client/csqcmodel_hooks.qc | 4 ++++ qcsrc/csqcmodellib/cl_model.qc | 1 + 2 files changed, 5 insertions(+) diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index b93bca47f..152ecbe82 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -14,6 +14,9 @@ void CSQCPlayer_LOD_Apply(void) string modelname = self.model; string s; + vector mi = self.mins; + vector ma = self.maxs; + // set modelindex self.lodmodelindex0 = self.modelindex; self.lodmodelindex1 = self.modelindex; @@ -39,6 +42,7 @@ void CSQCPlayer_LOD_Apply(void) } setmodel(self, modelname); // make everything normal again + setsize(self, mi, ma); } // apply LOD diff --git a/qcsrc/csqcmodellib/cl_model.qc b/qcsrc/csqcmodellib/cl_model.qc index 3b54263f7..163a5126d 100644 --- a/qcsrc/csqcmodellib/cl_model.qc +++ b/qcsrc/csqcmodellib/cl_model.qc @@ -208,6 +208,7 @@ void CSQCModel_Read(float isnew) if(sf & CSQCMODEL_PROPERTY_MODELINDEX) setmodelindex(self, self.modelindex); // this retrieves the .model key and sets mins/maxs/absmin/absmax + // FIXME do we WANT this to override mins/maxs? if(sf & CSQCMODEL_PROPERTY_TELEPORTED) { -- 2.39.2