From 10e565c202329b952cfe9898983ab0bb25b647f4 Mon Sep 17 00:00:00 2001
From: JugadorXEI <eugeniom9@gmail.com>
Date: Wed, 12 Mar 2025 18:50:37 +0100
Subject: [PATCH] `mobj` and `onaline` are no longer settable in waypoint_t
 through Lua

---
 src/lua_waypointslib.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lua_waypointslib.c b/src/lua_waypointslib.c
index b65cb767b..5f3b25085 100644
--- a/src/lua_waypointslib.c
+++ b/src/lua_waypointslib.c
@@ -131,11 +131,9 @@ static int waypoint_set(lua_State *L)
 	switch (field)
 	{
 		case waypointvars_mobj:
-			waypoint->mobj = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ));
-			break;
+			return RNOSET;
 		case waypointvars_onaline:
-			waypoint->onaline = luaL_checkboolean(L, 3);
-			break;
+			return RNOSET;
 		// A function should be used to set these instead.
 		case waypointvars_nextwaypoints:
 			return RNOSET;
-- 
GitLab