From 06e9f3bfa70dc1c033a7a87e798d779591377f1d Mon Sep 17 00:00:00 2001 From: fallenoak Date: Fri, 10 Oct 2025 22:09:04 -0500 Subject: [PATCH] feat(ui): implement CSimpleModel_SetFogColor --- src/ui/CSimpleModelScript.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ui/CSimpleModelScript.cpp b/src/ui/CSimpleModelScript.cpp index 31ef2f0..f0d93ed 100644 --- a/src/ui/CSimpleModelScript.cpp +++ b/src/ui/CSimpleModelScript.cpp @@ -135,7 +135,16 @@ int32_t CSimpleModel_ReplaceIconTexture(lua_State* L) { } int32_t CSimpleModel_SetFogColor(lua_State* L) { - WHOA_UNIMPLEMENTED(0); + auto type = CSimpleModel::GetObjectType(); + auto model = static_cast(FrameScript_GetObjectThis(L, type)); + + CImVector fogColor = { 0 }; + FrameScript_GetColor(L, 2, fogColor); + + model->m_flags |= 0x1; + model->m_fogColor = fogColor; + + return 0; } int32_t CSimpleModel_GetFogColor(lua_State* L) {