Changeset - r22458:62fd1cae9152
[Not reviewed]
master
0 1 0
frosch - 8 years ago 2016-10-16 14:57:13
frosch@openttd.org
(svn r27665) -Fix: When dragging crashed vehicles, also draw them as crashed at the mouse cursor.
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/vehicle_gui.cpp
Show inline comments
 
@@ -2881,8 +2881,10 @@ void SetMouseCursorVehicle(const Vehicle
 
		if (_cursor.sprite_count == lengthof(_cursor.sprite_seq)) break;
 
		if (total_width >= 2 * (int)VEHICLEINFO_FULL_VEHICLE_WIDTH) break;
 

	
 
		PaletteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v);
 

	
 
		_cursor.sprite_seq[_cursor.sprite_count].sprite = v->GetImage(rtl ? DIR_E : DIR_W, image_type);
 
		_cursor.sprite_seq[_cursor.sprite_count].pal = GetVehiclePalette(v);
 
		_cursor.sprite_seq[_cursor.sprite_count].pal = pal;
 
		_cursor.sprite_pos[_cursor.sprite_count].x = rtl ? -total_width : total_width;
 
		_cursor.sprite_pos[_cursor.sprite_count].y = 0;
 

	
0 comments (0 inline, 0 general)