about summary refs log tree commit diff
path: root/src/game/server/entity.cpp
diff options
context:
space:
mode:
authorDennis Felsing <dennis.felsing@sap.com>2017-06-22 09:47:18 +0200
committerDennis Felsing <dennis.felsing@sap.com>2017-06-22 09:47:18 +0200
commitfc6d8b4d154049e6e3d6df9039669580f8ff747c (patch)
tree5e64f811b7c3076126ea6772cbe3cc572b17b773 /src/game/server/entity.cpp
parentc1eed6e1776f48409e9d7372948e2c941dcad459 (diff)
downloadzcatch-fc6d8b4d154049e6e3d6df9039669580f8ff747c.tar.gz
zcatch-fc6d8b4d154049e6e3d6df9039669580f8ff747c.zip
Use round_to_int because of collision with std::round
Diffstat (limited to 'src/game/server/entity.cpp')
-rw-r--r--src/game/server/entity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/server/entity.cpp b/src/game/server/entity.cpp
index 7c2a97e8..5d86adaf 100644
--- a/src/game/server/entity.cpp
+++ b/src/game/server/entity.cpp
@@ -51,8 +51,8 @@ int CEntity::NetworkClipped(int SnappingClient, vec2 CheckPos)
 
 bool CEntity::GameLayerClipped(vec2 CheckPos)
 {
-	return round(CheckPos.x)/32 < -200 || round(CheckPos.x)/32 > GameServer()->Collision()->GetWidth()+200 ||
-			round(CheckPos.y)/32 < -200 || round(CheckPos.y)/32 > GameServer()->Collision()->GetHeight()+200 ? true : false;
+	return round_to_int(CheckPos.x)/32 < -200 || round_to_int(CheckPos.x)/32 > GameServer()->Collision()->GetWidth()+200 ||
+			round_to_int(CheckPos.y)/32 < -200 || round_to_int(CheckPos.y)/32 > GameServer()->Collision()->GetHeight()+200 ? true : false;
 }
 
 void CEntity::InitAffectedCharacters()