Fix anticheat resetting client position after the client is teleported
authorEkdohibs <nathanael.courant@laposte.net>
Mon, 30 Jan 2017 06:58:43 +0000 (07:58 +0100)
committerparamat <mat.gregory@virginmedia.com>
Wed, 1 Feb 2017 15:03:57 +0000 (15:03 +0000)
commitd873545ac70331a224967493f9296a854d292dd8
treec503555b9ac782b30dc84ce014437fd4257f5cf4
parent3e355ab7d5ccdcd77f104eee57237828410b85d7
Fix anticheat resetting client position after the client is teleported

Previously, m_move_pool could accomodate the client moving from the new
position to the old one, and the server accepted the client to go back
to its old position. However, it couldn't then accomodate the client
moving from its old to its new position, and therefore would reset position
to the old position. Thus, by emptying m_move_pool after a teleport, the
server no longer accepts the client to go back to its old position. A
drawback is however that a laggy client *will* trigger a few
"moved_too_fast" anticheats before being told about its new position.

Don't report player cheated if caused by lag.

Fixes #5118
src/content_sao.cpp
src/content_sao.h