projects
/
traingame.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5ad910
)
Small optimisation to station highlighting
author
Nick Gasson <nick@nickg.me.uk>
Sun, 7 Jun 2009 13:38:23 +0000
(14:38 +0100)
committer
Nick Gasson <nick@nickg.me.uk>
Sun, 7 Jun 2009 13:38:23 +0000
(14:38 +0100)
src/Game.cpp
patch
|
blob
|
history
diff --git
a/src/Game.cpp
b/src/Game.cpp
index feee3e2609691b0d77eb3884287d017e5d65ba0a..58da2bf44a33327a7818bc8e1fadeb04f86f3e38 100644
(file)
--- a/
src/Game.cpp
+++ b/
src/Game.cpp
@@
-178,9
+178,11
@@
void Game::update(IPickBufferPtr aPickBuffer, int aDelta)
void Game::nearStation(IStationPtr aStation)
{
leftStation(); // Clear any previous station
-
- myActiveStation = aStation;
- aStation->setHighlightVisible(true);
+
+ if (aStation != myActiveStation) {
+ myActiveStation = aStation;
+ aStation->setHighlightVisible(true);
+ }
}
// Signal that we are no longer at or approaching a station