Adjust desync log format and add company events to log
This commit is contained in:
@@ -874,6 +874,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
}
|
||||
|
||||
NetworkServerNewCompany(c, ci);
|
||||
DEBUG(desync, 1, "new_company: date{%08x; %02x; %02x}, company_id: %u", _date, _date_fract, _tick_skip_counter, c->index);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -882,7 +883,10 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
|
||||
if (company_id != INVALID_COMPANY && (company_id >= MAX_COMPANIES || Company::IsValidID(company_id))) return CMD_ERROR;
|
||||
Company *c = DoStartupNewCompany(true, company_id);
|
||||
if (c != nullptr) NetworkServerNewCompany(c, nullptr);
|
||||
if (c != nullptr) {
|
||||
NetworkServerNewCompany(c, nullptr);
|
||||
DEBUG(desync, 1, "new_company_ai: date{%08x; %02x; %02x}, company_id: %u", _date, _date_fract, _tick_skip_counter, c->index);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -895,6 +899,8 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
|
||||
if (!(flags & DC_EXEC)) return CommandCost();
|
||||
|
||||
DEBUG(desync, 1, "delete_company: date{%08x; %02x; %02x}, company_id: %u, reason: %u", _date, _date_fract, _tick_skip_counter, company_id, reason);
|
||||
|
||||
/* Delete any open window of the company */
|
||||
DeleteCompanyWindows(c->index);
|
||||
CompanyNewsInformation *cni = MallocT<CompanyNewsInformation>(1);
|
||||
|
Reference in New Issue
Block a user