summaryrefslogtreecommitdiff
path: root/src/autoslope.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-26 14:32:06 +0000
committerrubidium <rubidium@openttd.org>2007-09-26 14:32:06 +0000
commita85e18c92200590c84a6c3d3f60dd41f394cc0fe (patch)
treefe4a4502b7cdb7c0993d026a44660e41794ab4be /src/autoslope.h
parent74556769419976aa048b4a0f465fc4e603656678 (diff)
downloadopenttd-a85e18c92200590c84a6c3d3f60dd41f394cc0fe.tar.xz
(svn r11171) -Fix [FS#1257]: disable autoslope for automatically changed stuff (like towns and industries) and enable it in the scenario editor. Patch by frosch.
Diffstat (limited to 'src/autoslope.h')
-rw-r--r--src/autoslope.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/autoslope.h b/src/autoslope.h
index c6f40eb52..652bce906 100644
--- a/src/autoslope.h
+++ b/src/autoslope.h
@@ -36,7 +36,9 @@ static inline bool AutoslopeCheckForEntranceEdge(TileIndex tile, uint z_new, Slo
*/
static inline bool AutoslopeEnabled()
{
- return (_patches.autoslope && IsValidPlayer(_current_player) && !_is_old_ai_player);
+ return (_patches.autoslope &&
+ ((IsValidPlayer(_current_player) && !_is_old_ai_player) ||
+ (_current_player == OWNER_NONE && _game_mode == GM_EDITOR)));
}
#endif /* AUTOSLOPE_H */