From: Jaka K. <lyn...@us...> - 2012-10-12 22:42:45
|
gemrb: Infinity Engine emulator The branch master has been updated via 36e3696ad591b76fdea090189c0e67995861ac8a (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) from c666f11ec7217ecc0e72466a686463a777d1752b (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=36e3696ad591b76fdea090189c0e67995861ac8a commit 36e3696ad591b76fdea090189c0e67995861ac8a Author: Jaka Kranjc <lyn...@us...> Date: Sat Oct 13 00:33:40 2012 +0200 only apply detect.spl each tick in iwd2 (since it bundles dayblindess) and once per second elsewhere diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 8eacbb2..c2d6d5d 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -6025,9 +6025,12 @@ void Actor::UpdateActorState(ieDword gameTime) { return; } - //IWD2 has no autodetect, you actually should 'search' + int roundFraction = (gameTime-roundTime) % core->Time.round_size; + //actually, iwd2 has autosearch, also, this is useful for dayblindness - if (InParty && core->HasFeature(GF_AUTOSEARCH_HIDDEN) ) { + //apply the modal effect about every second (pst and iwds have round sizes that are not multiples of 15) + // FIXME: split dayblindness out of detect.spl and only run that each tick + simplify this check + if (InParty && core->HasFeature(GF_AUTOSEARCH_HIDDEN) && (third || ((roundFraction%AI_UPDATE_TIME) == 0))) { core->ApplySpell("detect", this, this, 0); } @@ -6075,7 +6078,7 @@ void Actor::UpdateActorState(ieDword gameTime) { } //apply the modal effect on the beginning of each round - if ((((gameTime-roundTime)%core->Time.round_size)==0)) { + if (roundFraction == 0) { // handle lingering modal spells like bardsong in iwd2 if (modalSpellLingering && LingeringModalSpell[0]) { modalSpellLingering--; ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |