What I am asking is for a way to reject client position updates coming from server.
This is to make a local client simulation for an entity that is not disrupted by server updates but still is synced in other ways as it should be.
A small code example is below. This will go into the object class.
This first example is the default behaviour for all objects.
/* /* @param position is the current position of the entity on the server @return the position */ vector OnPositionUpdate( vector position ) { return position; }
This next example is one of the potential use cases of this system where it checks the distance between the client position and the server position and if the distance is less than a certain amount the position stays the same.
/* @param position is the current position of the entity on the server @return the position */ vector OnPositionUpdate( vector position ) { if ( vector.Distance( GetPosition(), position ) > 0.5 ) return position; return GetPosition(); }
This should have no effect on the velocity and other physics information. If it does, please enquire with myself and @Arkensor on other alternatives.