BUG 2372 canride breakage

This commit is contained in:
Enno Rehling 2017-10-13 18:30:22 +02:00
parent 9527460ca4
commit a82034b8a7

View file

@ -425,7 +425,7 @@ bool canswim(unit * u)
return false; return false;
} }
static int canride(const unit * u) static int walk_mode(const unit * u)
{ {
int horses = 0, maxhorses, unicorns = 0, maxunicorns; int horses = 0, maxhorses, unicorns = 0, maxunicorns;
int skill = effskill(u, SK_RIDING, 0); int skill = effskill(u, SK_RIDING, 0);
@ -1407,7 +1407,7 @@ int movement_speed(const unit * u)
mp = BP_DRAGON; mp = BP_DRAGON;
break; break;
default: default:
mp = canride(u); mp = walk_mode(u);
if (mp>=BP_RIDING) { if (mp>=BP_RIDING) {
dk = 1.0; dk = 1.0;
} }
@ -1611,7 +1611,7 @@ static const region_list *travel_route(unit * u,
if (mode == TRAVEL_RUNNING) { if (mode == TRAVEL_RUNNING) {
walkmode = 0; walkmode = 0;
} }
if (canride(u)) { else if (walk_mode(u) >= BP_RIDING) {
walkmode = 1; walkmode = 1;
produceexp(u, SK_RIDING, u->number); produceexp(u, SK_RIDING, u->number);
} }