summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-14 13:24:03 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-14 13:24:03 +0200
commit22f4d8fb0676b2ad139a486a903f9a7c3ff2797d (patch)
tree65612585fd50e7ec4dbaaa8b7c66ff8d49626e1d /src
parent794f6119ffcec7b8cab77cf48876b4ba50aa11c9 (diff)
Add tracers to explosions.
Diffstat (limited to 'src')
-rw-r--r--src/game/game.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index cf8fa1a..bc8d3c7 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -422,11 +422,16 @@ void state_t::explosion(v2f_t x)
for (size_t i = 0; i < 60; i++) {
v2f_t end;
world::trace_t trace;
+ fx_tracer_t *tracer;
entity_t *ent;
int damage;
end = x + prng.unit_vec2() * 6.0f;
trace = world.ray_v_all(x, end, CF_SOLID|CF_BODY|CF_BODY_SMALL|CF_DECOS, nullptr);
+
+ tracer = new fx_tracer_t(this, x, trace.end);
+ tracer->place(&world);
+
if (!trace.hit)
continue;