position clipping

master
Martin Gerhardy 2016-03-30 21:17:41 +02:00
parent 037a8d62b7
commit 85ee3019a9
1 changed files with 3 additions and 3 deletions

View File

@ -32,10 +32,10 @@ void User::visibleRemove(const EntitySet& entities) {
}
void User::setPos(const glm::vec3& pos) {
const int floor = _world->findFloor(pos.x, pos.z);
const int y = _world->findFloor(pos.x, pos.z);
_pos = pos;
if (_pos.y < floor)
_pos.y = floor;
if (_pos.y < y)
_pos.y = y;
}
ENetPeer* User::setPeer(ENetPeer* peer) {