diff options
author | rubidium <rubidium@openttd.org> | 2008-07-20 19:21:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-20 19:21:18 +0000 |
commit | fec49bcc83b2f5f813feee136382cbe367486e92 (patch) | |
tree | 6fcf8a160a5a544d096084931b801439776c3b40 /src/gfx.cpp | |
parent | 690859bf570094d1d59f6e1e3b7009d64bc022d7 (diff) | |
download | openttd-fec49bcc83b2f5f813feee136382cbe367486e92.tar.xz |
(svn r13759) -Fix [FS#2147]: selecting non-full length vehicles in the depot gui would place the "mouse pointer" out of the center of the vehicle making it hard to "aim".
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r-- | src/gfx.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp index 8cd3cefaa..e57327446 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -1008,7 +1008,7 @@ void DrawMouseCursor() } w = _cursor.size.x; - x = _cursor.pos.x + _cursor.offs.x; + x = _cursor.pos.x + _cursor.offs.x + _cursor.short_vehicle_offset; if (x < 0) { w += x; x = 0; @@ -1036,7 +1036,7 @@ void DrawMouseCursor() /* Draw cursor on screen */ _cur_dpi = &_screen; - DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x, _cursor.pos.y); + DrawSprite(_cursor.sprite, _cursor.pal, _cursor.pos.x + _cursor.short_vehicle_offset, _cursor.pos.y); _video_driver->MakeDirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y); @@ -1287,6 +1287,7 @@ static void SetCursorSprite(SpriteID cursor, SpriteID pal) cv->offs.y = p->y_offs; cv->dirty = true; + cv->short_vehicle_offset = 0; } static void SwitchAnimatedCursor() |