From e91ce36233474222e39ac2732100963fcb55574a Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 15 Dec 2017 14:36:55 +0100 Subject: Fix tracing. --- src/world.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/world.cpp b/src/world.cpp index 8a7720c..46dcde5 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -331,10 +331,8 @@ trace_t world_t::trace(v2f_t start, v2f_t end, cflags_t cflags) index = (tile_index_t(x.floor()) ^ transforms_index[quad]) + offsets_index[quad]; - //rectf_t tile(index, (v2f_t)index + v2f_t(1, 1)); - if (get_tile(index, false)->type > cflags) { // FIXME - //debug_render->render_hlrect(tile, sf::Color::Red); + if (tiles[get_tile(index, false)->type] & cflags) { res.hit = true; res.end = x ^ transforms[quad]; res.frac = (x - start).len() / (end - start).len(); @@ -342,7 +340,6 @@ trace_t world_t::trace(v2f_t start, v2f_t end, cflags_t cflags) } mod = x - x.floor(); - //debug_render->render_hlrect(tile, sf::Color::Green); // Project onto x = const. P[0] = 1.0f - mod[0]; -- cgit