diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-29 18:45:36 +0200 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-07-29 18:45:36 +0200 |
commit | 735d590abf7f804a4504b70c84a289ba86c5f8e3 (patch) | |
tree | 13b603c8bbf8177da92ce87f5413fb646d204f3f /src/Mobs/Villager.cpp | |
parent | Merge pull request #2376 from mjhanninen/fix-freebsd-build (diff) | |
parent | Silenced and fixed many warning messages across multiple files. (diff) | |
download | cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.gz cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.bz2 cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.lz cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.xz cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.tar.zst cuberite-735d590abf7f804a4504b70c84a289ba86c5f8e3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Mobs/Villager.cpp | 16 |
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. |