From 34fa53ca3a78fc32003c85256eeb623f96bc663f Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 19 May 2013 11:49:01 +0000 Subject: Fixed entity chunking. Sand simulator was off, sand in negative coords wouldn't fall properly git-svn-id: http://mc-server.googlecode.com/svn/trunk@1489 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/Entity.h') diff --git a/source/Entity.h b/source/Entity.h index d80c622e3..bc3d90b15 100644 --- a/source/Entity.h +++ b/source/Entity.h @@ -122,8 +122,8 @@ public: double GetSpeedY (void) const { return m_Speed.y; } double GetSpeedZ (void) const { return m_Speed.z; } - int GetChunkX(void) const {return FAST_FLOOR_DIV(((int)m_Pos.x), cChunkDef::Width); } - int GetChunkZ(void) const {return FAST_FLOOR_DIV(((int)m_Pos.z), cChunkDef::Width); } + int GetChunkX(void) const {return (int)floor(m_Pos.x / cChunkDef::Width); } + int GetChunkZ(void) const {return (int)floor(m_Pos.z / cChunkDef::Width); } void SetHeadYaw (double a_HeadYaw); void SetMass (double a_Mass); -- cgit v1.2.3