mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-06 21:03:44 +00:00
feat(master): outdated instances take nobody new and stop once empty
Instances on an old binary or old zone files are marked outdated: routing, private passwords and merges skip them. Outdated properties remind their players every 10 minutes that an update is waiting (ANNOUNCE) and stop once empty. A new instance of the same property waits for the old one to be gone before its world server starts, so two worlds never save one property. The server list carries the flag after the endpoints (read when present). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -158,6 +158,7 @@ namespace {
|
||||
entry.isPrivate = inst->GetIsPrivate() ? 1 : 0;
|
||||
entry.state = inst->GetIsShuttingDown() ? eState::STOPPING : !inst->GetIsReady() ? eState::STARTING :
|
||||
inst->GetIsDraining() ? eState::DRAINING : eState::READY;
|
||||
entry.outdated = inst->GetIsOutdated() ? 1 : 0;
|
||||
auto& endpoint = response.endpoints.emplace_back();
|
||||
endpoint.type = ServiceType::WORLD;
|
||||
endpoint.zoneID = entry.mapID;
|
||||
@@ -632,6 +633,8 @@ int main(int argc, char** argv) {
|
||||
LiveUpdateCoordinator::Update();
|
||||
CDClientReloader::Update();
|
||||
WorldReloader::Update();
|
||||
// Instances on an old binary or old zone files: reminders on properties, and stopping empty ones
|
||||
Game::im->UpdateOutdatedInstances();
|
||||
CheckPlayerActionTimeouts();
|
||||
|
||||
// Spare instances for busy zones (zone_limits), checked every few seconds
|
||||
|
||||
Reference in New Issue
Block a user