aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mangosd/WorldRunnable.cpp10
-rw-r--r--src/shared/revision_nr.h2
2 files changed, 11 insertions, 1 deletions
diff --git a/src/mangosd/WorldRunnable.cpp b/src/mangosd/WorldRunnable.cpp
index 0229f7f0f5c..0fb24577e32 100644
--- a/src/mangosd/WorldRunnable.cpp
+++ b/src/mangosd/WorldRunnable.cpp
@@ -39,6 +39,11 @@
#define WORLD_SLEEP_CONST 100 //Is this still needed?? [On linux some time ago not working 50ms]
#endif
+#ifdef WIN32
+#include "ServiceWin32.h"
+extern int m_ServiceStatus;
+#endif
+
/// Heartbeat for the World
void WorldRunnable::run()
{
@@ -73,6 +78,11 @@ void WorldRunnable::run()
}
else
prevSleepTime = 0;
+
+ #ifdef WIN32
+ if (m_ServiceStatus == 0) World::StopNow(SHUTDOWN_EXIT_CODE);
+ while (m_ServiceStatus == 2) Sleep(1000);
+ #endif
}
sWorld.KickAll(); // save and kick all players
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index 8e527cfed75..2d4ab514c72 100644
--- a/src/shared/revision_nr.h
+++ b/src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "7270"
+ #define REVISION_NR "7271"
#endif // __REVISION_NR_H__