aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_localplayer.cpp4
-rw-r--r--src/script/lua_api/l_object.cpp9
2 files changed, 9 insertions, 4 deletions
diff --git a/src/script/lua_api/l_localplayer.cpp b/src/script/lua_api/l_localplayer.cpp
index 851ede535..33fa27c8b 100644
--- a/src/script/lua_api/l_localplayer.cpp
+++ b/src/script/lua_api/l_localplayer.cpp
@@ -231,8 +231,8 @@ int LuaLocalPlayer::l_get_control(lua_State *L)
set("aux1", c.aux1);
set("sneak", c.sneak);
set("zoom", c.zoom);
- set("LMB", c.LMB);
- set("RMB", c.RMB);
+ set("dig", c.dig);
+ set("place", c.place);
return 1;
}
diff --git a/src/script/lua_api/l_object.cpp b/src/script/lua_api/l_object.cpp
index e7394133a..495d8bced 100644
--- a/src/script/lua_api/l_object.cpp
+++ b/src/script/lua_api/l_object.cpp
@@ -1455,9 +1455,14 @@ int ObjectRef::l_get_player_control(lua_State *L)
lua_setfield(L, -2, "aux1");
lua_pushboolean(L, control.sneak);
lua_setfield(L, -2, "sneak");
- lua_pushboolean(L, control.LMB);
+ lua_pushboolean(L, control.dig);
+ lua_setfield(L, -2, "dig");
+ lua_pushboolean(L, control.place);
+ lua_setfield(L, -2, "place");
+ // Legacy fields to ensure mod compatibility
+ lua_pushboolean(L, control.dig);
lua_setfield(L, -2, "LMB");
- lua_pushboolean(L, control.RMB);
+ lua_pushboolean(L, control.place);
lua_setfield(L, -2, "RMB");
lua_pushboolean(L, control.zoom);
lua_setfield(L, -2, "zoom");