mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
IServer: Change GetMapName() type to const char *
Partially follow upstream 77daedc814
This commit is contained in:
parent
714c242b08
commit
145816b046
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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] == '\\')
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue