PDA

View Full Version : timevar2 (serverside)


cbk1994
03-24-2009, 09:55 PM
It seems totally random, it's off by about 30 minutes from what it should (assuming it is supposed to match with Unix epoch time, which it is).

It also seems to go back and forth from time to time

WhiteDragon
03-24-2009, 11:18 PM
It's because it sometimes gets off when the server lags or is down.

And it can't update regularly because a lot of scripts are based off of timevar2 and therefore if it changed any other way besides 1 per second it would glitch a lot of scripts up.

At least that's the explanation Stefan gave to me when I asked him awhile back.

cbk1994
03-25-2009, 12:08 AM
It's because it sometimes gets off when the server lags or is down.

And it can't update regularly because a lot of scripts are based off of timevar2 and therefore if it changed any other way besides 1 per second it would glitch a lot of scripts up.

At least that's the explanation Stefan gave to me when I asked him awhile back.

It's supposed to be the number of seconds since January 1st, 1970. There is no reason that it shouldn't increase/decrease on server start to the correct value. If it doesn't do so, it will produce an incorrect time, which could be bad.

I also don't really see how changing it to the correct time would glitch scripts. Seems like scripts would glitch a lot more if they thought it was time 'x', then it later became time 'x' minus a few minutes.