[7271] Implement mangosd stop and pause if it work as Windows service. Author: rilex
--HG-- branch : trunk
This commit is contained in:
@@ -39,6 +39,11 @@
|
|||||||
#define WORLD_SLEEP_CONST 100 //Is this still needed?? [On linux some time ago not working 50ms]
|
#define WORLD_SLEEP_CONST 100 //Is this still needed?? [On linux some time ago not working 50ms]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include "ServiceWin32.h"
|
||||||
|
extern int m_ServiceStatus;
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Heartbeat for the World
|
/// Heartbeat for the World
|
||||||
void WorldRunnable::run()
|
void WorldRunnable::run()
|
||||||
{
|
{
|
||||||
@@ -73,6 +78,11 @@ void WorldRunnable::run()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
prevSleepTime = 0;
|
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
|
sWorld.KickAll(); // save and kick all players
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7270"
|
#define REVISION_NR "7271"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|||||||
Reference in New Issue
Block a user