X Z
#3
I don't think it's wrong coords, but rather it's because of rounding. The player position is a floating point value; cWorld:GetHeight() and cWorld:SetBlock() both expect an integral coord, so the Lua glue code must convert it somehow; and I'm pretty sure it's using the wrong kind of conversion.

Also, to make your code more efficient, don't do
RemoveAboveBlocks[Player:GetName()] = RemoveAboveBlocks[Player:GetName()] + 1
but instead do the calculation on a local variable and then assign the final value to RemoveAboveBlocks[Player:GetName()].
Not to mention that you could assign a value directly, because you know how many blocks will be replaced (GetHeight() - y). And why are you even storing the value in a per-player map, if you keep resetting the value with every replacement, anyway?

(05-19-2013, 09:08 PM)tonibm19 Wrote: Also, ForEachEntity don't work, please fix it.

Please don't derail by posting off-topic stuff. We know it's broken, it's in the bug tracker, and when we've got the time, we'll fix it. There are more pressing issues now, such as the pickups not working etc.
Reply
Thanks given by:


Messages In This Thread
X Z - by NiLSPACE - 05-19-2013, 08:46 PM
RE: X Z - by tonibm19 - 05-19-2013, 09:08 PM
RE: X Z - by xoft - 05-19-2013, 09:57 PM
RE: X Z - by NiLSPACE - 05-19-2013, 10:40 PM



Users browsing this thread: 1 Guest(s)