cWorld:GetHeight() API
#1
Hi,

after recent experiences with running the server, I'd like to remove the cWorld:GetHeight() function from the exported API. The function makes too much trouble - when a plugin calls it, the function blocks until the chunk is available, but it holds the ChunkMap lock, thus creating a deadlock.

The recommended substitute is cWorld:TryGetHeight(), which returns immediately when the height is not available.

The GetHeight() function has long been marked in the API docs as obsolete, so it's time to finally get rid of it.

Does anyone have any immediate concerns about this change?
Reply
Thanks given by:
#2
I tried using TryGetHeight with the WorldEdit plugin but it only returns true, and not the height of the world.
Reply
Thanks given by:
#3
The return values are swapped, I'll fix that in the source so that it works as documented.
Reply
Thanks given by: NiLSPACE




Users browsing this thread: 1 Guest(s)