summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-02-09 09:36:42 +0100
committermadmaxoft <github@xoft.cz>2014-02-09 09:36:42 +0100
commita184d592097c24c8796e8680e2ef7fdfe081305d (patch)
tree20df62dcde07191f927d9df8916375a25c8ccc87 /src/World.cpp
parentMoved a forgotten comment back to its place. (diff)
parentMerge branch 'master' into playerimprovements (diff)
downloadcuberite-a184d592097c24c8796e8680e2ef7fdfe081305d.tar
cuberite-a184d592097c24c8796e8680e2ef7fdfe081305d.tar.gz
cuberite-a184d592097c24c8796e8680e2ef7fdfe081305d.tar.bz2
cuberite-a184d592097c24c8796e8680e2ef7fdfe081305d.tar.lz
cuberite-a184d592097c24c8796e8680e2ef7fdfe081305d.tar.xz
cuberite-a184d592097c24c8796e8680e2ef7fdfe081305d.tar.zst
cuberite-a184d592097c24c8796e8680e2ef7fdfe081305d.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/World.cpp b/src/World.cpp
index dfc186639..c2149e4c0 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -250,7 +250,9 @@ cWorld::cWorld(const AString & a_WorldName) :
m_WeatherInterval(24000), // Guaranteed 1 day of sunshine at server start :)
m_Scoreboard(this),
m_GeneratorCallbacks(*this),
- m_TickThread(*this)
+ m_TickThread(*this),
+ m_bCommandBlocksEnabled(false),
+ m_bUseChatPrefixes(true)
{
LOGD("cWorld::cWorld(\"%s\")", a_WorldName.c_str());
@@ -543,13 +545,14 @@ void cWorld::Start(void)
m_IsPumpkinBonemealable = IniFile.GetValueSetB("Plants", "IsPumpkinBonemealable", false);
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_bEnabledPVP = IniFile.GetValueSetB("Mechanics", "PVPEnabled", true);
+ m_bUseChatPrefixes = IniFile.GetValueSetB("Mechanics", "UseChatPrefixes", true);
m_VillagersShouldHarvestCrops = IniFile.GetValueSetB("Monsters", "VillagersShouldHarvestCrops", true);
- m_GameMode = (eGameMode)IniFile.GetValueSetI("GameMode", "GameMode", m_GameMode);
+ m_GameMode = (eGameMode)IniFile.GetValueSetI("General", "Gamemode", m_GameMode);
// Load allowed mobs:
const char * DefaultMonsters = "";
@@ -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);
}
}