Game Development Community

Difference in AdvanceServerTime vs AdvanceClientTime

by William Todd Scott · in Torque Game Engine Advanced · 11/04/2007 (2:02 pm) · 0 replies

Hi all,

I came across the following difference in how ProcessList::AdvanceServerTime and ProcessList::AdvanceClientTime operate and I am hoping that someone can explain the reason for the difference.

In AdvanceServerTime we have the following:

SimTime targetTick = targetTime & ~TickMask;

which, I believe, sets targetTick to the number of ticks that have passed, rounded down.


In AdvanceClientTime we have the following:

SimTime targetTick = (targetTime + TickMask) & ~TickMask;

which, I believe, sets the targetTick to the number of ticks that have passed, rounded up.

Why aren't we doing the same thing on both the client and the server?

Thanks
Todd

edited for typos