summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp5
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()