mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 07:29:44 +00:00
(svn r12000) -Fix (r11926): If no river NewGRF is loaded, use sloped water from locks.
This commit is contained in:
parent
a1b98cda59
commit
abc6e70447
@ -532,7 +532,13 @@ static void DrawRiverWater(const TileInfo *ti)
|
|||||||
if (ti->tileh != SLOPE_FLAT) {
|
if (ti->tileh != SLOPE_FLAT) {
|
||||||
image = GetCanalSprite(CF_RIVER_SLOPE, ti->tile);
|
image = GetCanalSprite(CF_RIVER_SLOPE, ti->tile);
|
||||||
if (image == 0) {
|
if (image == 0) {
|
||||||
image = SPR_FLAT_WATER_TILE;
|
switch (ti->tileh) {
|
||||||
|
case SLOPE_NW: image = SPR_WATER_SLOPE_Y_DOWN; break;
|
||||||
|
case SLOPE_SW: image = SPR_WATER_SLOPE_X_UP; break;
|
||||||
|
case SLOPE_SE: image = SPR_WATER_SLOPE_Y_UP; break;
|
||||||
|
case SLOPE_NE: image = SPR_WATER_SLOPE_X_DOWN; break;
|
||||||
|
default: image = SPR_FLAT_WATER_TILE; break;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (ti->tileh) {
|
switch (ti->tileh) {
|
||||||
default: NOT_REACHED();
|
default: NOT_REACHED();
|
||||||
@ -546,9 +552,8 @@ static void DrawRiverWater(const TileInfo *ti)
|
|||||||
|
|
||||||
DrawGroundSprite(image, PAL_NONE);
|
DrawGroundSprite(image, PAL_NONE);
|
||||||
|
|
||||||
/* Draw canal dikes if there are no river edges to draw. */
|
/* Draw river edges if available. */
|
||||||
if (edges_base <= 48) edges_base = SPR_CANAL_DIKES_BASE;
|
if (edges_base > 48) DrawWaterEdges(edges_base, ti->tile);
|
||||||
DrawWaterEdges(edges_base, ti->tile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawShoreTile(Slope tileh)
|
void DrawShoreTile(Slope tileh)
|
||||||
|
Loading…
Reference in New Issue
Block a user