(svn r24282) -Codechange: Add AddVehicleAdviceNewsItem function to preemptively deduplicate code.

This commit is contained in:
frosch
2012-05-26 14:15:52 +00:00
parent c796801c4d
commit 00b3ff80bb
5 changed files with 20 additions and 26 deletions

View File

@@ -3771,11 +3771,7 @@ static bool TrainLocoHandler(Train *v, bool mode)
/* Show message to player. */
if (_settings_client.gui.lost_vehicle_warn && v->owner == _local_company) {
SetDParam(0, v->index);
AddVehicleNewsItem(
STR_NEWS_TRAIN_IS_STUCK,
NS_ADVICE,
v->index
);
AddVehicleAdviceNewsItem(STR_NEWS_TRAIN_IS_STUCK, v->index);
}
v->wait_counter = 0;
}