diff --git a/src/player_gui.cpp b/src/player_gui.cpp index 57b4e3c8a0..68e1bd3fbb 100644 --- a/src/player_gui.cpp +++ b/src/player_gui.cpp @@ -1304,10 +1304,10 @@ struct PlayerCompanyWindow : Window } } - virtual void OnTick() + virtual void OnHundredthTick() { /* redraw the window every now and then */ - if ((++this->vscroll.pos & 0x1F) == 0) this->SetDirty(); + this->SetDirty(); } virtual void OnPlaceObject(Point pt, TileIndex tile) diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 5f0f039fbd..35bb9d7234 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -574,6 +574,7 @@ class SmallMapWindow : public Window int32 scroll_x; int32 scroll_y; int32 subscroll; + uint8 refresh; public: /** @@ -1019,7 +1020,7 @@ public: virtual void OnTick() { /* update the window every now and then */ - if ((++this->vscroll.pos & 0x1F) == 0) this->SetDirty(); + if ((++this->refresh & 0x1F) == 0) this->SetDirty(); } virtual void OnScroll(Point delta)