Skip to content

Commit e2d1cbe

Browse files
authored
Merge branch 'master' into nitro
2 parents ae4eda9 + af369be commit e2d1cbe

File tree

9 files changed

+1946
-1946
lines changed

9 files changed

+1946
-1946
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ std::uint32_t CLuaTeamDefs::CountPlayersInTeam(CTeam* team) noexcept
127127
return team->CountPlayers();
128128
}
129129

130-
bool CLuaTeamDefs::SetPlayerTeam(CPlayer* player, CTeam* team) noexcept
130+
bool CLuaTeamDefs::SetPlayerTeam(CPlayer* player, std::optional<CTeam*> team) noexcept
131131
{
132-
return CStaticFunctionDefinitions::SetPlayerTeam(player, team);
132+
return CStaticFunctionDefinitions::SetPlayerTeam(player, team.value_or(nullptr));
133133
}
134134

135135
bool CLuaTeamDefs::SetTeamName(CTeam* team, const std::string name)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class CLuaTeamDefs : public CLuaDefs
3030
static std::uint32_t CountPlayersInTeam(CTeam* team) noexcept;
3131

3232
// Team set funcs
33-
static bool SetPlayerTeam(CPlayer* player, CTeam* team) noexcept;
33+
static bool SetPlayerTeam(CPlayer* player, std::optional<CTeam*> team) noexcept;
3434
static bool SetTeamName(CTeam* team, const std::string name);
3535
static bool SetTeamColor(CTeam* team, const std::uint8_t red, const std::uint8_t green, const std::uint8_t blue) noexcept;
3636
static bool SetTeamFriendlyFire(CTeam* team, const bool state) noexcept;

0 commit comments

Comments
 (0)