Clear the EXIT_CLICK_ID variable when entering a new room. Otherwise, if an

exit warps back to the same room, clicking on the same exit again is
misinterpreted as a double-click, and that only works if we're already walking
towards that exit. Otherwise, the game will hang. This fixed bug #1851502
("SWORD2: Black-out in Forest").

svn-id: r29876
This commit is contained in:
Torbjörn Andersson 2007-12-16 09:44:04 +00:00
parent aa96ec9940
commit bd7bef0fe6

View file

@ -63,6 +63,13 @@ void Screen::initBackground(int32 res, int32 new_palette) {
debug(1, "CHANGED TO LOCATION \"%s\"", _vm->_resman->fetchName(res));
// We have to clear this. Otherwise, if an exit warps back to the same
// room (e.g. the jungle maze), clicking on the same exit again will be
// misinterpreted as a double-click, and that only works if we're
// actually walking towards that exit. Otherwise, the game would hang.
_vm->_logic->writeVar(EXIT_CLICK_ID, 0);
// if last screen was using a shading mask (see below)
if (_thisScreen.mask_flag) {
if (closeLightMask() != RD_OK)