From: Mario Date: Sun, 25 Sep 2022 11:44:21 +0000 (+1000) Subject: Don't set LOD model indexes if the model doesn't exist, fixes maps that make use... X-Git-Tag: xonotic-v0.8.6~201^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d22a7f4be0b556a637edd6aa4c06201fcc2183f3;p=xonotic%2Fxonotic-data.pk3dir.git Don't set LOD model indexes if the model doesn't exist, fixes maps that make use of renamed or missing LOD models --- diff --git a/qcsrc/common/mapobjects/subs.qc b/qcsrc/common/mapobjects/subs.qc index c0b137404..ed5ec9f90 100644 --- a/qcsrc/common/mapobjects/subs.qc +++ b/qcsrc/common/mapobjects/subs.qc @@ -490,7 +490,7 @@ void LODmodel_attach(entity this) this.lodmodel1 = this.lodmodel2 = ""; // don't even initialize } - if(this.lodmodel1 != "") + if(this.lodmodel1 != "" && fexists(this.lodmodel1)) { vector mi, ma; mi = this.mins; @@ -500,7 +500,7 @@ void LODmodel_attach(entity this) _setmodel(this, this.lodmodel1); this.lodmodelindex1 = this.modelindex; - if(this.lodmodel2 != "") + if(this.lodmodel2 != "" && fexists(this.lodmodel2)) { precache_model(this.lodmodel2); _setmodel(this, this.lodmodel2);