Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)
authorCoderForTheBetter <marcumjp@gmail.com>
Wed, 28 Nov 2018 08:38:50 +0000 (03:38 -0500)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Wed, 28 Nov 2018 08:38:50 +0000 (09:38 +0100)
commitfaa358e797128ab07bb5644ce305a832d59e5596
treedcf05ef0611b839503c4845fd89ad9519ee1c4bb
parent9519d57017cfa28eb4f2fbf3c780f826017bbb00
Add Lua methods 'set_rotation()' and 'get_rotation()' (#7395)

* Adds Lua methods 'set_rotation()' and 'get_rotation'. Also changed some method names to be more clear. Instead of an f32 being sent over network for yaw, now a v3f is sent for rotation on xyz axes. Perserved Lua method set_yaw/setyaw so that old mods still work, other wise to set yaw they would need to switch to set_rotation(0, yaw, 0).
18 files changed:
doc/lua_api.txt
src/clientiface.cpp
src/content_cao.cpp
src/content_cao.h
src/content_sao.cpp
src/content_sao.h
src/database/database-files.cpp
src/database/database-postgresql.cpp
src/database/database-sqlite3.cpp
src/genericobject.cpp
src/genericobject.h
src/network/serverpackethandler.cpp
src/remoteplayer.cpp
src/script/lua_api/l_object.cpp
src/script/lua_api/l_object.h
src/server.cpp
src/serverenvironment.cpp
src/util/numeric.h