Skip to content

Commit 0a6b23b

Browse files
authored
Fix return values of getColPolygonHeight on server-side (PR #3946)
1 parent 018a706 commit 0a6b23b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,11 +805,11 @@ int CLuaColShapeDefs::RemoveColPolygonPoint(lua_State* luaVM)
805805
return luaL_error(luaVM, argStream.GetFullErrorMessage());
806806
}
807807

808-
std::tuple<float, float> CLuaColShapeDefs::GetColPolygonHeight(CColPolygon* pColPolygon)
808+
CLuaMultiReturn<float, float> CLuaColShapeDefs::GetColPolygonHeight(CColPolygon* pColPolygon)
809809
{
810810
float fFloor, fCeil;
811811
pColPolygon->GetHeight(fFloor, fCeil);
812-
return std::make_tuple(fFloor, fCeil);
812+
return {fFloor, fCeil};
813813
}
814814

815815
bool CLuaColShapeDefs::SetColPolygonHeight(CColPolygon* pColPolygon, std::variant<bool, float> floor, std::variant<bool, float> ceil)

Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ class CLuaColShapeDefs : public CLuaDefs
4141
LUA_DECLARE(IsInsideColShape);
4242
LUA_DECLARE(GetColShapeType);
4343

44-
static std::tuple<float, float> GetColPolygonHeight(CColPolygon* pColPolygon);
45-
static bool SetColPolygonHeight(CColPolygon* pColPolygon, std::variant<bool, float> floor, std::variant<bool, float> ceil);
44+
static CLuaMultiReturn<float, float> GetColPolygonHeight(CColPolygon* pColPolygon);
45+
static bool SetColPolygonHeight(CColPolygon* pColPolygon, std::variant<bool, float> floor, std::variant<bool, float> ceil);
4646
};

0 commit comments

Comments
 (0)