Closed landru27 closed 6 years ago
Way better, changing the API was indeed unnecessary. Reviewing the code, I think we can do better yet and keep all the direction-aware logic in HeightmapImplementation
(and TaskGenerateWorldSlice
) : I add the worldUser after I create the heightmap object, but in it's unsaid invariant, HeightmapImplementation
really requires it's set of users to be not empty (as it unloads and thus eventually destroys itself when users.size() reaches zero after deregistering an user).
With hindsight, the better way to do this would have been to just give worldUser
to the HeightmapImplementation
constructor and have all the fancy loading tricks shoved in there. I'll pull your master branch and try to do it myself ( and also fix the embarrassing typo in acquire ).
This is for issue #5