[Scummvm-cvs-logs] SF.net SVN: scummvm:[45121] scummvm/branches/branch-1-0-0/engines/ parallaction/dialogue.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Thu Oct 15 15:42:25 CEST 2009
Revision: 45121
http://scummvm.svn.sourceforge.net/scummvm/?rev=45121&view=rev
Author: peres001
Date: 2009-10-15 13:42:25 +0000 (Thu, 15 Oct 2009)
Log Message:
-----------
Backport of r45120. Fixed bug 2879785. Dialogue commands were partly executed too early: see comment at line 480 in dialogue.cpp.
Modified Paths:
--------------
scummvm/branches/branch-1-0-0/engines/parallaction/dialogue.cpp
Modified: scummvm/branches/branch-1-0-0/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/branches/branch-1-0-0/engines/parallaction/dialogue.cpp 2009-10-15 13:40:39 UTC (rev 45120)
+++ scummvm/branches/branch-1-0-0/engines/parallaction/dialogue.cpp 2009-10-15 13:42:25 UTC (rev 45121)
@@ -477,17 +477,21 @@
debugC(1, kDebugDialogue, "Parallaction::exitDialogueMode()");
_input->_inputMode = Input::kInputModeGame;
- if (_dialogueMan->_cmdList) {
- _cmdExec->run(*_dialogueMan->_cmdList);
- }
+ /* Since the current instance of _dialogueMan must be destroyed before the
+ zone commands are executed, as they may create a new instance of _dialogueMan that
+ would overwrite the current, we need to save the references to the command lists.
+ */
+ CommandList *_cmdList = _dialogueMan->_cmdList;
+ ZonePtr z = _dialogueMan->_z;
- // The current instance of _dialogueMan must be destroyed before the zone commands
- // are executed, because they may create another instance of _dialogueMan that
- // overwrite the current one. This would cause headaches (and it did, actually).
- ZonePtr z = _dialogueMan->_z;
+ // destroy the _dialogueMan here
delete _dialogueMan;
_dialogueMan = 0;
+ // run the lists saved
+ if (_cmdList) {
+ _cmdExec->run(*_cmdList);
+ }
_cmdExec->run(z->_commands, z);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list