summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Villager.cpp
diff options
context:
space:
mode:
authorSamuel Barney <samjbarney@gmail.com>2015-07-29 17:04:03 +0200
committerSamuel Barney <samjbarney@gmail.com>2015-07-29 17:49:30 +0200
commit804805d35a87c2acc9425d1762ad26b1ba2ec9ac (patch)
tree13b603c8bbf8177da92ce87f5413fb646d204f3f /src/Mobs/Villager.cpp
parentMerge pull request #2376 from mjhanninen/fix-freebsd-build (diff)
downloadcuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.gz
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.bz2
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.lz
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.xz
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.tar.zst
cuberite-804805d35a87c2acc9425d1762ad26b1ba2ec9ac.zip
Diffstat (limited to '')
-rw-r--r--src/Mobs/Villager.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Mobs/Villager.cpp b/src/Mobs/Villager.cpp
index 9239575d0..7a1a6e448 100644
--- a/src/Mobs/Villager.cpp
+++ b/src/Mobs/Villager.cpp
@@ -115,12 +115,12 @@ void cVillager::HandleFarmerPrepareFarmCrops()
/// Read a 11x7x11 area.
Surrounding.Read(
m_World,
- (int) GetPosX() - 5,
- (int) GetPosX() + 6,
- (int) GetPosY() - 3,
- (int) GetPosY() + 4,
- (int) GetPosZ() - 5,
- (int) GetPosZ() + 6
+ static_cast<int>(GetPosX()) - 5,
+ static_cast<int>(GetPosX()) + 6,
+ static_cast<int>(GetPosY()) - 3,
+ static_cast<int>(GetPosY()) + 4,
+ static_cast<int>(GetPosZ()) - 5,
+ static_cast<int>(GetPosZ()) + 6
);
for (int I = 0; I < 5; I++)
@@ -142,8 +142,8 @@ void cVillager::HandleFarmerPrepareFarmCrops()
}
m_VillagerAction = true;
- m_CropsPos = Vector3i((int) GetPosX() + X - 5, (int) GetPosY() + Y - 3, (int) GetPosZ() + Z - 5);
- MoveToPosition(Vector3f((float) (m_CropsPos.x + 0.5), (float) m_CropsPos.y, (float) (m_CropsPos.z + 0.5)));
+ m_CropsPos = Vector3i(static_cast<int>(GetPosX()) + X - 5, static_cast<int>(GetPosY()) + Y - 3, static_cast<int>(GetPosZ()) + Z - 5);
+ MoveToPosition(Vector3f(static_cast<float>(m_CropsPos.x + 0.5), static_cast<float>(m_CropsPos.y), static_cast<float>(m_CropsPos.z + 0.5)));
return;
} // for Y loop.
} // Repeat the procces 5 times.