From 22f4d8fb0676b2ad139a486a903f9a7c3ff2797d Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 14 Apr 2018 13:24:03 +0200 Subject: Add tracers to explosions. --- src/game/game.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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; -- cgit