summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-04-17 22:37:00 +0200
committerMattes D <github@xoft.cz>2014-04-17 22:37:00 +0200
commitb7e074b10b1d133b5ca33e00c84b75d4fb817354 (patch)
treeadc938af1f651968871f2e43f4801d6b69c7fc41 /src/World.cpp
parentAdded area flooring. (diff)
parentCompile fix? (diff)
downloadcuberite-b7e074b10b1d133b5ca33e00c84b75d4fb817354.tar
cuberite-b7e074b10b1d133b5ca33e00c84b75d4fb817354.tar.gz
cuberite-b7e074b10b1d133b5ca33e00c84b75d4fb817354.tar.bz2
cuberite-b7e074b10b1d133b5ca33e00c84b75d4fb817354.tar.lz
cuberite-b7e074b10b1d133b5ca33e00c84b75d4fb817354.tar.xz
cuberite-b7e074b10b1d133b5ca33e00c84b75d4fb817354.tar.zst
cuberite-b7e074b10b1d133b5ca33e00c84b75d4fb817354.zip
Diffstat (limited to 'src/World.cpp')
-rw-r--r--src/World.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/World.cpp b/src/World.cpp
index c188fd522..c23e255f8 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -574,7 +574,7 @@ void cWorld::Start(void)
m_IsSugarcaneBonemealable = IniFile.GetValueSetB("Plants", "IsSugarcaneBonemealable", false);
m_IsDeepSnowEnabled = IniFile.GetValueSetB("Physics", "DeepSnow", true);
m_ShouldLavaSpawnFire = IniFile.GetValueSetB("Physics", "ShouldLavaSpawnFire", true);
- int TNTShrapnelLevel = IniFile.GetValueSetI("Physics", "TNTShrapnelLevel", (int)slNone);
+ int TNTShrapnelLevel = IniFile.GetValueSetI("Physics", "TNTShrapnelLevel", (int)slAll);
m_bCommandBlocksEnabled = IniFile.GetValueSetB("Mechanics", "CommandBlocksEnabled", false);
m_bEnabledPVP = IniFile.GetValueSetB("Mechanics", "PVPEnabled", true);
m_bUseChatPrefixes = IniFile.GetValueSetB("Mechanics", "UseChatPrefixes", true);
@@ -1632,7 +1632,6 @@ bool cWorld::WriteBlockArea(cBlockArea & a_Area, int a_MinBlockX, int a_MinBlock
void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_FlyAwaySpeed, bool IsPlayerCreated)
{
- MTRand r1;
a_FlyAwaySpeed /= 100; // Pre-divide, so that we don't have to divide each time inside the loop
for (cItems::const_iterator itr = a_Pickups.begin(); itr != a_Pickups.end(); ++itr)
{
@@ -1642,9 +1641,9 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double
continue;
}
- float SpeedX = (float)(a_FlyAwaySpeed * (r1.randInt(10) - 5));
- float SpeedY = (float)(a_FlyAwaySpeed * r1.randInt(50));
- float SpeedZ = (float)(a_FlyAwaySpeed * (r1.randInt(10) - 5));
+ float SpeedX = (float)(a_FlyAwaySpeed * (GetTickRandomNumber(10) - 5));
+ float SpeedY = (float)(a_FlyAwaySpeed * GetTickRandomNumber(50));
+ float SpeedZ = (float)(a_FlyAwaySpeed * (GetTickRandomNumber(10) - 5));
cPickup * Pickup = new cPickup(
a_BlockX, a_BlockY, a_BlockZ,