From 0a6b23b9bd28cf5575a7f3ff5e9364a9d703d07a Mon Sep 17 00:00:00 2001 From: TEDERIs Date: Sat, 11 Jan 2025 04:19:39 +0700 Subject: [PATCH] Fix return values of getColPolygonHeight on server-side (PR #3946) --- Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.cpp | 4 ++-- Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.cpp b/Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.cpp index ec999c4303..fad2987803 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.cpp +++ b/Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.cpp @@ -805,11 +805,11 @@ int CLuaColShapeDefs::RemoveColPolygonPoint(lua_State* luaVM) return luaL_error(luaVM, argStream.GetFullErrorMessage()); } -std::tuple CLuaColShapeDefs::GetColPolygonHeight(CColPolygon* pColPolygon) +CLuaMultiReturn CLuaColShapeDefs::GetColPolygonHeight(CColPolygon* pColPolygon) { float fFloor, fCeil; pColPolygon->GetHeight(fFloor, fCeil); - return std::make_tuple(fFloor, fCeil); + return {fFloor, fCeil}; } bool CLuaColShapeDefs::SetColPolygonHeight(CColPolygon* pColPolygon, std::variant floor, std::variant ceil) diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.h b/Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.h index 4d055a394d..d484efa763 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.h +++ b/Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.h @@ -41,6 +41,6 @@ class CLuaColShapeDefs : public CLuaDefs LUA_DECLARE(IsInsideColShape); LUA_DECLARE(GetColShapeType); - static std::tuple GetColPolygonHeight(CColPolygon* pColPolygon); - static bool SetColPolygonHeight(CColPolygon* pColPolygon, std::variant floor, std::variant ceil); + static CLuaMultiReturn GetColPolygonHeight(CColPolygon* pColPolygon); + static bool SetColPolygonHeight(CColPolygon* pColPolygon, std::variant floor, std::variant ceil); };