diff options
author | Mattes D <github@xoft.cz> | 2014-11-20 10:13:10 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-11-20 10:13:10 +0100 |
commit | 288cbf12cb66ed9f026f81bb13e945c68cfefd13 (patch) | |
tree | fa97f48bbd8b871aa556c79974a2f64e76272ac0 /src/World.cpp | |
parent | Mobs: Fixed crash with terrain too high. (diff) | |
parent | Merge pull request #1603 from mc-server/ImprovedNoise (diff) | |
download | cuberite-288cbf12cb66ed9f026f81bb13e945c68cfefd13.tar cuberite-288cbf12cb66ed9f026f81bb13e945c68cfefd13.tar.gz cuberite-288cbf12cb66ed9f026f81bb13e945c68cfefd13.tar.bz2 cuberite-288cbf12cb66ed9f026f81bb13e945c68cfefd13.tar.lz cuberite-288cbf12cb66ed9f026f81bb13e945c68cfefd13.tar.xz cuberite-288cbf12cb66ed9f026f81bb13e945c68cfefd13.tar.zst cuberite-288cbf12cb66ed9f026f81bb13e945c68cfefd13.zip |
Diffstat (limited to 'src/World.cpp')
-rw-r--r-- | src/World.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/World.cpp b/src/World.cpp index 68855e617..df1a97460 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -283,6 +283,7 @@ cWorld::cWorld(const AString & a_WorldName, eDimension a_Dimension, const AStrin m_bCommandBlocksEnabled(true), m_bUseChatPrefixes(false), m_TNTShrapnelLevel(slNone), + m_MaxViewDistance(12), m_Scoreboard(this), m_MapManager(this), m_GeneratorCallbacks(*this), @@ -561,6 +562,8 @@ void cWorld::Start(void) m_BroadcastDeathMessages = IniFile.GetValueSetB("Broadcasting", "BroadcastDeathMessages", true); m_BroadcastAchievementMessages = IniFile.GetValueSetB("Broadcasting", "BroadcastAchievementMessages", true); + SetMaxViewDistance(IniFile.GetValueSetI("SpawnPosition", "MaxViewDistance", 12)); + // Try to find the "SpawnPosition" key and coord values in the world configuration, set the flag if found int KeyNum = IniFile.FindKey("SpawnPosition"); m_IsSpawnExplicitlySet = @@ -2926,25 +2929,19 @@ bool cWorld::SetSignLines(int a_BlockX, int a_BlockY, int a_BlockZ, const AStrin AString Line2(a_Line2); AString Line3(a_Line3); AString Line4(a_Line4); + if (cRoot::Get()->GetPluginManager()->CallHookUpdatingSign(*this, a_BlockX, a_BlockY, a_BlockZ, Line1, Line2, Line3, Line4, a_Player)) { return false; } + if (m_ChunkMap->SetSignLines(a_BlockX, a_BlockY, a_BlockZ, Line1, Line2, Line3, Line4)) { cRoot::Get()->GetPluginManager()->CallHookUpdatedSign(*this, a_BlockX, a_BlockY, a_BlockZ, Line1, Line2, Line3, Line4, a_Player); return true; } - return false; -} - - - - -bool cWorld::UpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4, cPlayer * a_Player) -{ - return SetSignLines(a_BlockX, a_BlockY, a_BlockZ, a_Line1, a_Line2, a_Line3, a_Line4, a_Player); + return false; } |