Skip to content

Commit

Permalink
Merge branch 'master' into nitro
Browse files Browse the repository at this point in the history
  • Loading branch information
Proxy-99 authored Jan 16, 2025
2 parents ae4eda9 + af369be commit e2d1cbe
Show file tree
Hide file tree
Showing 9 changed files with 1,946 additions and 1,946 deletions.
4 changes: 2 additions & 2 deletions Server/mods/deathmatch/logic/luadefs/CLuaTeamDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ std::uint32_t CLuaTeamDefs::CountPlayersInTeam(CTeam* team) noexcept
return team->CountPlayers();
}

bool CLuaTeamDefs::SetPlayerTeam(CPlayer* player, CTeam* team) noexcept
bool CLuaTeamDefs::SetPlayerTeam(CPlayer* player, std::optional<CTeam*> team) noexcept
{
return CStaticFunctionDefinitions::SetPlayerTeam(player, team);
return CStaticFunctionDefinitions::SetPlayerTeam(player, team.value_or(nullptr));
}

bool CLuaTeamDefs::SetTeamName(CTeam* team, const std::string name)
Expand Down
2 changes: 1 addition & 1 deletion Server/mods/deathmatch/logic/luadefs/CLuaTeamDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CLuaTeamDefs : public CLuaDefs
static std::uint32_t CountPlayersInTeam(CTeam* team) noexcept;

// Team set funcs
static bool SetPlayerTeam(CPlayer* player, CTeam* team) noexcept;
static bool SetPlayerTeam(CPlayer* player, std::optional<CTeam*> team) noexcept;
static bool SetTeamName(CTeam* team, const std::string name);
static bool SetTeamColor(CTeam* team, const std::uint8_t red, const std::uint8_t green, const std::uint8_t blue) noexcept;
static bool SetTeamFriendlyFire(CTeam* team, const bool state) noexcept;
Expand Down
Loading

0 comments on commit e2d1cbe

Please sign in to comment.