From: Jaka K. <lyn...@us...> - 2010-05-11 17:14:15
|
gemrb: Infinity Engine emulator The branch master has been updated via 2a94147574018b28764b2cfdbef28f65716f68f6 (commit) Summary of changes: gemrb/core/Actor.cpp | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) from 4c5dd7b45c46923350a010b3c50b91516c009074 (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=2a94147574018b28764b2cfdbef28f65716f68f6 commit 2a94147574018b28764b2cfdbef28f65716f68f6 Author: Jaka Kranjc <lyn...@us...> Date: Tue May 11 19:11:12 2010 +0200 Actor::SetModal now toggles the state to MS_NONE when the new state is the same as the old one, resulting also in proper action bar refreshing. diff --git a/gemrb/core/Actor.cpp b/gemrb/core/Actor.cpp index 8af80a2..b8f2a7f 100644 --- a/gemrb/core/Actor.cpp +++ b/gemrb/core/Actor.cpp @@ -3583,12 +3583,27 @@ void Actor::SetModal(ieDword newstate) default: return; } - //come here only if success - ModalState = newstate; - //update the action bar - if (InParty) + // FIXME: check if toggling should work also for npcs + if (InParty) { + // TODO: display the turning-off message + if (ModalState != MS_NONE) { + printf("Turning off state:%d:\n", ModalState); + } + + // when called with the same state twice, toggle to MS_NONE + if (ModalState == newstate) { + ModalState = MS_NONE; + } else { + ModalState = newstate; + // TODO: display the turning-on message + } + + //update the action bar core->SetEventFlag(EF_ACTION); + } else { + ModalState = newstate; + } } //this is just a stub function for now, attackstyle could be melee/ranged ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |