Skyrim

File information

Last updated

Original upload

Created by

wyvern236

Uploaded by

wyvern236

Virus scan

Safe to use

About this mod

Fixes the problem that resulted in permanent lag when Sunhallowed arrows are fired into the sun.

Permissions and credits
At the conclusion of the sunburst effect after firing Sunhallowed arrows into the sun, the game might (depending on your Papyrus INI settings) become permanently laggy or choppy. This script should hopefully fix that.

Requires Dawnguard, naturally.

Installation
Extract into your Skyrim Data/Scripts folder.

There's no forseeable reason why this modification should cause problems, but it's a good idea in general to make a backup save or two before installing any mod.

Uninstallation
Delete DLC1MagicCastFromSunScript.pex from Data/Scripts. To be safe, don't do this while the sunburst effect is active.

Compatibility
Potentially incompatible with mods that affect the sunburst effect and/or replace DLC1MagicCastFromSunScript.pex

Details
In DLC1MagicCastFromSunScript.OnEffectFinish, busy loops are present to wait for the sun spell and explosions to finish. The issue is that the loops never yield, thus preventing the other functions in the script from properly setting the bFunctionRunningSunSpell to false. Consequently, Papyrus gets permanently hung up on the loop. The resolution is to add a short delay (0.1s) into the loop, which allows the CastSpellFromSun function to finish execution and set the variable to false.

Note that only the sun spell loop has been modified, as I didn't notice the RunningExplosion loop causing issues.