summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-15 14:36:55 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-15 14:36:55 +0100
commite91ce36233474222e39ac2732100963fcb55574a (patch)
treecd085508f1aee38eb03ce1a6f9eae1605f8ac6f8 /src
parent6dae0448fa856a314bd41c7800ca2cba95527eda (diff)
Fix tracing.
Diffstat (limited to 'src')
-rw-r--r--src/world.cpp5
1 files changed, 1 insertions, 4 deletions
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];