|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|

01-17-2008, 06:17 AM
|
Accomplished Programmer
|
|
Join Date: Nov 2006
Location: Honolulu, HI
Posts: 91
|
|
To remove the conditional for gottime, just change the code in zone.cpp from:
Code:
void Zone::GetTimeSync()
{
if (worldserver.Connected() && !gottime) {
ServerPacket* pack = new ServerPacket(ServerOP_GetWorldTime, 0);
worldserver.SendPacket(pack);
safe_delete(pack);
}
}
To:
Code:
void Zone::GetTimeSync()
{
if (worldserver.Connected()) {
ServerPacket* pack = new ServerPacket(ServerOP_GetWorldTime, 0);
worldserver.SendPacket(pack);
safe_delete(pack);
}
}
But again, I don't have time to test to see if that causes an egregious amount of time sync'ing or other issues.
|

02-02-2008, 07:09 AM
|
Accomplished Programmer
|
|
Join Date: Nov 2006
Location: Honolulu, HI
Posts: 91
|
|
I've been running the above change (removing the !gottime conditional) since this was posted, except with the addition that I wrote an entry to the log every time that it was used. So, I can now verify that this doesn't cause an inordinate amount of time synchronization and, indeed, keeps all of my dynamic zones in sync with time.
|

02-02-2008, 07:32 AM
|
 |
The PEQ Dude
|
|
Join Date: Apr 2003
Location: -
Posts: 1,988
|
|
I didn't even see that snippet, I'll have to try it out on TGC next time I patch. I know the rest of your submissions are in the official code, but I have yet to find time to play. :(
|

06-27-2008, 08:53 AM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
Quote:
Originally Posted by Knightly
To remove the conditional for gottime, just change the code in zone.cpp from:
Code:
void Zone::GetTimeSync()
{
if (worldserver.Connected() && !gottime) {
ServerPacket* pack = new ServerPacket(ServerOP_GetWorldTime, 0);
worldserver.SendPacket(pack);
safe_delete(pack);
}
}
To:
Code:
void Zone::GetTimeSync()
{
if (worldserver.Connected()) {
ServerPacket* pack = new ServerPacket(ServerOP_GetWorldTime, 0);
worldserver.SendPacket(pack);
safe_delete(pack);
}
}
But again, I don't have time to test to see if that causes an egregious amount of time sync'ing or other issues.
|
This change never went into the source, did I miss something - or it just got forgotten?
|

06-27-2008, 09:16 AM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
It may be the case that the problem described by Knightly is due to the
fact that 'gottime' is not initialised in the zone constructor and therefore
has a random value each time a zone is booted up.
In zone/zone.cpp, Zone::Zone(int32 in_zoneid, const char* in_short_name)
Around line 700:
After:
Code:
aas = NULL;
totalAAs = 0;
Add:
I can't test this, but I'm bored at work and just had a quick look at the code 
|

06-27-2008, 01:15 PM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
I just got back, saw your post. Before i tested , i pulled all "settime" scripts ;
Here's a summary of what happened:
With Knightlys gottime-removal fix, all dynamic zones start at 8pm, then continue to count normally ; all static zones start at 8am.
With Derisions gottime = false; fix, all dynamic zones start at 2:00pm, and continue normally.
so with one they stay 12 hours apart (dynamic vs static) and the other 6.
I stood around a while checked a lot of zones, and times remain stable, but with the mentioned time difference.
|

06-27-2008, 01:58 PM
|
Demi-God
|
|
Join Date: May 2007
Posts: 1,032
|
|
can't some sort of GLOBAL server side timer be build INTO server code istelf?
which will start when server itself is started (regardless if any zones have been booted or not) and then ALL zone will read time from that timer
in other words, tie timer to SERVER itself not to any zone in specific
OR as a cheap solution- make zones read time of current PC time and convert into EQ
since eq day is what 2 hours? then 11.30 am will be 6pm game time
|

06-27-2008, 02:38 PM
|
Developer
|
|
Join Date: Feb 2004
Location: UK
Posts: 1,540
|
|
I've been looking at this some more. It appears that when a static zone
loads, it makes the call to GetTimeSync before it is actually connected
to the world server, hence the check for worldserver.connected fails.
Angelox, try this. In zone/worldserver.cpp void WorldServer::OnConnected():
Around line 124, After:
Code:
if (ZoneLoaded) {
this->SetZone(zone->GetZoneID());
entity_list.UpdateWho(true);
this->SendEmoteMessage(0, 0, 15, "Zone connect: %s", zone->GetLongName());
Add:
Code:
zone->GetTimeSync();
So the whole section of code reads:
Code:
if (ZoneLoaded) {
this->SetZone(zone->GetZoneID());
entity_list.UpdateWho(true);
this->SendEmoteMessage(0, 0, 15, "Zone connect: %s", zone->GetLongName());
zone->GetTimeSync();
} else {
this->SetZone(0);
}
I started and stopped my server a couple of times and the time in my 5 dynamic and 1 static were now in sync.
This is purely experimental code 
|

06-27-2008, 02:56 PM
|
AX Classic Developer
|
|
Join Date: May 2006
Location: filler
Posts: 2,049
|
|
what about gottime? should I leave as original, Knightly, or your change?
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 08:55 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |