diff options
| author | oy <Tom_Adams@web.de> | 2010-11-17 13:08:29 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-11-17 13:08:29 +0100 |
| commit | ca80d2a347689b5482f5c89a17a34131f79ed7cc (patch) | |
| tree | 3c781fa91ec098ec6310e0c2e95bd64ab2c3ab98 /src/game/editor/ed_io.cpp | |
| parent | 8351682edf630d2d1ec706f0cf6406d026c7a8a4 (diff) | |
| download | zcatch-ca80d2a347689b5482f5c89a17a34131f79ed7cc.tar.gz zcatch-ca80d2a347689b5482f5c89a17a34131f79ed7cc.zip | |
reload the map on save just when the map name is equal
Diffstat (limited to 'src/game/editor/ed_io.cpp')
| -rw-r--r-- | src/game/editor/ed_io.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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 <engine/client.h> #include <engine/console.h> #include <engine/graphics.h> +#include <engine/serverbrowser.h> #include <engine/storage.h> #include <game/gamecore.h> #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; } |