From: Jaka K. <lyn...@us...> - 2010-05-04 22:11:54
|
gemrb: Infinity Engine emulator The branch master has been updated via 3641a047ee8821f0ee7ce6151850bd5def63ebf3 (commit) Summary of changes: gemrb/core/Actor.cpp | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) from 4e06c5814855f14c16d2ce57388bb0082c32a7a2 (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=3641a047ee8821f0ee7ce6151850bd5def63ebf3 commit 3641a047ee8821f0ee7ce6151850bd5def63ebf3 Author: Jaka Kranjc <lyn...@us...> Date: Wed May 5 00:01:42 2010 +0200 implemented stunning damage handling at death point; seems to work fine, but there is probably a bug in the effect, since the target wakes up immediately diff --git a/gemrb/core/Actor.cpp b/gemrb/core/Actor.cpp index 28b2a26..c3afb63 100644 --- a/gemrb/core/Actor.cpp +++ b/gemrb/core/Actor.cpp @@ -2375,6 +2375,8 @@ bool Actor::HandleCastingStance(const ieResRef SpellResRef, bool deplete) return false; } +static EffectRef fx_sleep_ref={"State:Helpless", NULL, -1}; + //returns actual damage int Actor::Damage(int damage, int damagetype, Scriptable *hitter, int modtype) { @@ -2412,7 +2414,16 @@ int Actor::Damage(int damage, int damagetype, Scriptable *hitter, int modtype) DisplayCombatFeedback(damage, resisted, damagetype, (Actor *)hitter); - NewBase(IE_HITPOINTS, (ieDword) -damage, MOD_ADDITIVE); + // common fists do normal damage, but cause sleeping for a round instead of death + if ((damagetype & DAMAGE_STUNNING) && Modified[IE_MINHITPOINTS] <= 0 && BaseStats[IE_HITPOINTS] <= (ieDword) damage) { + NewBase(IE_HITPOINTS, 1, MOD_ABSOLUTE); + Effect *fx = EffectQueue::CreateEffect(fx_sleep_ref, 0, 0, FX_DURATION_INSTANT_LIMITED); + fx->Duration = 6; // 1 round + core->ApplyEffect(fx, this, this); + delete fx; + } else { + NewBase(IE_HITPOINTS, (ieDword) -damage, MOD_ADDITIVE); + } LastDamage=damage; InternalFlags|=IF_ACTIVE; ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |