From 7208f34e68f3dbddacac6f6ed77a695b1ea6c2de Mon Sep 17 00:00:00 2001
From: luigi budd <dantevalerio4422@gmail.com>
Date: Sat, 22 Feb 2025 17:52:29 +0000
Subject: [PATCH] Update file lua_baselib.c

---
 src/lua_baselib.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lua_baselib.c b/src/lua_baselib.c
index 1ffa3968be..0422191ecd 100644
--- a/src/lua_baselib.c
+++ b/src/lua_baselib.c
@@ -722,6 +722,12 @@ static int lib_pSpawnLockOn(lua_State *L)
 		visual->flags2 |= MF2_DONTDRAW;
 		visual->drawonlyforplayer = player; // Hide it from the other player in splitscreen, and yourself when spectating
 		P_SetMobjStateNF(visual, state);
+
+		// This is also handled in P_SceneryThinker, but we want to set it here
+		// so we dont get any weird interp. lag as it properly scales -luigi budd
+		P_SetScale(visual, lockon->scale, false);
+		visual->destscale = lockon->destscale;
+		visual->old_scale = lockon->old_scale;
 	}
 	return 0;
 }
-- 
GitLab