changeset 15021:69d2f575deb7 draft

(svn r19636) -Fix: desync when taking over companies
author rubidium <rubidium@openttd.org>
date Wed, 14 Apr 2010 20:26:34 +0000
parents a864a5a396ed
children d6237ac69342
files src/company_cmd.cpp
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -595,14 +595,11 @@
 
 	SetBit(c->bankrupt_asked, best->index);
 
-	if (IsInteractiveCompany(best->index)) {
-		c->bankrupt_timeout = TAKE_OVER_TIMEOUT;
-		ShowBuyCompanyDialog(c->index);
-		return;
-	}
-
+	c->bankrupt_timeout = TAKE_OVER_TIMEOUT;
 	if (best->is_ai) {
 		AI::NewEvent(best->index, new AIEventCompanyAskMerger(c->index, ClampToI32(c->bankrupt_value)));
+	} else if (IsInteractiveCompany(best->index)) {
+		ShowBuyCompanyDialog(c->index);
 	}
 }