Skip to content

Commit

Permalink
Engine: fixed characters sometimes wait after moving before idle anim
Browse files Browse the repository at this point in the history
Apparently "doing_nothing" flag was set too late, resetting previously set value.
  • Loading branch information
ivan-mogilko committed Aug 27, 2023
1 parent 24a19dd commit 1084cf5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Engine/ac/characterinfo_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ void CharacterInfo::update_character_moving(int &char_index, CharacterExtras *ch
quitprintf("Unable to render character %d (%s) because there are no frames in loop %d", index_id, name, loop);
}

if (walking<1) {
doing_nothing = 0; // still walking?

if (walking < 1) {
// Finished walking, stop and reset state
chex->process_idle_this_time = 1;
doing_nothing=1;
walkwait=0;
Expand All @@ -241,8 +244,9 @@ void CharacterInfo::update_character_moving(int &char_index, CharacterExtras *ch
chex->CheckViewFrame(this);
}
}
else if (chex->animwait > 0) chex->animwait--;
else {
else if (chex->animwait > 0) {
chex->animwait--;
} else {
if (flags & CHF_ANTIGLIDE)
walkwaitcounter++;

Expand All @@ -268,7 +272,6 @@ void CharacterInfo::update_character_moving(int &char_index, CharacterExtras *ch
chex->CheckViewFrame(this);
}
}
doing_nothing = 0;
}
}

Expand Down

0 comments on commit 1084cf5

Please sign in to comment.