summaryrefslogtreecommitdiff
path: root/src/game/units.cpp
diff options
context:
space:
mode:
authorZoltán Kéri <z@zolk3ri.name>2017-12-20 18:44:44 +0100
committerZoltán Kéri <z@zolk3ri.name>2017-12-20 18:44:44 +0100
commitf01e03f6b858c27e54c561f2b430853ada2f2268 (patch)
treef01ce69c22be3a9691323f8d52085c7a126be014 /src/game/units.cpp
parentcb079c34858a106f7104cc160208e2e27f1057ea (diff)
Deselect soldiers on death.
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 35961ef..c8ba2d8 100644
--- a/src/game/units.cpp
+++ b/src/game/units.cpp
@@ -456,6 +456,8 @@ void unit_soldier_t::on_death(void)
render_layer = -1;
cmodel.cflags = CF_BACKGROUND;
place(world, x);
+ controllable = false;
+ game->selected_units.erase(this);
}
void unit_soldier_t::render_to(render::state_t *render)