(svn r6181) -Fix r6161: The list of vehicles using a certain station got a bit of display code mixed up with the list of vehicles with shared orders (nycom)
This commit is contained in:
		| @@ -1009,13 +1009,17 @@ static const Widget _other_player_aircraft_widgets[] = { | |||||||
|  |  | ||||||
| static void PlayerAircraftWndProc(Window *w, WindowEvent *e) | static void PlayerAircraftWndProc(Window *w, WindowEvent *e) | ||||||
| { | { | ||||||
| 	OrderID order = GB(w->window_number, 16, 16); | 	OrderID order = INVALID_ORDER; | ||||||
| 	/* Sorting a shared order list relies on station being set to INVALID_STATION */ | 	StationID station = INVALID_STATION; | ||||||
| 	/* If station is not INVALID_STATION, then order is never used and we don't care what it contains */ |  | ||||||
| 	StationID station = (w->window_number & SHARE_FLAG) ? INVALID_STATION : order; |  | ||||||
| 	PlayerID owner = GB(w->window_number, 0, 8); | 	PlayerID owner = GB(w->window_number, 0, 8); | ||||||
| 	vehiclelist_d *vl = &WP(w, vehiclelist_d); | 	vehiclelist_d *vl = &WP(w, vehiclelist_d); | ||||||
|  |  | ||||||
|  | 	if (w->window_number & SHARE_FLAG) { | ||||||
|  | 		order = GB(w->window_number, 16, 16); | ||||||
|  | 	} else { | ||||||
|  | 		station = GB(w->window_number, 16, 16); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	switch (e->event) { | 	switch (e->event) { | ||||||
| 	case WE_PAINT: { | 	case WE_PAINT: { | ||||||
| 		int x = 2; | 		int x = 2; | ||||||
|   | |||||||
| @@ -947,13 +947,17 @@ static const Widget _other_player_roadveh_widgets[] = { | |||||||
|  |  | ||||||
| static void PlayerRoadVehWndProc(Window *w, WindowEvent *e) | static void PlayerRoadVehWndProc(Window *w, WindowEvent *e) | ||||||
| { | { | ||||||
| 	OrderID order = GB(w->window_number, 16, 16); | 	OrderID order = INVALID_ORDER; | ||||||
| 	/* Sorting a shared order list relies on station being set to INVALID_STATION */ | 	StationID station = INVALID_STATION; | ||||||
| 	/* If station is not INVALID_STATION, then order is never used and we don't care what it contains */ |  | ||||||
| 	StationID station = (w->window_number & SHARE_FLAG) ? INVALID_STATION : order; |  | ||||||
| 	PlayerID owner = GB(w->window_number, 0, 8); | 	PlayerID owner = GB(w->window_number, 0, 8); | ||||||
| 	vehiclelist_d *vl = &WP(w, vehiclelist_d); | 	vehiclelist_d *vl = &WP(w, vehiclelist_d); | ||||||
|  |  | ||||||
|  | 	if (w->window_number & SHARE_FLAG) { | ||||||
|  | 		order = GB(w->window_number, 16, 16); | ||||||
|  | 	} else { | ||||||
|  | 		station = GB(w->window_number, 16, 16); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	switch (e->event) { | 	switch (e->event) { | ||||||
| 	case WE_PAINT: { | 	case WE_PAINT: { | ||||||
| 		int x = 2; | 		int x = 2; | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								ship_gui.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								ship_gui.c
									
									
									
									
									
								
							| @@ -956,13 +956,17 @@ static const Widget _other_player_ships_widgets[] = { | |||||||
|  |  | ||||||
| static void PlayerShipsWndProc(Window *w, WindowEvent *e) | static void PlayerShipsWndProc(Window *w, WindowEvent *e) | ||||||
| { | { | ||||||
| 	OrderID order = GB(w->window_number, 16, 16); | 	OrderID order = INVALID_ORDER; | ||||||
| 	/* Sorting a shared order list relies on station being set to INVALID_STATION */ | 	StationID station = INVALID_STATION; | ||||||
| 	/* If station is not INVALID_STATION, then order is never used and we don't care what it contains */ |  | ||||||
| 	StationID station = (w->window_number & SHARE_FLAG) ? INVALID_STATION : order; |  | ||||||
| 	PlayerID owner = GB(w->window_number, 0, 8); | 	PlayerID owner = GB(w->window_number, 0, 8); | ||||||
| 	vehiclelist_d *vl = &WP(w, vehiclelist_d); | 	vehiclelist_d *vl = &WP(w, vehiclelist_d); | ||||||
|  |  | ||||||
|  | 	if (w->window_number & SHARE_FLAG) { | ||||||
|  | 		order = GB(w->window_number, 16, 16); | ||||||
|  | 	} else { | ||||||
|  | 		station = GB(w->window_number, 16, 16); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	switch (e->event) { | 	switch (e->event) { | ||||||
| 	case WE_PAINT: { | 	case WE_PAINT: { | ||||||
| 		int x = 2; | 		int x = 2; | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								train_gui.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								train_gui.c
									
									
									
									
									
								
							| @@ -1406,13 +1406,17 @@ static const Widget _other_player_trains_widgets[] = { | |||||||
|  |  | ||||||
| static void PlayerTrainsWndProc(Window *w, WindowEvent *e) | static void PlayerTrainsWndProc(Window *w, WindowEvent *e) | ||||||
| { | { | ||||||
| 	OrderID order = GB(w->window_number, 16, 16); | 	OrderID order = INVALID_ORDER; | ||||||
| 	/* Sorting a shared order list relies on station being set to INVALID_STATION */ | 	StationID station = INVALID_STATION; | ||||||
| 	/* If station is not INVALID_STATION, then order is never used and we don't care what it contains */ |  | ||||||
| 	StationID station = (w->window_number & SHARE_FLAG) ? INVALID_STATION : order; |  | ||||||
| 	PlayerID owner = GB(w->window_number, 0, 8); | 	PlayerID owner = GB(w->window_number, 0, 8); | ||||||
| 	vehiclelist_d *vl = &WP(w, vehiclelist_d); | 	vehiclelist_d *vl = &WP(w, vehiclelist_d); | ||||||
|  |  | ||||||
|  | 	if (w->window_number & SHARE_FLAG) { | ||||||
|  | 		order = GB(w->window_number, 16, 16); | ||||||
|  | 	} else { | ||||||
|  | 		station = GB(w->window_number, 16, 16); | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	switch (e->event) { | 	switch (e->event) { | ||||||
| 	case WE_PAINT: { | 	case WE_PAINT: { | ||||||
| 		int x = 2; | 		int x = 2; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 bjarni
					bjarni