Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,175 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
get server time on client #279815
07/19/09 13:10
07/19/09 13:10
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
Hello conitec,
(how) is it possible to access the server time on the client sent by the command SVC_TIME in lite-c?

and in which format is the time stored?

Thank you
Scorpion

Re: get server time on client [Re: Scorpion] #279969
07/20/09 09:22
07/20/09 09:22
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
The SVC_TIME content is internally used, and not directly accessible through a lite-C variable.

Re: get server time on client [Re: jcl] #279981
07/20/09 10:48
07/20/09 10:48
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
It would really come in handy for me to use it, because so I wouldn't have to send my own time information over the network and cause unneeded traffic.
If I correctly understood it, the network messages go through the same event handler as normal window-messages, so i can get it by an own message handler ScanMessage()?

Re: get server time on client [Re: Scorpion] #279994
07/20/09 12:56
07/20/09 12:56
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
No, the network messages go through a different message handler. SVC_TIME does not send a real time, it sends a clock value for dead reckoning. What for do you need the server time? If it's for the time of the day or the time of the game, you need to send it through a variable.

Re: get server time on client [Re: jcl] #280098
07/20/09 23:15
07/20/09 23:15
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
I would need it for dead reckoning (which is not controlled by the entitys position, angle, etc, but by the keyboard inputs of the client), too, to correct moves in the past.
Then I'll try to send some kind of time offset from gamestart or something similar to control it. shouldn't probably not make such a great difference in traffic (and as a mp-newbie i probably waste enough of it in other parts of my code)

Re: get server time on client [Re: Scorpion] #280153
07/21/09 07:05
07/21/09 07:05
Joined: Jul 2000
Posts: 28,022
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,022
Frankfurt
Ok, we'll then implement a variable for this.

Re: get server time on client [Re: jcl] #280264
07/21/09 20:58
07/21/09 20:58
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
Thanks =D


Moderated by  old_bill, Tobias 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1