diff --git a/src/network/network.cpp b/src/network/network.cpp index 2b0a79ba16..f97a6c47b0 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -1210,7 +1210,8 @@ void NetworkGameLoop() assert(ret == 4); check_sync_state = true; } else if (strncmp(p, "msg: ", 5) == 0 || strncmp(p, "client: ", 8) == 0 || - strncmp(p, "load: ", 6) == 0 || strncmp(p, "save: ", 6) == 0) { + strncmp(p, "load: ", 6) == 0 || strncmp(p, "save: ", 6) == 0 || + strncmp(p, "warning: ", 9) == 0) { /* A message that is not very important to the log playback, but part of the log. */ #ifndef DEBUG_FAILED_DUMP_COMMANDS } else if (strncmp(p, "cmdf: ", 6) == 0) { diff --git a/src/newgrf_storage.cpp b/src/newgrf_storage.cpp index b071c3c743..ff309a66df 100644 --- a/src/newgrf_storage.cpp +++ b/src/newgrf_storage.cpp @@ -91,7 +91,7 @@ void AddChangedPersistentStorage(BasePersistentStorageArray *storage) /* Discard all temporary changes */ for (auto &it : *_changed_storage_arrays) { - Debug(desync, 1, "Discarding persistent storage changes: Feature {}, GrfID {:08X}, Tile {}", it->feature, BSWAP32(it->grfid), it->tile); + Debug(desync, 2, "warning: discarding persistent storage changes: Feature {}, GrfID {:08X}, Tile {}", it->feature, BSWAP32(it->grfid), it->tile); it->ClearChanges(); } _changed_storage_arrays->clear(); diff --git a/src/openttd.cpp b/src/openttd.cpp index 4314f5a97d..fc6e60c4b1 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1248,7 +1248,7 @@ static void CheckCaches() uint i = 0; for (Town *t : Town::Iterate()) { if (MemCmpT(old_town_caches.data() + i, &t->cache) != 0) { - Debug(desync, 2, "town cache mismatch: town {}", t->index); + Debug(desync, 2, "warning: town cache mismatch: town {}", t->index); } i++; } @@ -1262,7 +1262,7 @@ static void CheckCaches() i = 0; for (const Company *c : Company::Iterate()) { if (MemCmpT(old_infrastructure.data() + i, &c->infrastructure) != 0) { - Debug(desync, 2, "infrastructure cache mismatch: company {}", c->index); + Debug(desync, 2, "warning: infrastructure cache mismatch: company {}", c->index); } i++; } @@ -1318,23 +1318,23 @@ static void CheckCaches() for (const Vehicle *u = v; u != nullptr; u = u->Next()) { FillNewGRFVehicleCache(u); if (memcmp(&grf_cache[length], &u->grf_cache, sizeof(NewGRFCache)) != 0) { - Debug(desync, 2, "newgrf cache mismatch: type {}, vehicle {}, company {}, unit number {}, wagon {}", v->type, v->index, v->owner, v->unitnumber, length); + Debug(desync, 2, "warning: newgrf cache mismatch: type {}, vehicle {}, company {}, unit number {}, wagon {}", v->type, v->index, v->owner, v->unitnumber, length); } if (memcmp(&veh_cache[length], &u->vcache, sizeof(VehicleCache)) != 0) { - Debug(desync, 2, "vehicle cache mismatch: type {}, vehicle {}, company {}, unit number {}, wagon {}", v->type, v->index, v->owner, v->unitnumber, length); + Debug(desync, 2, "warning: vehicle cache mismatch: type {}, vehicle {}, company {}, unit number {}, wagon {}", v->type, v->index, v->owner, v->unitnumber, length); } switch (u->type) { case VEH_TRAIN: if (memcmp(&gro_cache[length], &Train::From(u)->gcache, sizeof(GroundVehicleCache)) != 0) { - Debug(desync, 2, "train ground vehicle cache mismatch: vehicle {}, company {}, unit number {}, wagon {}", v->index, v->owner, v->unitnumber, length); + Debug(desync, 2, "warning: train ground vehicle cache mismatch: vehicle {}, company {}, unit number {}, wagon {}", v->index, v->owner, v->unitnumber, length); } if (memcmp(&tra_cache[length], &Train::From(u)->tcache, sizeof(TrainCache)) != 0) { - Debug(desync, 2, "train cache mismatch: vehicle {}, company {}, unit number {}, wagon {}", v->index, v->owner, v->unitnumber, length); + Debug(desync, 2, "warning: train cache mismatch: vehicle {}, company {}, unit number {}, wagon {}", v->index, v->owner, v->unitnumber, length); } break; case VEH_ROAD: if (memcmp(&gro_cache[length], &RoadVehicle::From(u)->gcache, sizeof(GroundVehicleCache)) != 0) { - Debug(desync, 2, "road vehicle ground vehicle cache mismatch: vehicle {}, company {}, unit number {}, wagon {}", v->index, v->owner, v->unitnumber, length); + Debug(desync, 2, "warning: road vehicle ground vehicle cache mismatch: vehicle {}, company {}, unit number {}, wagon {}", v->index, v->owner, v->unitnumber, length); } break; default: @@ -1384,11 +1384,11 @@ static void CheckCaches() } UpdateStationDockingTiles(st); if (ta.tile != st->docking_station.tile || ta.w != st->docking_station.w || ta.h != st->docking_station.h) { - Debug(desync, 2, "station docking mismatch: station {}, company {}", st->index, st->owner); + Debug(desync, 2, "warning: station docking mismatch: station {}, company {}", st->index, st->owner); } for (TileIndex tile : ta) { if (docking_tiles[tile] != IsDockingTile(tile)) { - Debug(desync, 2, "docking tile mismatch: tile {}", tile); + Debug(desync, 2, "warning: docking tile mismatch: tile {}", tile); } } } @@ -1399,7 +1399,7 @@ static void CheckCaches() i = 0; for (Station *st : Station::Iterate()) { if (st->industries_near != old_station_industries_near[i]) { - Debug(desync, 2, "station industries near mismatch: station {}", st->index); + Debug(desync, 2, "warning: station industries near mismatch: station {}", st->index); } i++; } @@ -1408,14 +1408,14 @@ static void CheckCaches() i = 0; for (Town *t : Town::Iterate()) { if (t->stations_near != old_town_stations_near[i]) { - Debug(desync, 2, "town stations near mismatch: town {}", t->index); + Debug(desync, 2, "warning: town stations near mismatch: town {}", t->index); } i++; } i = 0; for (Industry *ind : Industry::Iterate()) { if (ind->stations_near != old_industry_stations_near[i]) { - Debug(desync, 2, "industry stations near mismatch: industry {}", ind->index); + Debug(desync, 2, "warning: industry stations near mismatch: industry {}", ind->index); } i++; } diff --git a/src/pathfinder/yapf/yapf_rail.cpp b/src/pathfinder/yapf/yapf_rail.cpp index e024cee323..9580086799 100644 --- a/src/pathfinder/yapf/yapf_rail.cpp +++ b/src/pathfinder/yapf/yapf_rail.cpp @@ -241,7 +241,7 @@ public: pf2.DisableCache(true); FindDepotData result2 = pf2.FindNearestDepotTwoWay(v, t1, td1, t2, td2, max_penalty, reverse_penalty); if (result1.tile != result2.tile || (result1.reverse != result2.reverse)) { - Debug(desync, 2, "CACHE ERROR: FindNearestDepotTwoWay() = [{}, {}]", + Debug(desync, 2, "warning: FindNearestDepotTwoWay cache mismatch: {} vs {}", result1.tile != INVALID_TILE ? "T" : "F", result2.tile != INVALID_TILE ? "T" : "F"); DumpState(pf1, pf2); @@ -325,7 +325,7 @@ public: pf2.DisableCache(true); result1 = pf2.FindNearestSafeTile(v, t1, td, override_railtype, false); if (result1 != result2) { - Debug(desync, 2, "CACHE ERROR: FindSafeTile() = [{}, {}]", result2 ? "T" : "F", result1 ? "T" : "F"); + Debug(desync, 2, "warning: FindSafeTile cache mismatch: {} vs {}", result2 ? "T" : "F", result1 ? "T" : "F"); DumpState(pf1, pf2); } } @@ -409,7 +409,7 @@ public: pf2.DisableCache(true); Trackdir result2 = pf2.ChooseRailTrack(v, tile, enterdir, tracks, path_found, reserve_track, target, dest); if (result1 != result2) { - Debug(desync, 2, "CACHE ERROR: ChooseRailTrack() = [{}, {}]", result1, result2); + Debug(desync, 2, "warning: ChooseRailTrack cache mismatch: {} vs {}", result1, result2); DumpState(pf1, pf2); } } @@ -476,7 +476,7 @@ public: pf2.DisableCache(true); bool result2 = pf2.CheckReverseTrain(v, t1, td1, t2, td2, reverse_penalty); if (result1 != result2) { - Debug(desync, 2, "CACHE ERROR: CheckReverseTrain() = [{}, {}]", result1 ? "T" : "F", result2 ? "T" : "F"); + Debug(desync, 2, "warning: CheckReverseTrain cache mismatch: {} vs {}", result1 ? "T" : "F", result2 ? "T" : "F"); DumpState(pf1, pf2); } }