IServer: Change GetMapName() type to const char *

Partially follow upstream 77daedc814
This commit is contained in:
Alexander Akulich 2021-12-15 02:26:15 +03:00
parent 714c242b08
commit 145816b046
3 changed files with 4 additions and 4 deletions

View file

@ -243,7 +243,7 @@ public:
virtual void SendMsgRaw(int ClientID, const void *pData, int Size, int Flags) = 0;
virtual char *GetMapName() const = 0;
virtual const char *GetMapName() const = 0;
virtual bool IsSixup(int ClientID) const = 0;
};

View file

@ -2276,10 +2276,10 @@ void CServer::PumpNetwork(bool PacketWaiting)
m_Econ.Update();
}
char *CServer::GetMapName() const
const char *CServer::GetMapName() const
{
// get the name of the map without his path
char *pMapShortName = &g_Config.m_SvMap[0];
const char *pMapShortName = &g_Config.m_SvMap[0];
for(int i = 0; i < str_length(g_Config.m_SvMap) - 1; i++)
{
if(g_Config.m_SvMap[i] == '/' || g_Config.m_SvMap[i] == '\\')

View file

@ -364,7 +364,7 @@ public:
void PumpNetwork(bool PacketWaiting);
char *GetMapName() const;
const char *GetMapName() const;
int LoadMap(const char *pMapName);
void SaveDemo(int ClientID, float Time);