summaryrefslogtreecommitdiff
path: root/src/game/units.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-21 14:18:28 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-21 14:18:28 +0200
commit7c56f59aedddb6bb18d85e778a3acbef16b4c54f (patch)
tree5994012f810d59c8e9e80818f53469539e09ac8e /src/game/units.cpp
parent7798f9ada1a4248e178734bc5adfd3b609bdb9a6 (diff)
Deselect all types of units when they die.
Diffstat (limited to 'src/game/units.cpp')
-rw-r--r--src/game/units.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/units.cpp b/src/game/units.cpp
index 735ed89..f1ee45e 100644
--- a/src/game/units.cpp
+++ b/src/game/units.cpp
@@ -237,6 +237,8 @@ void unit_t::die(unit_t *killer)
sleep();
ignore_waking = true;
+ game->selected_units.erase(this);
+
on_death();
}