diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-11-06 19:58:41 +0000 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-11-06 19:58:41 +0000 |
commit | bdd1b10cb8d6c405de58031e1de57c7f2b24225f (patch) | |
tree | 93f08e73ca4b34b23e8bd1fbde422848eba9d7bb /src/game.cpp | |
parent | 6a82d04e2b5edffc32df44aa46d6cf60428c7b44 (diff) |
Introduce cmodels and cflags.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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; |