Skip to content

Commit

Permalink
Engine: fix few instances of getting movelist from a character
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Jan 20, 2025
1 parent 59a1b0e commit ee79d6c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Engine/ac/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ void Character_SetSpeed(CharacterInfo *chaa, int xspeed, int yspeed) {

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

void Character_StopMovingEx(CharacterInfo *chi, bool force_walkable_area)
Expand Down Expand Up @@ -2038,8 +2038,8 @@ int doNextCharMoveStep(CharacterInfo *chi, CharacterExtras *chex) {
}

if ((chi->walking < 1) || (chi->walking >= TURNING_AROUND)) ;
else if (mls[chi->walking].onpart > 0.f) {
mls[chi->walking].onpart -= 1.f;
else if (mls[chi->get_movelist_id()].onpart > 0.f) {
mls[chi->get_movelist_id()].onpart -= 1.f;
chi->x = xwas;
chi->y = ywas;
}
Expand All @@ -2053,7 +2053,7 @@ int doNextCharMoveStep(CharacterInfo *chi, CharacterExtras *chex) {
bool is_char_walking_ndirect(CharacterInfo *chi)
{
return chi->is_moving_not_turning() &&
(mls[chi->walking].direct == 0);
(mls[chi->get_movelist_id()].direct == 0);
}

int find_nearest_walkable_area_within(int *xx, int *yy, int range, int step)
Expand Down

0 comments on commit ee79d6c

Please sign in to comment.