AGS: Fix end sequence of MMM 8 aborting partway through

This commit is contained in:
Paul Gilbert 2021-06-27 17:03:48 -07:00
parent bba432f0b8
commit 487039489a
3 changed files with 5 additions and 4 deletions

View File

@ -927,7 +927,7 @@ RuntimeScriptValue Sc_MoveCharacter(const RuntimeScriptValue *params, int32_t pa
// void (int chaa,int xx,int yy,int direct)
RuntimeScriptValue Sc_MoveCharacterBlocking(const RuntimeScriptValue *params, int32_t param_count) {
API_SCALL_VOID_PINT4(MoveCharacterBlocking);
API_SCALL_INT_PINT4(MoveCharacterBlocking);
}
// void (int cc,int xx, int yy)

View File

@ -350,7 +350,7 @@ void MoveCharacterToHotspot(int chaa, int hotsp) {
GameLoopUntilNotMoving(&_GP(game).chars[chaa].walking);
}
void MoveCharacterBlocking(int chaa, int xx, int yy, int direct) {
int MoveCharacterBlocking(int chaa, int xx, int yy, int direct) {
if (!is_valid_character(chaa))
quit("!MoveCharacterBlocking: invalid character");
@ -358,7 +358,7 @@ void MoveCharacterBlocking(int chaa, int xx, int yy, int direct) {
// ticked -- otherwise this will hang the game
if (_GP(game).chars[chaa].on != 1) {
debug_script_warn("MoveCharacterBlocking: character is turned off (is Hide Player Character selected?) and cannot be moved");
return;
return 0;
}
if (direct)
@ -367,6 +367,7 @@ void MoveCharacterBlocking(int chaa, int xx, int yy, int direct) {
MoveCharacter(chaa, xx, yy);
GameLoopUntilNotMoving(&_GP(game).chars[chaa].walking);
return 1;
}
int GetCharacterSpeechAnimationDelay(CharacterInfo *cha) {

View File

@ -65,7 +65,7 @@ void SetCharacterClickable(int cha, int clik);
void SetCharacterIgnoreWalkbehinds(int cha, int clik);
void MoveCharacterToObject(int chaa, int obbj);
void MoveCharacterToHotspot(int chaa, int hotsp);
void MoveCharacterBlocking(int chaa, int xx, int yy, int direct);
int MoveCharacterBlocking(int chaa, int xx, int yy, int direct);
void RunCharacterInteraction(int cc, int mood);
int AreCharObjColliding(int charid, int objid);