Skip to content

Commit ee79d6c

Browse files
committed
Engine: fix few instances of getting movelist from a character
1 parent 59a1b0e commit ee79d6c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Engine/ac/character.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ void Character_SetSpeed(CharacterInfo *chaa, int xspeed, int yspeed) {
959959

960960
void Character_StopMoving(CharacterInfo *chi)
961961
{
962-
Character_StopMovingEx(chi, chi->is_moving() && (mls[chi->walking].direct == 0));
962+
Character_StopMovingEx(chi, chi->is_moving() && (mls[chi->get_movelist_id()].direct == 0));
963963
}
964964

965965
void Character_StopMovingEx(CharacterInfo *chi, bool force_walkable_area)
@@ -2038,8 +2038,8 @@ int doNextCharMoveStep(CharacterInfo *chi, CharacterExtras *chex) {
20382038
}
20392039

20402040
if ((chi->walking < 1) || (chi->walking >= TURNING_AROUND)) ;
2041-
else if (mls[chi->walking].onpart > 0.f) {
2042-
mls[chi->walking].onpart -= 1.f;
2041+
else if (mls[chi->get_movelist_id()].onpart > 0.f) {
2042+
mls[chi->get_movelist_id()].onpart -= 1.f;
20432043
chi->x = xwas;
20442044
chi->y = ywas;
20452045
}
@@ -2053,7 +2053,7 @@ int doNextCharMoveStep(CharacterInfo *chi, CharacterExtras *chex) {
20532053
bool is_char_walking_ndirect(CharacterInfo *chi)
20542054
{
20552055
return chi->is_moving_not_turning() &&
2056-
(mls[chi->walking].direct == 0);
2056+
(mls[chi->get_movelist_id()].direct == 0);
20572057
}
20582058

20592059
int find_nearest_walkable_area_within(int *xx, int *yy, int range, int step)

0 commit comments

Comments
 (0)