forked from mirror/OpenTTD
(svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror().
This commit is contained in:
@@ -1603,7 +1603,7 @@ bool GenerateTowns()
|
||||
if (num == 0 && CreateRandomTown(10000, TSM_RANDOM, 0) == NULL) {
|
||||
if (GetNumTowns() == 0) {
|
||||
/* XXX - can we handle that more gracefully? */
|
||||
if (_game_mode != GM_EDITOR) error("Could not generate any town");
|
||||
if (_game_mode != GM_EDITOR) usererror("Could not generate any town");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user