From ca80d2a347689b5482f5c89a17a34131f79ed7cc Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 17 Nov 2010 13:08:29 +0100 Subject: reload the map on save just when the map name is equal --- src/game/editor/ed_io.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/game/editor/ed_io.cpp') diff --git a/src/game/editor/ed_io.cpp b/src/game/editor/ed_io.cpp index c0df17c4..30fe4c0b 100644 --- a/src/game/editor/ed_io.cpp +++ b/src/game/editor/ed_io.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include "ed_editor.h" @@ -361,7 +362,14 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) // send rcon.. if we can if(m_pEditor->Client()->RconAuthed()) - m_pEditor->Client()->Rcon("reload"); + { + CServerInfo CurrentServerInfo; + m_pEditor->Client()->GetServerInfo(&CurrentServerInfo); + char aMapName[128]; + m_pEditor->ExtractName(pFileName, aMapName, sizeof(aMapName)); + if(!str_comp(aMapName, CurrentServerInfo.m_aMap)) + m_pEditor->Client()->Rcon("reload"); + } return 1; } -- cgit 1.4.1