Debugged updating the position of the hero during walking.
I project the hero immediately to the end of each edge for the time being though. svn-id: r45722
This commit is contained in:
parent
db58f6b998
commit
0b67aa406e
5 changed files with 77 additions and 61 deletions
|
@ -664,8 +664,13 @@ void Script::stayOn(Common::Queue<int> ¶ms) {
|
|||
SightDirection dir = static_cast<SightDirection> (params.pop());
|
||||
|
||||
// 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());
|
||||
|
||||
_vm->_game->stopWalking();
|
||||
_vm->_game->positionHero(_vm->_game->findNearestWalkable(x, y), dir);
|
||||
_vm->_game->setHeroPosition(heroPos);
|
||||
_vm->_game->playHeroAnimation(WalkingState::animationForSightDirection(
|
||||
dir, heroPos, mousePos, WalkingPath()));
|
||||
}
|
||||
|
||||
void Script::walkOn(Common::Queue<int> ¶ms) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue