File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Client/mods/deathmatch/logic/luadefs Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,16 @@ void CLuaTeamDefs::AddClass(lua_State* luaVM)
4747
4848std::variant<CClientTeam*, bool > CLuaTeamDefs::GetTeamFromName (const std::string_view name) noexcept
4949{
50- CClientTeam* team = m_pTeamManager->GetTeam (name.data ());
50+ std::string string (name);
51+ CClientTeam* team = m_pTeamManager->GetTeam (string.c_str ());
5152
5253 if (!team)
5354 return false ;
5455
5556 return team;
5657}
5758
58- std::string CLuaTeamDefs::GetTeamName (CClientTeam* team) noexcept
59+ std::string CLuaTeamDefs::GetTeamName (CClientTeam* team)
5960{
6061 return std::string (team->GetTeamName ());
6162}
@@ -76,7 +77,7 @@ bool CLuaTeamDefs::GetTeamFriendlyFire(CClientTeam* team) noexcept
7677 return team->GetFriendlyFire ();
7778}
7879
79- std::vector<CClientPlayer*> CLuaTeamDefs::GetPlayersInTeam (CClientTeam* team) noexcept
80+ std::vector<CClientPlayer*> CLuaTeamDefs::GetPlayersInTeam (CClientTeam* team)
8081{
8182 return team->GetPlayers ();
8283}
Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ class CLuaTeamDefs : public CLuaDefs
1919
2020private:
2121 static std::variant<CClientTeam*, bool > GetTeamFromName (const std::string_view name) noexcept ;
22- static std::string GetTeamName (CClientTeam* team) noexcept ;
22+ static std::string GetTeamName (CClientTeam* team);
2323 static CLuaMultiReturn<std::uint8_t , std::uint8_t , std::uint8_t > GetTeamColor (CClientTeam* team) noexcept ;
2424 static bool GetTeamFriendlyFire (CClientTeam* team) noexcept ;
25- static std::vector<CClientPlayer*> GetPlayersInTeam (CClientTeam* team) noexcept ;
25+ static std::vector<CClientPlayer*> GetPlayersInTeam (CClientTeam* team);
2626 static std::uint32_t CountPlayersInTeam (CClientTeam* team) noexcept ;
2727};
You can’t perform that action at this time.
0 commit comments