Changeset - r22138:74509e7aabbc
[Not reviewed]
master
0 2 0
frosch - 9 years ago 2015-06-21 09:19:27
frosch@openttd.org
(svn r27311) -Fix: Mark infrastructure window dirty in more cases. (marcole)
2 files changed with 9 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/road_cmd.cpp
Show inline comments
 
@@ -384,7 +384,10 @@ static CommandCost RemoveRoad(TileIndex 
 
					/* Update rail count for level crossings. The plain track should still be accounted
 
					 * for, so only subtract the difference to the level crossing cost. */
 
					c = Company::GetIfValid(GetTileOwner(tile));
 
					if (c != NULL) c->infrastructure.rail[GetRailType(tile)] -= LEVELCROSSING_TRACKBIT_FACTOR - 1;
 
					if (c != NULL) {
 
						c->infrastructure.rail[GetRailType(tile)] -= LEVELCROSSING_TRACKBIT_FACTOR - 1;
 
						DirtyCompanyInfrastructureWindows(c->index);
 
					}
 
				} else {
 
					SetRoadTypes(tile, rts);
 
				}
 
@@ -638,7 +641,10 @@ CommandCost CmdBuildRoad(TileIndex tile,
 
				/* Update rail count for level crossings. The plain track is already
 
				 * counted, so only add the difference to the level crossing cost. */
 
				c = Company::GetIfValid(GetTileOwner(tile));
 
				if (c != NULL) c->infrastructure.rail[GetRailType(tile)] += LEVELCROSSING_TRACKBIT_FACTOR - 1;
 
				if (c != NULL) {
 
					c->infrastructure.rail[GetRailType(tile)] += LEVELCROSSING_TRACKBIT_FACTOR - 1;
 
					DirtyCompanyInfrastructureWindows(c->index);
 
				}
 

	
 
				/* Always add road to the roadtypes (can't draw without it) */
 
				bool reserved = HasBit(GetRailReservationTrackBits(tile), railtrack);
src/station_cmd.cpp
Show inline comments
 
@@ -1957,6 +1957,7 @@ static CommandCost RemoveRoadStop(TileIn
 
			}
 
		}
 
		Company::Get(st->owner)->infrastructure.station--;
 
		DirtyCompanyInfrastructureWindows(st->owner);
 

	
 
		if (IsDriveThroughStopTile(tile)) {
 
			/* Clears the tile for us */
0 comments (0 inline, 0 general)