Skip to content

Commit

Permalink
ULTIMA8: Put in a small hack for crusader elevators
Browse files Browse the repository at this point in the history
  • Loading branch information
mduggan committed Jul 8, 2020
1 parent dc35d40 commit 656c57f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions engines/ultima/ultima8/world/actors/animation_tracker.cpp
Expand Up @@ -343,6 +343,14 @@ bool AnimationTracker::step() {
// It shouldn't be necessary in that case, and may provide a
// worthwhile speed-up.
if ((f._flags & AnimFrame::AFF_ONGROUND) && zd > 8) {
if (GAME_IS_CRUSADER && !targetok && support) {
// Possibly trying to step onto an elevator platform which stops at a z slightly
// above the floor. Re-scan with a small adjustment.
// This is a bit of a temporary hack to make navigation possible.. it "hurls"
// the avatar sometimes, so it needs fixing properly.
tz += 2;
}

targetok = cm->scanForValidPosition(tx, ty, tz, a, _dir,
true, tx, ty, tz);

Expand Down

0 comments on commit 656c57f

Please sign in to comment.