TOON: Fix bugs #3085967 and #3085969 about guards dance

Bug #3085969: "TOON: Missing dialogue for Palace guards dance"
Bug #3085969: "TOON: Missing dialogue for Palace Guards sequence"

svn-id: r53543
This commit is contained in:
Sylvain Dupont 2010-10-16 17:06:10 +00:00
parent de1b17fb99
commit 49fc73e3be
3 changed files with 18 additions and 7 deletions

View File

@ -618,10 +618,7 @@ int32 ScriptFunc::sys_Cmd_In_Conversation(EMCState *state) {
int32 ScriptFunc::sys_Cmd_Character_Talking(EMCState *state) {
int32 characterId = stackPos(0);
Character *character = _vm->getCharacterById(characterId);
if (character)
return (character->getFlag() & 4) && (character->getFlag() & 8);
return 0;
return (_vm->getCurrentCharacterTalking() == characterId);
}
int32 ScriptFunc::sys_Cmd_Set_Flux_Facing_Point(EMCState *state) {
@ -873,6 +870,12 @@ int32 ScriptFunc::sys_Cmd_Set_Scene_Anim_Wait(EMCState *state) {
_vm->setSceneAnimationScriptUpdate(false);
}
// WORKAROUND : Slow down just a little the guards dance animation so that the voices don't cut
if (_vm->state()->_currentScene == 2 && (sceneId == 2 || sceneId == 3)) {
waitTicks = 7;
_vm->setSceneAnimationScriptUpdate(false);
}
waitTicks *= _vm->getTickLength();
if (sceneId >= 0 && sceneId < 40) {

View File

@ -915,6 +915,8 @@ void ToonEngine::loadScene(int32 SceneId, bool forGameLoad) {
addItemToInventory(_gameState->_mouseState);
_gameState->_mouseState = -1;
_mouseButton = 0;
_lastMouseButton = 0x3;
// load package
@ -1795,9 +1797,11 @@ void ToonEngine::playTalkAnimOnCharacter(int32 animID, int32 characterId, bool t
int32 ToonEngine::characterTalk(int32 dialogid, bool blocking) {
if (blocking == false && _audioManager->voiceStillPlaying()) {
// someone is already talking, and this voice is not important
// skip it
return 0;
if (_currentTextLineCharacterId == 0 || _currentTextLineCharacterId == 1) {
// Drew or Flux is already talking, and this voice is not important
// skip it
return 0;
}
}
int32 myId = 0;

View File

@ -253,6 +253,10 @@ public:
return _currentTextLineId;
}
int32 getCurrentCharacterTalking() {
return _currentTextLineCharacterId;
}
CharacterDrew *getDrew() {
return (CharacterDrew *)_drew;
}