File information

Last updated

Original upload

Created by

me

Uploaded by

ExpensiveLadder

Virus scan

Safe to use

About this mod

Fixes MagicPlayEffectShaderOnHitScript used by armor spells

Requirements
Permissions and credits
The script is used by armor spells to cause an effect to play whenever you are hit, however, this effect can cause performance issues when you are hit rapidly
The script also does not discern if a "hit" is actually damaging
This mod simply replaces the OnHit event used by the script with the event OnImpact

This event triggers in the same situations as the standard OnHit event, except:
  •     It tries to avoid triggering more than once per frame for the same pairing of akAggressor + target (self) 
  • For example, the regular OnHit event may trigger many times within a single frame for a single hit by a poisoned/enchanted weapon, which can cause numerous performance issues. OnImpact will only trigger once.
  •     It does not trigger if there is no Source (akSource == None), no Projectile (akProjectile == None), and no bash attack (abBashAttack == False).
  •     It does not trigger for hits by Concentration spells.
  •     It does not trigger for Touch or Self-cast spells.
  •     It does not trigger for spells that are not hostile.