Skip to content

Commit

Permalink
Always make sure there are 64 zones in a model
Browse files Browse the repository at this point in the history
  • Loading branch information
dpjudas committed Jul 5, 2024
1 parent 9a3d835 commit b967f33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SurrealEngine/UObject/ULevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ void UModel::Load(ObjectStream* stream)
Points = points->Vectors;
Nodes = nodes->Nodes;
Zones = nodes->Zones;
if (Zones.size() < 64)
Zones.resize(64);
Surfaces = surfaces->Surfaces;
Vertices = verts->Vertices;
NumSharedSides = verts->NumSharedSides;
Expand Down Expand Up @@ -278,6 +280,8 @@ void UModel::Load(ObjectStream* stream)
zone.Visibility = stream->ReadUInt64();
Zones.push_back(zone);
}
if (NumZones < 64)
Zones.resize(64);
}

Polys = stream->ReadObject<UPolys>();
Expand Down

0 comments on commit b967f33

Please sign in to comment.