mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
[CSM] Add camera API (#5609)
* [CSM] Add camera API roper rebase & squash * Address nerzhul's review
This commit is contained in:
parent
e8b00fdf98
commit
de028fc056
11 changed files with 314 additions and 70 deletions
|
@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "lua_api/l_item.h"
|
||||
#include "lua_api/l_nodemeta.h"
|
||||
#include "lua_api/l_localplayer.h"
|
||||
#include "lua_api/l_camera.h"
|
||||
|
||||
ClientScripting::ClientScripting(Client *client):
|
||||
ScriptApiBase()
|
||||
|
@ -71,6 +72,7 @@ void ClientScripting::InitializeModApi(lua_State *L, int top)
|
|||
LuaMinimap::Register(L);
|
||||
NodeMetaRef::RegisterClient(L);
|
||||
LuaLocalPlayer::Register(L);
|
||||
LuaCamera::Register(L);
|
||||
}
|
||||
|
||||
void ClientScripting::on_client_ready(LocalPlayer *localplayer)
|
||||
|
@ -78,3 +80,8 @@ void ClientScripting::on_client_ready(LocalPlayer *localplayer)
|
|||
lua_State *L = getStack();
|
||||
LuaLocalPlayer::create(L, localplayer);
|
||||
}
|
||||
|
||||
void ClientScripting::on_camera_ready(Camera *camera)
|
||||
{
|
||||
LuaCamera::create(getStack(), camera);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue