Showing with 15 additions and 5 deletions.
  1. +6 −1 gemrb/GUIScripts/GUIREC.py
  2. +6 −1 gemrb/GUIScripts/iwd2/GUIREC.py
  3. +3 −3 gemrb/core/Scriptable/Actor.cpp
@@ -45,12 +45,13 @@
ColorIndex = None
ScriptTextArea = None
SelectedTextArea = None
PauseState = None

###################################################
def OpenRecordsWindow ():
import GUICommonWindows

global RecordsWindow, OptionsWindow, PortraitWindow
global RecordsWindow, OptionsWindow, PortraitWindow, PauseState
global OldPortraitWindow, OldOptionsWindow

if GUICommon.CloseOtherWindow (OpenRecordsWindow):
@@ -81,8 +82,12 @@ def OpenRecordsWindow ():
GUICommonWindows.OptionsWindow = OldOptionsWindow
OldOptionsWindow = None
GUICommonWindows.SetSelectionChangeHandler (None)
GemRB.GamePause (PauseState, 3)
return

PauseState = GemRB.GamePause (3, 1)
GemRB.GamePause (1, 3)

GemRB.HideGUI ()
GUICommon.GameWindow.SetVisible(WINDOW_INVISIBLE)

@@ -47,6 +47,7 @@
OldOptionsWindow = None
BonusSpellTable = None
HateRaceTable = None
PauseState = None

if not BonusSpellTable:
BonusSpellTable = GemRB.LoadTable ("mxsplbon")
@@ -66,7 +67,7 @@ def Exportable(pc):
def OpenRecordsWindow ():
global RecordsWindow, OptionsWindow, PortraitWindow
global OldPortraitWindow, OldOptionsWindow, SelectWindow
global BonusSpellTable, HateRaceTable
global BonusSpellTable, HateRaceTable, PauseState

if GUICommon.CloseOtherWindow (OpenRecordsWindow):

@@ -93,8 +94,12 @@ def OpenRecordsWindow ():
GUICommonWindows.OptionsWindow = OldOptionsWindow
OldOptionsWindow = None
GUICommonWindows.SetSelectionChangeHandler (None)
GemRB.GamePause (PauseState, 3)
return

PauseState = GemRB.GamePause (3, 1)
GemRB.GamePause (1, 3)

GemRB.HideGUI ()
GUICommon.GameWindow.SetVisible(WINDOW_INVISIBLE)

@@ -4269,16 +4269,16 @@ void Actor::IdleActions(bool nonidle)
//drop an area comment, party oneliner or initiate party banter (with Interact)
//party comments have a priority, but they happen half of the time, at most
if (nextComment<time) {
if (nextComment && !Immobile() && !GetPartyComment()) {
if (nextComment && !core->InCutSceneMode() && !Immobile() && !GetPartyComment()) {
GetAreaComment(map->AreaType);
}
nextComment = time+core->Roll(5,1000,bored_time/2);
return;
}

//drop the bored one liner is there was no action for some time
//drop the bored one liner if there was no action for some time
//if bored timeout is disabled, don't bother to set the new time
if (nonidle || (!nextBored && bored_time) || InMove() || Immobile()) {
if (nonidle || (!nextBored && bored_time) || InMove() || Immobile() || core->InCutSceneMode()) {
nextBored = time + core->Roll(1, 30, bored_time);
} else {
if (bored_time && nextBored && nextBored < time) {