mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
fixed bug #1620023 (script calls putActorAtXY with y == -1)
svn-id: r24910
This commit is contained in:
parent
e6f95af215
commit
cfd4ffb321
@ -878,13 +878,6 @@ void ScummEngine::putActors() {
|
||||
}
|
||||
|
||||
void Actor::putActor(int dstX, int dstY, int newRoom) {
|
||||
if (dstX == -1)
|
||||
dstX = _pos.x;
|
||||
if (dstY == -1)
|
||||
dstY = _pos.y;
|
||||
if (newRoom == -1)
|
||||
newRoom = _room;
|
||||
|
||||
if (_visible && _vm->_currentRoom != newRoom && _vm->getTalkingActor() == _number) {
|
||||
_vm->stopTalk();
|
||||
}
|
||||
|
@ -186,7 +186,16 @@ public:
|
||||
void showActor();
|
||||
|
||||
void initActor(int mode);
|
||||
void putActor(int x = -1, int y = -1, int room = -1);
|
||||
|
||||
void putActor() {
|
||||
putActor(_pos.x, _pos.y, _room);
|
||||
}
|
||||
|
||||
void putActor(int x, int y) {
|
||||
putActor(x, y, _room);
|
||||
}
|
||||
|
||||
void putActor(int x, int y, int room);
|
||||
void setActorWalkSpeed(uint newSpeedX, uint newSpeedY);
|
||||
protected:
|
||||
int calcMovementFactor(const Common::Point& next);
|
||||
|
@ -383,11 +383,11 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) {
|
||||
a->_ignoreBoxes = (value > 0);
|
||||
DebugPrintf("Actor[%d].ignoreBoxes = %d\n", actnum, a->_ignoreBoxes);
|
||||
} else if (!strcmp(argv[2], "x")) {
|
||||
a->putActor(value, -1, -1);
|
||||
a->putActor(value, a->getPos().y, a->_room);
|
||||
DebugPrintf("Actor[%d].x = %d\n", actnum, a->getPos().x);
|
||||
_vm->_fullRedraw = true;
|
||||
} else if (!strcmp(argv[2], "y")) {
|
||||
a->putActor(-1, value, -1);
|
||||
a->putActor(a->getPos().x, value, a->_room);
|
||||
DebugPrintf("Actor[%d].y = %d\n", actnum, a->getPos().y);
|
||||
_vm->_fullRedraw = true;
|
||||
} else if (!strcmp(argv[2], "_elevation")) {
|
||||
|
@ -749,7 +749,7 @@ void ScummEngine_c64::o_putActorAtObject() {
|
||||
y = 60;
|
||||
}
|
||||
|
||||
a->putActor(x, y);
|
||||
a->putActor(x, y, a->_room);
|
||||
}
|
||||
|
||||
void ScummEngine_c64::o_pickupObject() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user