diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-12 21:12:28 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-12 21:13:35 +0200 |
commit | d307234efb1e687bfac06d48b01eb56d748e8510 (patch) | |
tree | 911312b01583dc65b7204ae9a5093e15949e6642 /src/common.hpp | |
parent | a5b20dcd57ddf7bdac8d9bce1aabf934badd837d (diff) |
Refactor trace calls and remove the debug crap from the previous commit.
Diffstat (limited to 'src/common.hpp')
-rw-r--r-- | src/common.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/common.hpp b/src/common.hpp index ef96cc6..bf4482f 100644 --- a/src/common.hpp +++ b/src/common.hpp @@ -120,6 +120,9 @@ namespace world { bool hit; v2f_t end; float frac; + + entity_t *ent; + tile_t *tile; } trace_t; // for testing @@ -158,7 +161,10 @@ namespace world { std::list<entity_t*> get_render_entities(rectf_t rect); bool test_rect(const cmodel_t *cmodel, const entity_t *ignore); - trace_t trace(v2f_t start, v2f_t end, cflags_t cflags); + + trace_t ray_v_ents(v2f_t start, v2f_t end, cflags_t cflags, world::entity_t *ignore); + trace_t ray_v_tiles(v2f_t start, v2f_t end, cflags_t cflags); + trace_t ray_v_all(v2f_t start, v2f_t end, cflags_t cflags, world::entity_t *ignore); struct { size_t sectors = 0, tiles = 0; |