From 88270be66928f3b73b73fc1f3b26a74358089223 Mon Sep 17 00:00:00 2001 From: "admin@omencraft.com" Date: Wed, 26 Oct 2011 20:52:19 +0000 Subject: Made several recomended changes. Gamemode is now world based. Need to add it to player. git-svn-id: http://mc-server.googlecode.com/svn/trunk@18 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWorld.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/cWorld.h') diff --git a/source/cWorld.h b/source/cWorld.h index 0b2f8ec85..74f8ae8e8 100644 --- a/source/cWorld.h +++ b/source/cWorld.h @@ -33,6 +33,9 @@ public: return m_Time; } long long GetWorldTime() { return m_WorldTime; } //tolua_export + + int GetGameMode() { return m_GameMode; } //return gamemode for world + void SetWorldTime(long long a_WorldTime) { m_WorldTime = a_WorldTime; } //tolua_export cChunk* GetChunk( int a_X, int a_Y, int a_Z ); @@ -136,6 +139,7 @@ private: float m_LastSave; static float m_Time; // Time in seconds long long m_WorldTime; // Time in seconds*20, this is sent to clients (is wrapped) + int m_GameMode; float m_WorldTimeFraction; // When this > 1.f m_WorldTime is incremented by 20 cWaterSimulator* m_WaterSimulator; -- cgit v1.2.3