Changeset - r18544:f85050db80c8
[Not reviewed]
master
0 1 0
truebrain - 13 years ago 2011-12-02 23:40:24
truebrain@openttd.org
(svn r23398) -Fix: the AIEvent.ET_COMPANY_NEW was only triggered if a company named itself, which seems like a very odd place to do so. Trigger it when the company is created instead
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/company_cmd.cpp
Show inline comments
 
@@ -375,7 +375,6 @@ set_name:;
 
			SetDParam(3, t->index);
 
			AddNewsItem(STR_MESSAGE_NEWS_FORMAT, NS_COMPANY_NEW, NR_TILE, c->last_build_coordinate, NR_NONE, UINT32_MAX, cni);
 
		}
 
		AI::BroadcastNewEvent(new ScriptEventCompanyNew(c->index), c->index);
 
		return;
 
	}
 
bad_town_name:;
 
@@ -563,6 +562,8 @@ Company *DoStartupNewCompany(bool is_ai,
 

	
 
	if (is_ai && (!_networking || _network_server)) AI::StartNew(c->index);
 

	
 
	AI::BroadcastNewEvent(new ScriptEventCompanyNew(c->index), c->index);
 

	
 
	return c;
 
}
 

	
0 comments (0 inline, 0 general)