Debug: Extend random debug logging to also include state checksum updates
This commit is contained in:
@@ -3326,6 +3326,7 @@ static Track ChooseTrainTrack(Train *v, TileIndex tile, DiagDirection enterdir,
|
||||
TileIndex new_tile = res_dest.tile;
|
||||
|
||||
Track next_track = DoTrainPathfind(v, new_tile, dest_enterdir, tracks, path_found, do_track_reservation, &res_dest);
|
||||
DEBUG_UPDATESTATECHECKSUM("ChooseTrainTrack: v: %u, path_found: %d, next_track: %d", v->index, path_found, next_track);
|
||||
UpdateStateChecksum((((uint64) v->index) << 32) | (path_found << 16) | next_track);
|
||||
if (new_tile == tile) best_track = next_track;
|
||||
v->HandlePathfindingResult(path_found);
|
||||
@@ -5220,7 +5221,8 @@ Money Train::GetRunningCost() const
|
||||
*/
|
||||
bool Train::Tick()
|
||||
{
|
||||
UpdateStateChecksum((((uint64) this->x_pos) << 32) | (this->y_pos << 16) | this->track );
|
||||
DEBUG_UPDATESTATECHECKSUM("Train::Tick: v: %u, x: %d, y: %d, track: %d", this->index, this->x_pos, this->y_pos, this->track);
|
||||
UpdateStateChecksum((((uint64) this->x_pos) << 32) | (this->y_pos << 16) | this->track);
|
||||
if (this->IsFrontEngine()) {
|
||||
if (!((this->vehstatus & VS_STOPPED) || this->IsWaitingInDepot()) || this->cur_speed > 0) this->running_ticks++;
|
||||
|
||||
|
Reference in New Issue
Block a user