Skip to content

Commit

Permalink
Fix return values of getColPolygonHeight on server-side (PR #3946)
Browse files Browse the repository at this point in the history
  • Loading branch information
tederis authored Jan 10, 2025
1 parent 018a706 commit 0a6b23b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,11 +805,11 @@ int CLuaColShapeDefs::RemoveColPolygonPoint(lua_State* luaVM)
return luaL_error(luaVM, argStream.GetFullErrorMessage());
}

std::tuple<float, float> CLuaColShapeDefs::GetColPolygonHeight(CColPolygon* pColPolygon)
CLuaMultiReturn<float, float> 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<bool, float> floor, std::variant<bool, float> ceil)
Expand Down
4 changes: 2 additions & 2 deletions Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ class CLuaColShapeDefs : public CLuaDefs
LUA_DECLARE(IsInsideColShape);
LUA_DECLARE(GetColShapeType);

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

0 comments on commit 0a6b23b

Please sign in to comment.