Connection: Add 'move' attribute to the negotiation phase

This commit is contained in:
Petr Baudis 2011-11-27 05:07:01 +01:00
parent 9cf99e0bcd
commit 2907cb6791
4 changed files with 25 additions and 1 deletions

View file

@ -29,6 +29,9 @@ agent::move_dir(int dir_x, int dir_y)
if (dead || !tile)
return false;
if ((double) random() / (double) RAND_MAX > attr.move)
return false;
chenergy(world::move_cost);
class tile *t2 = &tile->tile_in_dir(dir_x, dir_y);