diff options
| author | Travis Howell | 2004-07-10 23:32:31 +0000 | 
|---|---|---|
| committer | Travis Howell | 2004-07-10 23:32:31 +0000 | 
| commit | ebafa060c65acd1c69f55a62879e5dfb050a2527 (patch) | |
| tree | e1f34b44b057c82d043df97c971daede557e9edc /scumm/actor.cpp | |
| parent | 32335f0ea11f95ef54d2b18418fdafb01bd6d33c (diff) | |
| download | scummvm-rg350-ebafa060c65acd1c69f55a62879e5dfb050a2527.tar.gz scummvm-rg350-ebafa060c65acd1c69f55a62879e5dfb050a2527.tar.bz2 scummvm-rg350-ebafa060c65acd1c69f55a62879e5dfb050a2527.zip | |
Always stop actor walkscript when required.
svn-id: r14184
Diffstat (limited to 'scumm/actor.cpp')
| -rw-r--r-- | scumm/actor.cpp | 18 | 
1 files changed, 6 insertions, 12 deletions
| diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 60d577daee..0925f193b2 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -94,9 +94,7 @@ void Actor::initActor(int mode) {  	memset(sound, 0, sizeof(sound));  	targetFacing = facing; -	if (walkScript) -		_vm->stopScript(walkScript); -	moving = 0; +	stopActorMoving();  	shadow_mode = 0;  	layer = 0; @@ -138,10 +136,9 @@ void Actor::initActor(int mode) {  }  void Actor::stopActorMoving() { -	if (walkScript) +	if (_vm->_version >= 7)  		_vm->stopScript(walkScript);  	moving = 0; -	startAnimActor(standFrame);  }  void Actor::setActorWalkSpeed(uint newSpeedX, uint newSpeedY) { @@ -593,8 +590,8 @@ void Actor::putActor(int dstX, int dstY, byte newRoom) {  	if (visible) {  		if (isInCurrentRoom()) {  			if (moving) { +				stopActorMoving();  				startAnimActor(standFrame); -				moving = 0;  			}  			adjustActorPos();  		} else { @@ -708,12 +705,9 @@ void Actor::adjustActorPos() {  	walkdata.dest.x = -1; -	moving = 0; +	stopActorMoving();  	cost.soundCounter = 0; -	if (walkScript) -		_vm->stopScript(walkScript); -  	if (walkbox != kInvalidBox) {  		byte flags = _vm->getBoxFlags(walkbox);  		if (flags & 7) { @@ -755,8 +749,8 @@ void Actor::hideActor() {  		return;  	if (moving) { +		stopActorMoving();  		startAnimActor(standFrame); -		moving = 0;  	}  	visible = false;  	cost.soundCounter = 0; @@ -785,7 +779,7 @@ void Actor::showActor() {  	if (!moving && _vm->_version <= 2)  		startAnimActor(standFrame); -	moving = 0; +	stopActorMoving();  	visible = true;  	needRedraw = true;  } | 
