summaryrefslogtreecommitdiff
path: root/src/game/unit_teleporter.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-27 14:11:18 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-27 14:11:18 +0200
commitc3b82994011622a59cc61586492046a4238159c7 (patch)
treeb8b006ca3cb623ae07c45f572d1c3f4ad5563be0 /src/game/unit_teleporter.cpp
parent006a1496a531eaa78f0016c5d2b2ddce1f58421f (diff)
Detect game over conditions.
Diffstat (limited to 'src/game/unit_teleporter.cpp')
-rw-r--r--src/game/unit_teleporter.cpp3
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)