summaryrefslogtreecommitdiffstats
path: root/src/Generating/VillageGen.cpp
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-19 16:21:29 +0200
committertycho <work.tycho@gmail.com>2015-05-19 16:21:29 +0200
commit2bb25b8afab365da8a8f3db15d742b1ec12c2903 (patch)
tree0d758b963b8fbb03ff84735989936aef9a79e35f /src/Generating/VillageGen.cpp
parentFinish fixing windows (diff)
downloadcuberite-2bb25b8afab365da8a8f3db15d742b1ec12c2903.tar
cuberite-2bb25b8afab365da8a8f3db15d742b1ec12c2903.tar.gz
cuberite-2bb25b8afab365da8a8f3db15d742b1ec12c2903.tar.bz2
cuberite-2bb25b8afab365da8a8f3db15d742b1ec12c2903.tar.lz
cuberite-2bb25b8afab365da8a8f3db15d742b1ec12c2903.tar.xz
cuberite-2bb25b8afab365da8a8f3db15d742b1ec12c2903.tar.zst
cuberite-2bb25b8afab365da8a8f3db15d742b1ec12c2903.zip
Diffstat (limited to 'src/Generating/VillageGen.cpp')
-rw-r--r--src/Generating/VillageGen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Generating/VillageGen.cpp b/src/Generating/VillageGen.cpp
index a3f8caa46..8f0bc13ef 100644
--- a/src/Generating/VillageGen.cpp
+++ b/src/Generating/VillageGen.cpp
@@ -389,8 +389,8 @@ cGridStructGen::cStructurePtr cVillageGen::CreateStructure(int a_GridX, int a_Gr
BLOCKTYPE RoadBlock = E_BLOCK_GRAVEL;
BLOCKTYPE WaterRoadBlock = E_BLOCK_PLANKS;
int rnd = m_Noise.IntNoise2DInt(a_OriginX, a_OriginZ) / 11;
- cVillagePiecePool * PlainsVillage = g_PlainsVillagePools[rnd % ARRAYCOUNT(g_PlainsVillagePools)];
- cVillagePiecePool * DesertVillage = g_DesertVillagePools[rnd % ARRAYCOUNT(g_DesertVillagePools)];
+ cVillagePiecePool * PlainsVillage = g_PlainsVillagePools[static_cast<size_t>(rnd) % ARRAYCOUNT(g_PlainsVillagePools)];
+ cVillagePiecePool * DesertVillage = g_DesertVillagePools[static_cast<size_t>(rnd) % ARRAYCOUNT(g_DesertVillagePools)];
for (size_t i = 0; i < ARRAYCOUNT(Biomes); i++)
{
switch (Biomes[i])