mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-05 06:53:52 +01:00
fixed modulo
This commit is contained in:
parent
489d856176
commit
191f1385b1
@ -1,6 +1,6 @@
|
|||||||
function worldeditadditions.player_axis2d(name)
|
function worldeditadditions.player_axis2d(name)
|
||||||
-- minetest.get_player_by_name("singleplayer"):
|
-- minetest.get_player_by_name("singleplayer"):
|
||||||
local dir = math.floor(minetest.get_player_by_name(name):get_look_horizontal() / math.pi * 2 + 0.5) % 3
|
local dir = math.floor(minetest.get_player_by_name(name):get_look_horizontal() / math.pi * 2 + 0.5) % 4
|
||||||
local crdnl = { {1,"z"},{-1,"x"},{-1,"z"},{1,"x"} }
|
local crdnl = { {1,"z"},{-1,"x"},{-1,"z"},{1,"x"} }
|
||||||
return crdnl[dir+1]
|
return crdnl[dir+1]
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user