Debugged smooth walking except for 1 bug.
Adjusting to the edge is done such that it respects slight sideways movements of the dragon. Fixed rounding issues in the whole game. Improved debug messages. Made sure that the dragon does not turn like crazy around when clicking on the same pixel: the final point is always the clicked one although the middle points made by shifted to make the animations smooth, and preserve the dragons direction if he has not walked. There is a bug with running turning animations as they seem to disappear for 1 frame and have incorrect Z coordinate. Will investigate it next. svn-id: r45742
This commit is contained in:
parent
286e71fdcf
commit
354d7f6366
7 changed files with 100 additions and 70 deletions
|
@ -666,11 +666,13 @@ void Script::stayOn(Common::Queue<int> ¶ms) {
|
|||
// Jumps into the given position regardless of the walking map.
|
||||
Common::Point heroPos(_vm->_game->findNearestWalkable(x, y));
|
||||
Common::Point mousePos(_vm->_mouse->getPosX(), _vm->_mouse->getPosY());
|
||||
const GameObject *dragon = _vm->_game->getObject(kDragonObject);
|
||||
Movement startingDirection = static_cast<Movement> (_vm->_game->playingObjectAnimation(dragon));
|
||||
|
||||
_vm->_game->stopWalking();
|
||||
_vm->_game->setHeroPosition(heroPos);
|
||||
_vm->_game->playHeroAnimation(WalkingState::animationForSightDirection(
|
||||
dir, heroPos, mousePos, WalkingPath()));
|
||||
dir, heroPos, mousePos, WalkingPath(), startingDirection));
|
||||
}
|
||||
|
||||
void Script::walkOn(Common::Queue<int> ¶ms) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue