Debug: Extend random debug logging to also include state checksum updates
This commit is contained in:
@@ -1259,6 +1259,7 @@ static Trackdir RoadFindPathToDest(RoadVehicle *v, TileIndex tile, DiagDirection
|
||||
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
DEBUG_UPDATESTATECHECKSUM("RoadFindPathToDest: v: %u, path_found: %d, best_track: %d", v->index, path_found, best_track);
|
||||
UpdateStateChecksum((((uint64) v->index) << 32) | (path_found << 16) | best_track);
|
||||
v->HandlePathfindingResult(path_found);
|
||||
|
||||
@@ -2116,7 +2117,9 @@ Money RoadVehicle::GetRunningCost() const
|
||||
|
||||
bool RoadVehicle::Tick()
|
||||
{
|
||||
DEBUG_UPDATESTATECHECKSUM("RoadVehicle::Tick 1: v: %u, x: %d, y: %d", this->index, this->x_pos, this->y_pos);
|
||||
UpdateStateChecksum((((uint64) this->x_pos) << 32) | this->y_pos);
|
||||
DEBUG_UPDATESTATECHECKSUM("RoadVehicle::Tick 2: v: %u, state: %d, frame: %d", this->index, this->state, this->frame);
|
||||
UpdateStateChecksum((((uint64) this->state) << 32) | this->frame);
|
||||
if (this->IsFrontEngine()) {
|
||||
if (!(this->IsRoadVehicleStopped() || this->IsWaitingInDepot())) this->running_ticks++;
|
||||
|
Reference in New Issue
Block a user