Jump to content


Photo

[COMPLETE] Targetting Dead Animations Fix


  • Please log in to reply
No replies to this topic

#1 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 29 January 2011 - 04:46 AM

This one's a tricky one...

-----900 Targetting Dead Animations Fix [F]
Fixes a broad bug where the dead creatures that are not transferred to the middle vertical list can be targetted by AI, triggers and actions

Brief Explanation
Vertical lists are implemented by areas to determine drawing order
There are three vertical lists: LIST_FRONT, LIST_MIDDLE, LIST_BACK
AI targetting generally includes only active creatures in LIST_FRONT
When most creatures die, they are transferred from LIST_FRONT to LIST_MIDDLE
However, some creature animations are coded to disallow use of LIST_MIDDLE; when they die, they stay in LIST_FRONT
AI targetting does not account for this, and so dead creatures in LIST_FRONT can still be targetted by AI, triggers and actions (e.g. AttackReevaluate)
Animations affected by this are: 0x6404 SAREVOK, 0x4XXX STATIC_* (SLEEPING_* are excluded based on STATE_SLEEPING)
This hack correct this issue by preventing dead creatures in LIST_FRONT and are disallowed use of LIST_MIDDLE from being targetted

Options:
-0: disabled
-1: enabled


Essentially, this bugfix prevents things from going a bit funny when fighting in taverns and whatnot and the whole customer base goes hostile! (most people would reload when that happens).

Probably the most notable bug fix here is that characters are no longer permanently in berserk in the presence of a dead Centeol (BGT) or dead sitting peasants...

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)