Skip to content

Server side getColPolygonHeight fix #3946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
};
Loading