Dev build/Linux: exception in OrientEnemy [RESOLVED]

Post Reply
User avatar
Posts: 804
Joined: Wed Jul 18, 2018 6:14 pm
Location: France

Dev build/Linux: exception in OrientEnemy [RESOLVED]

Post by pango » Sun Jan 13, 2019 10:54 am

Issue seems to happen the most often with (Frost?) daedra: all the sudden they're blocked in some direction, with wrong aspect ratio, moving slowly.

An exception is repeatedly raised in OrientEnemy, from what I understand because currentFrame == -1:

Code: Select all

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[UnityEngine.Texture2D].get_Item (Int32 index) [0x00000] in <filename unknown>:0
  at DaggerfallWorkshop.DaggerfallMobileUnit.OrientEnemy (Int32 orientation) [0x00000] in <filename unknown>:0
  at DaggerfallWorkshop.DaggerfallMobileUnit.UpdateOrientation () [0x00000] in <filename unknown>:0
  at DaggerfallWorkshop.DaggerfallMobileUnit.Update () [0x00000] in <filename unknown>:0

Savegame in some cave behind some idle Frost daedra; If awaken it usually quickly triggers the bug.
(501.41 KiB) Downloaded 7 times
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Posts: 760
Joined: Wed Sep 14, 2016 6:22 pm

Re: Dev build/Linux: exception in OrientEnemy

Post by TheLacus » Mon Jan 21, 2019 9:42 pm

@Interkarma What does -1 represents for an attack animation frame?
UV on classic atlas use the frame as an offset so i think is not intentional to have -1 to reach texture refresh method.
If you are interested in creating mods for Daggerfall Unity you can find the documentation here.

User avatar
Posts: 4022
Joined: Sun Mar 22, 2015 1:51 am

Re: Dev build/Linux: exception in OrientEnemy

Post by Interkarma » Mon Jan 21, 2019 10:02 pm

The -1 is specific to how Allofich has matched animation frames to classic. It should be getting handled in DaggerfallMobileUnit around line 499. Enemy will attack or shoot then progress to next frame in sequence.

There's possibly an edge case of some kind where the wrong index is computed. Anything to do with enemy animations falls mainly into Allofich's wheelhouse, he has a deeper understanding than myself.

Edit: Allofich has a much better description of the -1 in his PR here to fix this. I'm merging this now and it should be fixed in next builds.

Post Reply