Make move_ground() use roundavg()
No functional change.
This commit is contained in:
parent
c53158eee0
commit
1cf6b5e6bb
1 changed files with 2 additions and 8 deletions
|
@ -27,7 +27,7 @@
|
||||||
* move.c: Move something somewhere.
|
* move.c: Move something somewhere.
|
||||||
*
|
*
|
||||||
* Known contributors to this file:
|
* Known contributors to this file:
|
||||||
* Markus Armbruster, 2004-2011
|
* Markus Armbruster, 2004-2012
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -65,7 +65,6 @@ move_ground(struct sctstr *start, struct sctstr *end,
|
||||||
int dir;
|
int dir;
|
||||||
char scanspace[1024];
|
char scanspace[1024];
|
||||||
char *argp[128];
|
char *argp[128];
|
||||||
int intcost;
|
|
||||||
int takedam = *dam;
|
int takedam = *dam;
|
||||||
int out = 0;
|
int out = 0;
|
||||||
char prompt[128];
|
char prompt[128];
|
||||||
|
@ -256,16 +255,11 @@ move_ground(struct sctstr *start, struct sctstr *end,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*end = sect;
|
*end = sect;
|
||||||
intcost = (int)total_mcost;
|
|
||||||
if (intcost < 0)
|
|
||||||
return -1;
|
|
||||||
if ((start->sct_x == end->sct_x) && (start->sct_y == end->sct_y)
|
if ((start->sct_x == end->sct_x) && (start->sct_y == end->sct_y)
|
||||||
&& !out)
|
&& !out)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (chance(total_mcost - intcost))
|
return roundavg(total_mcost);
|
||||||
intcost++;
|
|
||||||
return intcost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue