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.
|
||||
*
|
||||
* Known contributors to this file:
|
||||
* Markus Armbruster, 2004-2011
|
||||
* Markus Armbruster, 2004-2012
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
@ -65,7 +65,6 @@ move_ground(struct sctstr *start, struct sctstr *end,
|
|||
int dir;
|
||||
char scanspace[1024];
|
||||
char *argp[128];
|
||||
int intcost;
|
||||
int takedam = *dam;
|
||||
int out = 0;
|
||||
char prompt[128];
|
||||
|
@ -256,16 +255,11 @@ move_ground(struct sctstr *start, struct sctstr *end,
|
|||
break;
|
||||
}
|
||||
*end = sect;
|
||||
intcost = (int)total_mcost;
|
||||
if (intcost < 0)
|
||||
return -1;
|
||||
if ((start->sct_x == end->sct_x) && (start->sct_y == end->sct_y)
|
||||
&& !out)
|
||||
return -1;
|
||||
|
||||
if (chance(total_mcost - intcost))
|
||||
intcost++;
|
||||
return intcost;
|
||||
return roundavg(total_mcost);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue