-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
35 lines (31 loc) · 896 Bytes
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
dofile(modpath .. "/autofly.lua")
--dofile(modpath .. "/incremental_tp.lua")
poi.register_transport('CTP',function(pos,name)
minetest.localplayer:set_pos(pos)
end)
poi.register_transport('STP',function(pos,name)
minetest.send_chat_message("/teleport "..pos.x..","..pos.y..","..pos.z)
end)
ws.rg("AutoFsprint","Movement","autoforwardsprint",function()
if minetest.settings:get_bool("continuous_forward") then
core.set_keypress("special1", true)
end
end,function() end,function()
core.set_keypress("special1", false)
end)
ws.rg("AxisSnap","Player","axissnap",function()
local y=minetest.localplayer:get_yaw()
local yy
if ( y < 45 or y > 315 ) then
yy=0
elseif (y < 135) then
yy=90
elseif (y < 225 ) then
yy=180
else
yy=270
end
minetest.localplayer:set_yaw(yy)
end)