summaryrefslogtreecommitdiff
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 9a504c3..d9789ad 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -80,13 +80,13 @@ void world_t::generate(sector_t *sector, sector_index_t index, bool partial)
}
}
-bool world_t::find_path(v2f_t src, v2f_t dst, rectf_t size, entity_t *ignore,
+bool world_t::find_path(v2f_t src, v2f_t dst, cmodel_t *cmodel, entity_t *ignore,
std::list<v2f_t> *path)
{
path_finder_t finder;
rectf_t bounds;
- finder.setup_nodes(src, dst);
+ finder.setup_nodes(src, dst, cmodel->cflags);
for (size_t y = 0; y < finder.height; y++)
for (size_t x = 0; x < finder.width; x++) {
@@ -101,7 +101,7 @@ bool world_t::find_path(v2f_t src, v2f_t dst, rectf_t size, entity_t *ignore,
for (entity_t *ent : get_entities(bounds))
if (ent != ignore)
- finder.eliminate_nodes(ent->bounds);
+ finder.eliminate_nodes(ent->cmodel);
if (!finder.find())
return false;
@@ -181,7 +181,7 @@ std::list<entity_t*> world_t::get_entities(rectf_t rect)
if (ent->cookie == cookie)
continue;
- if (!(rect && ent->bounds))
+ if (!(rect && ent->cmodel.bounds))
continue;
ent->cookie = cookie;
@@ -235,7 +235,7 @@ void entity_t::link(world_t *world)
float xlip, ylip;
size_t xsecs, ysecs;
- total_bounds = bounds | render_bounds;
+ total_bounds = cmodel.bounds | render_bounds;
fx = floor(total_bounds[0][0]);
fy = floor(total_bounds[0][1]);