From bdd1b10cb8d6c405de58031e1de57c7f2b24225f Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Mon, 6 Nov 2017 19:58:41 +0000 Subject: Introduce cmodels and cflags. --- src/game.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 2694350..91cf4d2 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -7,8 +7,8 @@ class unit_t : public world::entity_t { void compute_bounds() { - bounds[0] = x + size[0]; - bounds[1] = x + size[1]; + cmodel.bounds[0] = x + size[0]; + cmodel.bounds[1] = x + size[1]; render_bounds[0] = x + render_size[0]; render_bounds[1] = x + render_size[1]; } @@ -30,6 +30,7 @@ public: world = world_; x = x_; move.moving = false; + cmodel.cflags = 1; unlink(); compute_bounds(); @@ -82,7 +83,7 @@ public: move.dst = dst_; move.path.clear(); - if (world->find_path(x, move.dst, size, this, &move.path)) + if (world->find_path(x, move.dst, &cmodel, this, &move.path)) move.moving = true; else move.moving = false; -- cgit