Page 1 of 1

collision.cpp possible clientside bug

Posted: Sun Mar 03, 2019 10:38
by Termos
The problem is the client doesn't seem to notice objects colliding with a stationary player (serverside seems fine). More details here

My silly theory goes:
The first spot one would look for any discrepancies between client and server is in collision.cpp, collisionMoveSimple function near the '#ifndef SERVER'

There are two alternative sections separate for server and client, they look very similar except different functions are used for getting the object list:
ServerEnvironment.getObjectsInsideRadius() and
ClientEnvironment.getActiveObjects()

The server part looks fine as expected, now I couldn't follow the whole execution path for the client version,
but it looks like maybe getActiveObjects does not include the player, hence the discrepancy.


It's been almost two decades since I had to do with c++ so please excuse me if I'm saying nonsense, but if there's something to it would be great if somebody appended the player box there.