summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-07 19:58:52 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-07 19:58:52 +0100
commit88a64ec40df87f21a89de43fe8bb78f10ee7eeb7 (patch)
tree631707789a182751d5d7276fb54455d500f94c3b /src/World.cpp
parentServer internally uses new functions (diff)
downloadcuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.gz
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.bz2
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.lz
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.xz
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.tar.zst
cuberite-88a64ec40df87f21a89de43fe8bb78f10ee7eeb7.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/World.cpp b/src/World.cpp
index de2002b84..e5c9f4398 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -249,7 +249,9 @@ cWorld::cWorld(const AString & a_WorldName) :
m_WeatherInterval(24000), // Guaranteed 1 day of sunshine at server start :)
m_GeneratorCallbacks(*this),
m_TickThread(*this),
- m_Scoreboard(this)
+ m_Scoreboard(this),
+ m_bCommandBlocksEnabled(false),
+ m_bUseChatPrefixes(true)
{
LOGD("cWorld::cWorld(\"%s\")", a_WorldName.c_str());
@@ -543,9 +545,10 @@ void cWorld::Start(void)
m_IsSaplingBonemealable = IniFile.GetValueSetB("Plants", "IsSaplingBonemealable", true);
m_IsSugarcaneBonemealable = IniFile.GetValueSetB("Plants", "IsSugarcaneBonemealable", false);
m_bEnabledPVP = IniFile.GetValueSetB("PVP", "Enabled", true);
- m_IsDeepSnowEnabled = IniFile.GetValueSetB("Physics", "DeepSnow", false);
+ m_IsDeepSnowEnabled = IniFile.GetValueSetB("Physics", "DeepSnow", true);
m_ShouldLavaSpawnFire = IniFile.GetValueSetB("Physics", "ShouldLavaSpawnFire", true);
m_bCommandBlocksEnabled = IniFile.GetValueSetB("Mechanics", "CommandBlocksEnabled", false);
+ m_bUseChatPrefixes = IniFile.GetValueSetB("Mechanics", "UseChatPrefixes", true);
m_VillagersShouldHarvestCrops = IniFile.GetValueSetB("Monsters", "VillagersShouldHarvestCrops", true);
m_GameMode = (eGameMode)IniFile.GetValueSetI("GameMode", "GameMode", m_GameMode);
@@ -1744,7 +1747,7 @@ void cWorld::BroadcastBlockEntity(int a_BlockX, int a_BlockY, int a_BlockZ, cons
-void cWorld::BroadcastChat(const AString & a_Message, const cClientHandle * a_Exclude)
+void cWorld::LoopPlayersAndBroadcastChat(const AString & a_Message, ChatPrefixCodes a_ChatPrefix, const cClientHandle * a_Exclude)
{
cCSLock Lock(m_CSPlayers);
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
@@ -1754,7 +1757,7 @@ void cWorld::BroadcastChat(const AString & a_Message, const cClientHandle * a_Ex
{
continue;
}
- ch->SendChat(a_Message);
+ ch->SendChat(a_Message, a_ChatPrefix);
}
}