Thread: time
View Single Post
  #16  
Old 10-12-2005, 11:50 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally Posted by Polo
On Classic we have a 24 hour clock for doing accurate day/night. We use timevar2 on clientside (seconds since they turned thier computer on). To change this into somthing synced for everyone, we calculate the offset to the serverside timevar2 (unix time) when they log in, and then adjust for this before calculating the actual time.

Theoretically, everyone is then getting thier times as unix time, give or take a small error for lag reasons.
So I'm assuming once it's synced, client computers will do the addition of seconds and minutes and etc in a timeout loop? It's not accurate since the calculation will take cpu speed and throw off following loops. Plus, as Spark has said before, having a 24 hour clock will mean that half of your players will always play in the dark while the other half play in the light.


As for excaliber7388's problem, i don't see anything that would cause everyone to have different times. However, setbackpal is very outdated and should no longer be used. Instead, replace with seteffect.
__________________
Reply With Quote