Skip to content

Commit

Permalink
ModelDatabase: fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoVgr committed Dec 12, 2024
1 parent 189273f commit 3fb9d39
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions h3d/prim/ModelDatabase.hx
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ class ModelDatabase {

if (!isDefaultConfig) {
var c = [];
for (idx in 0...hmd.lodCount()) {
c[idx] = @:privateAccess hmd.lodConfig[idx];
if (c[idx] == null)
c[idx] = 0;
for (idx in 0...hmd.lodCount()) @:privateAccess {
if (idx >= hmd.lodConfig.length)
c[idx] = 0.;
else
c[idx] = hmd.lodConfig[idx];
}
Reflect.setField(lodConfigObj, name, c);
}
Expand Down

0 comments on commit 3fb9d39

Please sign in to comment.