(svn r7129) -Codechange: Get rid of a global variable that only sets a window's number.

This commit is contained in:
Darkvater
2006-11-11 09:47:44 +00:00
parent d50f6c8a8c
commit 21db9ebb8e
9 changed files with 19 additions and 31 deletions

View File

@@ -649,16 +649,13 @@ void ShowOrdersWindow(const Vehicle *v)
DeleteWindowById(WC_VEHICLE_ORDERS, veh);
DeleteWindowById(WC_VEHICLE_DETAILS, veh);
_alloc_wnd_parent_num = veh;
if (v->owner != _local_player) {
w = AllocateWindowDesc(&_other_orders_desc);
w = AllocateWindowDescFront(&_other_orders_desc, veh);
} else {
w = AllocateWindowDesc((v->type == VEH_Train) ? &_orders_train_desc : &_orders_desc);
w = AllocateWindowDescFront((v->type == VEH_Train) ? &_orders_train_desc : &_orders_desc, veh);
}
if (w != NULL) {
w->window_number = veh;
w->caption_color = v->owner;
w->vscroll.cap = 6;
w->resize.step_height = 10;