WMOGroup holds a reference to the root WMO for the group. Unfortunately, we're not passing in the right root WMO reference when calling WMOGroup.clone(), which can have some unpleasant side effects if state for a given WMO doesn't match across its clones.
I just ran in to this issue when working on portal culling. Portals are stored on the root WMO, and include things like world position data. Maps that render multiple copies of the same WMO will have different world placement, which impacts the world position data for portals.
The fix should be as simple as...
Modifying WMOGroup.clone():
clone(wmo) {
return new this.constructor(wmo, this.groupID, this.data, this.path);
}
WMOGroup
holds a reference to the rootWMO
for the group. Unfortunately, we're not passing in the right rootWMO
reference when callingWMOGroup.clone()
, which can have some unpleasant side effects if state for a givenWMO
doesn't match across its clones.I just ran in to this issue when working on portal culling. Portals are stored on the root
WMO
, and include things like world position data. Maps that render multiple copies of the same WMO will have different world placement, which impacts the world position data for portals.The fix should be as simple as...
Modifying
WMOGroup.clone()
:Modifying the end of
WMOGroupBlueprint.load()
: