Add recentering

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-08-11 09:29:38 +03:00
parent e3b2f44621
commit 794178668e
4 changed files with 89 additions and 18 deletions

View File

@@ -159,7 +159,6 @@ int config_load_ref(lua_State *L, int idx, Config *out)
// ======== DEFAULTS ========
out->space.offset = (Vector3) { 0, 0, 0 };
out->space.initial_center = (Vector3) { 0, 0, 0 };
out->space.radius = 1.0f;
out->space.window_scale = 0.001f;
out->displays.hud.size = 720;
@@ -262,11 +261,6 @@ int config_load_ref(lua_State *L, int idx, Config *out)
out->space.offset = lua_readVector3(L, lua_absindex(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "initial_center");
if (lua_istable(L, -1) || lua_isuserdata(L, -1))
out->space.initial_center = lua_readVector3(L, lua_absindex(L, -1));
lua_pop(L, 1);
lua_getfield(L, -1, "radius");
if (lua_isnumber(L, -1))
out->space.radius = (float)lua_tonumber(L, -1);