summaryrefslogtreecommitdiff
path: root/src/game/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r--src/game/game.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index bf9ec97..6e73811 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -397,7 +397,7 @@ void state_t::explosion(v2f_t x)
for (size_t i = 0; i < 30; i++) {
v2f_t end;
world::trace_t trace;
- unit_t *unit;
+ entity_t *ent;
int damage;
end = x + prng.unit_vec2() * 6.0f;
@@ -411,13 +411,9 @@ void state_t::explosion(v2f_t x)
if (trace.ent->type != ET_UNIT)
continue;
- unit = dynamic_cast<unit_t*>(trace.ent);
-
- if (unit->dead)
- continue;
-
+ ent = dynamic_cast<unit_t*>(trace.ent);
damage = pow(1 - trace.frac, 2.0f) * 40.0f;
- unit->damage(damage, nullptr);
+ ent->damage(damage, nullptr);
}
}