PDA

View Full Version : Yendor and Spawnlogging / EQTime patch



Ratt
02-01-2002, 02:25 PM
Yendor,

Can you go over your thinking on the additions to util.cpp/.h in your last patch?

Floyd and I were going over the EQtime bit you put in and can't figure out where you got the epoch value to begin with. On further exploration, server times are different on various servers, indicating that EQTime is NOT computed from any sort of RTC.

Additionally, it's highly likely EQtime stops when the servers go down, though I haven't tested this (and would be problematical to test).

If you could elaborate on what you know about EQTime, it would be good ;)

Yendor
02-01-2002, 07:00 PM
Don't worry about it. The epoch is reset when a timeofDay packet comes in to resync it. I tossed in a default value for kicks (hasn't varied from that value for me yet, but I wasn't sure how constant it was across servers or patches... if it's not consistent then the default can be 0... just means you don't have a valid time in logs until you get a timeOfDay packet... which shouldn't be a problem).

Yendor
02-01-2002, 07:04 PM
Sorry its not commented more. It made my head hurt when I wrote it in pearl originally, and this is just a direct translation of that :)

Ratt
02-01-2002, 07:24 PM
I realise that, but I'd like to know more about what you know of EQTime, disbarring getting it directly from the struct ...

How did you arrive at the value you have there in there?

Yendor
02-01-2002, 07:41 PM
I just defined the EQ Epoch as being Jan 1, 3000

I take the time of day packet and compute when the above date occured in real time. I store that result as the EQ epoch.

Then I can do all my time management with single values.

Well it seemed like a good idea at the time.

Anyway the default value I put in for the epoch is the value that I get every time I zone when it recomputes it. It should be accurate to within about 3 seconds on my server at least (1 eq minute = 3 seconds). But there is some dependancy on how seq dispatches the packets that can introduce delay... rapid zoning in particular can delay things enough for there to be some error... but its not particular significant. I suspect the epoch will be different per server, not sure if it will change on server restart or not, only time will tell. The default value is pretty meaningless since it gets replaced rather quickly. Its only *slightly* useful in that it provides a valid time if you happen to start seq while already running EQ. But since its different per server I guess it won't work out.

The end result is the same as the time functions that are present in packet.cpp. (which is where I took all the info from).