diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-27 14:11:18 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-27 14:11:18 +0200 |
commit | c3b82994011622a59cc61586492046a4238159c7 (patch) | |
tree | b8b006ca3cb623ae07c45f572d1c3f4ad5563be0 /src/game/unit_teleporter.cpp | |
parent | 006a1496a531eaa78f0016c5d2b2ddce1f58421f (diff) |
Detect game over conditions.
Diffstat (limited to 'src/game/unit_teleporter.cpp')
-rw-r--r-- | src/game/unit_teleporter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/unit_teleporter.cpp b/src/game/unit_teleporter.cpp index fd73ab6..56b3b5a 100644 --- a/src/game/unit_teleporter.cpp +++ b/src/game/unit_teleporter.cpp @@ -35,6 +35,8 @@ unit_teleporter_t::unit_teleporter_t(game::state_t *game_) : unit_t(game_, UNIT_ friendly = true; controllable = true; constructed = false; + + game->num_teleporters++; } void unit_teleporter_t::on_damage(unit_t *attacker) @@ -46,6 +48,7 @@ void unit_teleporter_t::on_death(void) { game->explosion(x); game->deletion_list.insert(this); + game->num_teleporters--; } void unit_teleporter_t::render_to(render::state_t *render) |