diff options
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/external/pnglite/pnglite.h | 2 | ||||
| -rw-r--r-- | src/engine/server/server.cpp | 10 | ||||
| -rw-r--r-- | src/engine/shared/console.cpp | 3 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/engine/external/pnglite/pnglite.h b/src/engine/external/pnglite/pnglite.h index 72ff1c52..eae3d4ce 100644 --- a/src/engine/external/pnglite/pnglite.h +++ b/src/engine/external/pnglite/pnglite.h @@ -73,7 +73,7 @@ enum typedef unsigned (*png_write_callback_t)(void* input, unsigned long size, unsigned long numel, void* user_pointer); typedef unsigned (*png_read_callback_t)(void* output, unsigned long size, unsigned long numel, void* user_pointer); typedef void (*png_free_t)(void* p); -typedef void * (*png_alloc_t)(unsigned long s); +typedef void * (*png_alloc_t)(size_t s); typedef struct { diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 6dd5a959..96071ceb 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -552,8 +552,16 @@ int CServer::DelClientCallback(int ClientId, void *pUser) void CServer::SendMap(int ClientId) { + //get the name of the map without his path + char * pMapShortName = &g_Config.m_SvMap[0]; + for(int i = 0; i < 128; i++) + { + if(g_Config.m_SvMap[i] == '/' || g_Config.m_SvMap[i] == '\\' && i+1 < 128) + pMapShortName = &g_Config.m_SvMap[i+1]; + } + CMsgPacker Msg(NETMSG_MAP_CHANGE); - Msg.AddString(g_Config.m_SvMap, 0); + Msg.AddString(pMapShortName, 0); Msg.AddInt(m_CurrentMapCrc); SendMsgEx(&Msg, MSGFLAG_VITAL|MSGFLAG_FLUSH, ClientId, true); } diff --git a/src/engine/shared/console.cpp b/src/engine/shared/console.cpp index c545b7db..eacf9b78 100644 --- a/src/engine/shared/console.cpp +++ b/src/engine/shared/console.cpp @@ -273,7 +273,8 @@ CConsole::CCommand *CConsole::FindCommand(const char *pName) void CConsole::ExecuteLine(const char *pStr) { - CConsole::ExecuteLineStroked(1, pStr); + CConsole::ExecuteLineStroked(1, pStr); // press it + CConsole::ExecuteLineStroked(0, pStr); // then release it } |