Skip to content

Commit

Permalink
Try to fix conflicts with noclippy/xivalex.
Browse files Browse the repository at this point in the history
  • Loading branch information
awgil committed Feb 14, 2024
1 parent 49b62f3 commit 0f87cf3
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions BossMod/Framework/ActionManagerEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ private bool UseActionLocationDetour(ActionManager* self, ActionType actionType,

private void ProcessPacketActionEffectDetour(uint casterID, FFXIVClientStructs.FFXIV.Client.Game.Character.BattleChara* casterObj, Vector3* targetPos, Network.ServerIPC.ActionEffectHeader* header, ulong* effects, ulong* targets)
{
var packetAnimLock = header->animationLockTime;
if (ActionEffectReceived != null)
{
// note: there's a slight difference with dispatching event from here rather than from packet processing (ActionEffectN) functions
Expand Down Expand Up @@ -412,9 +413,18 @@ private void ProcessPacketActionEffectDetour(uint casterID, FFXIVClientStructs.F
float adjDelay = animLockDelay;
if (adjDelay > AnimationLockDelayMax)
{
animLockReduction = Math.Min(adjDelay - AnimationLockDelayMax, currAnimLock);
adjDelay -= animLockReduction;
Utils.WriteField(_inst, 8, currAnimLock - animLockReduction);
// sanity check for plugin conflicts
if (header->animationLockTime != packetAnimLock || packetAnimLock % 0.01 is >= 0.0005f and <= 0.0095f)
{
Service.Log($"[AMEx] Unexpected animation lock {packetAnimLock:f} -> {header->animationLockTime:f}, disabling anim lock tweak feature");
Config.RemoveAnimationLockDelay = false;
}
else
{
animLockReduction = Math.Min(adjDelay - AnimationLockDelayMax, currAnimLock);
adjDelay -= animLockReduction;
Utils.WriteField(_inst, 8, currAnimLock - animLockReduction);
}
}
AnimationLockDelayAverage = adjDelay * (1 - AnimationLockDelaySmoothing) + AnimationLockDelayAverage * AnimationLockDelaySmoothing;
}
Expand Down

0 comments on commit 0f87cf3

Please sign in to comment.