From: Laszlo T. <ave...@us...> - 2012-02-25 17:22:16
|
gemrb: Infinity Engine emulator The branch master has been updated via cecba723a8b9aef012781d6fa446ee496bc80acd (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 11 ++++++++--- gemrb/core/Scriptable/Actor.h | 1 + gemrb/plugins/GUIScript/GUIScript.cpp | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) from b820c59f2532610f28cbcc8b6d3ca02aa0b8d807 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=cecba723a8b9aef012781d6fa446ee496bc80acd commit cecba723a8b9aef012781d6fa446ee496bc80acd Author: Avenger <ave...@so...> Date: Sat Feb 25 18:21:03 2012 +0100 actor.cpp::update the variables depending on feedback settings diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 5d2974f..0e5a11d 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -1437,14 +1437,19 @@ int IsClassFromName (const char* name) return -1; } -static void InitActorTables() +GEM_EXPORT void UpdateActorConfig() { - int i, j; - core->GetDictionary()->Lookup("Critical Hit Screen Shake", crit_hit_scr_shake); core->GetDictionary()->Lookup("Selection Sounds Frequency", sel_snd_freq); core->GetDictionary()->Lookup("Command Sounds Frequency", cmd_snd_freq); core->GetDictionary()->Lookup("Bored Timeout", bored_time); +} + +static void InitActorTables() +{ + int i, j; + + UpdateActorConfig(); pstflags = !!core->HasFeature(GF_PST_STATE_FLAGS); nocreate = !!core->HasFeature(GF_NO_NEW_VARIABLES); third = !!core->HasFeature(GF_3ED_RULES); diff --git a/gemrb/core/Scriptable/Actor.h b/gemrb/core/Scriptable/Actor.h index d0a9844..5b2610b 100644 --- a/gemrb/core/Scriptable/Actor.h +++ b/gemrb/core/Scriptable/Actor.h @@ -229,6 +229,7 @@ struct WeaponInfo { }; extern void ReleaseMemoryActor(); +GEM_EXPORT void UpdateActorConfig(); //call this from guiscripts when some variable has changed class GEM_EXPORT Actor : public Movable { public: diff --git a/gemrb/plugins/GUIScript/GUIScript.cpp b/gemrb/plugins/GUIScript/GUIScript.cpp index a169dd7..3a6ecc2 100644 --- a/gemrb/plugins/GUIScript/GUIScript.cpp +++ b/gemrb/plugins/GUIScript/GUIScript.cpp @@ -3913,6 +3913,8 @@ static PyObject* GemRB_SetVar(PyObject * /*self*/, PyObject* args) core->GetDictionary()->SetAt( Variable, (ieDword) value ); + //this is a hack to update the settings deeper in the core + UpdateActorConfig(); Py_INCREF( Py_None ); return Py_None; } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |