From aa98eb5a4c9906a0fb5be70a80ff248943b72db7 Mon Sep 17 00:00:00 2001
From: Nev3r <apophycens@gmail.com>
Date: Sun, 19 Apr 2020 17:19:04 +0200
Subject: [PATCH] Add mapthing pitch/roll Lua access as well.

---
 src/lua_mobjlib.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c
index 81a6cd5683..02cca8a769 100644
--- a/src/lua_mobjlib.c
+++ b/src/lua_mobjlib.c
@@ -786,6 +786,10 @@ static int mapthing_get(lua_State *L)
 		number = mt->y;
 	else if(fastcmp(field,"angle"))
 		number = mt->angle;
+	else if(fastcmp(field,"pitch"))
+		number = mt->pitch;
+	else if(fastcmp(field,"roll"))
+		number = mt->roll;
 	else if(fastcmp(field,"type"))
 		number = mt->type;
 	else if(fastcmp(field,"options"))
@@ -825,6 +829,10 @@ static int mapthing_set(lua_State *L)
 		mt->y = (INT16)luaL_checkinteger(L, 3);
 	else if(fastcmp(field,"angle"))
 		mt->angle = (INT16)luaL_checkinteger(L, 3);
+	else if(fastcmp(field,"pitch"))
+		mt->pitch = (INT16)luaL_checkinteger(L, 3);
+	else if(fastcmp(field,"roll"))
+		mt->roll = (INT16)luaL_checkinteger(L, 3);
 	else if(fastcmp(field,"type"))
 		mt->type = (UINT16)luaL_checkinteger(L, 3);
 	else if(fastcmp(field,"options"))
-- 
GitLab