From e15975bfaa5c7414751248d653dffb09484065eb Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Thu, 20 Feb 2025 17:25:11 +0300 Subject: [PATCH] update to lua template --- apps/templates/lua/data/scripts/game.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/templates/lua/data/scripts/game.lua b/apps/templates/lua/data/scripts/game.lua index 74b2bbc..7703e93 100644 --- a/apps/templates/lua/data/scripts/game.lua +++ b/apps/templates/lua/data/scripts/game.lua @@ -1,8 +1,7 @@ -- called every frame, with constant delta time function game_tick() - -- ctx.initialization_needed is true first frame and every time dynamic reload is performed - if ctx.initialization_needed then - -- ctx.udata persists on reload + -- ctx.udata persists on code reload + if ctx.udata == nil then ctx.udata = {} end end