Incomp. Proto. Change: attack_dir gets <force> parameter

This commit is contained in:
Petr Baudis 2011-12-22 00:12:45 +01:00
parent 177d41cf60
commit 091708f577
6 changed files with 22 additions and 16 deletions

View file

@ -168,11 +168,12 @@ bump_negot:
bump();
mask |= 1;
} else if (!negotiation && !cmd.compare("attack_dir") && !(mask & 2)) {
int x = 0, y = 0;
sscanf(line.c_str(), "%d %d", &x, &y);
int x = 0, y = 0, force = 0;
sscanf(line.c_str(), "%d %d %d", &x, &y, &force);
if (x < -1) x = -1; if (x > 1) x = 1;
if (y < -1) y = -1; if (y > 1) y = 1;
if (!agent->attack_dir(x, y))
if (force < 1) force = 1;
if (!agent->attack_dir(x, y, force))
bump();
mask |= 2;
} else if (!negotiation && !cmd.compare("breed_dir") && !(mask & 4)) {