Skip to content

Fix overflowing timers

Indra requested to merge fix-timers into master

Some old code using Environment.TickCount seems to overflow by uptime of modern computers using Windows 8+ fast startup. This pull request replaces those timers with appropriate alternatives.

On the server side all code using Environment.TickCount in the server source and standard plugins has been replaced by Environment.TickCount64, this property seems to be missing in the .NET Framework version we're using on the client thus it has been replaced with GetGameTimer() which returns the miliseconds since game started? This might overflow after a game uptime of around 24 days? but this should not be an realistic scenario and the fix would then be restarting game instead of weird pc restart.

This pull request has not been fully tested yet.

Merge request reports