X2CommunityCore / X2WOTCCommunityHighlander

https://steamcommunity.com/workshop/filedetails/?id=1134256495
MIT License
60 stars 69 forks source link

Flight unit dash Melee hang-up problem #1078

Open Alterdrushnano opened 3 years ago

Alterdrushnano commented 3 years ago

I am getting a similar type of error to #1032, but which once caused significant inconvenience. This error obviously didn't happen until at least a year ago, but it's been happening repeatedly in my tests since about 2-3 months ago.

The conditions in which an error occurs are as follows.

  1. Source units with eTraversal_Flying enabled.(Example: Specter)
  2. This source unit uses a Melee skill with a 'dash' function on a target that needs movement (Example: Skulljack, Rend, Shadowbind, Sacrifice)

The moment both conditions are met, a serious hang-up occurs where the game freezes for about 20 seconds or more.In particular, (Example link: https://youtu.be/eLeyg9gg-lA ) this error occurs most dramatically when soldier's Traversal type changing via a skill with X2Effect_PersistentTraversalChange applied. (Example link: https://youtu.be/pK6Ojs6ZMhE ) As a result of profiling, it showed serious performance issues that were nearly 10 times higher. (Normal Rend: 400, Flying Soldier Rend 4800)

It is true that the conditions for this to occur are very demanding (there are no player-controllable flying units in the original XCOM&WoTC). However, this error will occur frequently if the player has a 'Flying soldier'.

Alterdrushnano commented 3 years ago

+@additional

  1. In the original game environment, only Specter satisfies both conditions (air unit, dash melee), but when CHL is disabled, hang-up errors do not occur at all. What this means is that Community Highlander is most likely the source of that error.

  2. Even under the same conditions, this error does not occur if the unit is not actually moving (eg a melee attack against an enemy on the near by tile). The bug only occurs if the unit is really moving and MeleePath is triggered accordingly.

Alterdrushnano commented 3 years ago

I've found an issue that appears to be related. RustyDios say:

"I think this issue may be related to the X2MeleePathingPawn (as it's not happening for side-by-side melee, but is for moving-distance melee) ... issue #520 adds an extra thing for cursors/controllers . . which is the only highlander change I can see from my SrcOrig > SrcCHL other than a lot of private/protected removals "(2021/10/09)

Alterdrushnano commented 3 years ago

+@ Testing the proximity of flying units with version 1.19 of CHL only found very low levels of hangup. AS result, it seems CHL caused this bug during the 1.2ver update because this error did not occur in the old version

Xymanek commented 3 years ago

The problem seems to quite inconsistent (and probably depends on something happening) - for example, here's a templar rend with an endless horde of lost and psi zombies on the field, which suffers almost no hang (some minor hitches are still noticable though): https://youtu.be/wqZ4M_LlnF0?t=2204