only call Logic::executeSpecialMove if asm > 0

svn-id: r12023
This commit is contained in:
Gregory Montoir 2003-12-29 21:31:02 +00:00
parent 0dd61a56b4
commit bb77917c7f
2 changed files with 5 additions and 5 deletions

View File

@ -884,7 +884,7 @@ void Cutaway::run(char *nextFilename) {
if (!object.moveToX &&
!object.moveToY &&
object.specialMove &&
object.specialMove > 0 &&
object.objectNumber >= 0) {
_vm->logic()->executeSpecialMove(object.specialMove);
object.specialMove = 0;
@ -1178,7 +1178,8 @@ void Cutaway::stop() {
} // for()
int16 specialMove = (int16)READ_BE_UINT16(ptr); ptr += 2;
_vm->logic()->executeSpecialMove(specialMove);
if (specialMove > 0)
_vm->logic()->executeSpecialMove(specialMove);
_lastSong = (int16)READ_BE_UINT16(ptr); ptr += 2;
}

View File

@ -2637,9 +2637,8 @@ bool Logic::executeASM_Game(uint16 sm) {
void Logic::executeSpecialMove(uint16 sm) {
debug(6, "Special move: %d", sm);
if (sm)
if (!(this->*_executeASM)(sm))
warning("unhandled / invalid special move : %d", sm);
if (!(this->*_executeASM)(sm))
warning("unhandled / invalid special move : %d", sm);
}