File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -840,7 +840,7 @@ private static void AddModels(
840
840
841
841
// Get model data
842
842
ModelData modelData ;
843
- dfUnity . MeshReader . GetModelData ( obj . ModelIdNum , out modelData ) ;
843
+ bool hasModelData = dfUnity . MeshReader . GetModelData ( obj . ModelIdNum , out modelData ) ;
844
844
845
845
// Does this Daggerfall model have any static doors?
846
846
StaticDoor [ ] staticDoors = null ;
@@ -851,10 +851,14 @@ private static void AddModels(
851
851
GameObject go ;
852
852
if ( ! ( go = MeshReplacement . ImportCustomGameobject ( obj . ModelIdNum , parent , modelMatrix ) ) )
853
853
{
854
- if ( combiner == null || IsCityGate ( obj . ModelIdNum ) || IsBulletinBoard ( obj . ModelIdNum ) || PlayerActivate . HasCustomActivation ( obj . ModelIdNum ) )
854
+ if ( ! hasModelData ) {
855
+ Debug . LogError ( $ "Could not load model '{ obj . ModelIdNum } ' in block '{ blockData . Name } '") ;
856
+ continue ;
857
+ } else if ( combiner == null || IsCityGate ( obj . ModelIdNum ) || IsBulletinBoard ( obj . ModelIdNum ) || PlayerActivate . HasCustomActivation ( obj . ModelIdNum ) ) {
855
858
AddStandaloneModel ( dfUnity , ref modelData , modelMatrix , parent ) ;
856
- else
859
+ } else {
857
860
combiner . Add ( ref modelData , modelMatrix ) ;
861
+ }
858
862
}
859
863
860
864
// Store building information for first model of record
You can’t perform that action at this time.
0 commit comments