diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c
index 6bb1388fce5b0cdaa615640acca1636c33c1f238..58c1b14f2032a3c364f51353fc33db4769cf15c9 100644
--- a/src/lua_mobjlib.c
+++ b/src/lua_mobjlib.c
@@ -34,6 +34,7 @@ enum mobj_e {
 	mobj_angle,
 	mobj_sprite,
 	mobj_frame,
+	mobj_sprite2,
 	mobj_anim_duration,
 	mobj_touching_sectorlist,
 	mobj_subsector,
@@ -93,6 +94,7 @@ static const char *const mobj_opt[] = {
 	"angle",
 	"sprite",
 	"frame",
+	"sprite2",
 	"anim_duration",
 	"touching_sectorlist",
 	"subsector",
@@ -189,6 +191,9 @@ static int mobj_get(lua_State *L)
 	case mobj_frame:
 		lua_pushinteger(L, mo->frame);
 		break;
+	case mobj_sprite2:
+		lua_pushinteger(L, mo->sprite2);
+		break;
 	case mobj_anim_duration:
 		lua_pushinteger(L, mo->anim_duration);
 		break;
@@ -411,6 +416,9 @@ static int mobj_set(lua_State *L)
 	case mobj_frame:
 		mo->frame = (UINT32)luaL_checkinteger(L, 3);
 		break;
+	case mobj_sprite2:
+		mo->sprite2 = (UINT8)luaL_checkinteger(L, 3);
+		break;
 	case mobj_anim_duration:
 		mo->anim_duration = (UINT16)luaL_checkinteger(L, 3);
 		break;