diff src/autoslope.h @ 7640:206d9b6e13fc draft

(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.
author rubidium <rubidium@openttd.org>
date Wed, 26 Sep 2007 14:32:06 +0000
parents 9eb4198ab848
children 165064de4629
line wrap: on
line diff
--- a/src/autoslope.h
+++ b/src/autoslope.h
@@ -36,7 +36,9 @@
  */
 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 */