From: Jaka K. <lyn...@us...> - 2012-05-25 16:17:20
|
gemrb: Infinity Engine emulator The branch master has been updated via 4781a08ea4e15019c9ab90ff0f685dd0122f0283 (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) from 2fb34db4118ff15f2771da904476d8405fc1a95a (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=4781a08ea4e15019c9ab90ff0f685dd0122f0283 commit 4781a08ea4e15019c9ab90ff0f685dd0122f0283 Author: Jaka Kranjc <lyn...@us...> Date: Fri May 25 18:13:20 2012 +0200 recover from panic when morale rises over moralebreak again diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index f162ac9..c718252 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -836,6 +836,13 @@ void pcf_morale (Actor *actor, ieDword /*oldValue*/, ieDword /*newValue*/) { if ((actor->Modified[IE_MORALE]<=actor->Modified[IE_MORALEBREAK]) && (actor->Modified[IE_MORALEBREAK] != 0) ) { actor->Panic(core->GetGame()->GetActorByGlobalID(actor->LastAttacker), core->Roll(1,3,0) ); + } else if (actor->Modified[IE_STATE_ID]&STATE_PANIC) { + // recover from panic, since morale has risen again + // but only if we have really just recovered, so panic from other + // sources isn't affected + if ((actor->Modified[IE_MORALE]-1 == actor->Modified[IE_MORALEBREAK]) || (actor->Modified[IE_MORALEBREAK] == 0) ) { + actor->SetBaseBit(IE_STATE_ID, STATE_PANIC, false); + } } //for new colour actor->SetCircleSize(); ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |