]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't set LOD model indexes if the model doesn't exist, fixes maps that make use...
authorMario <mario.mario@y7mail.com>
Sun, 25 Sep 2022 11:44:21 +0000 (21:44 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 25 Sep 2022 11:44:21 +0000 (21:44 +1000)
qcsrc/common/mapobjects/subs.qc

index c0b137404c55956d1fa509f697a23e1452c6676e..ed5ec9f9025018b3545aa525f295d062c59685c0 100644 (file)
@@ -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);