Skip to content

Commit

Permalink
Fix Warnings
Browse files Browse the repository at this point in the history
Ignore the bangs, if you don't think about them, they don't exist 馃憤
  • Loading branch information
Minmoose committed Jun 4, 2024
1 parent fbf0f3e commit f57d372
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Brio/Capabilities/Actor/ActionTimelineCapability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void ResetSlotSpeedOverride(ActionTimelineSlots slot)
public unsafe void ApplyBaseOverride(ushort actionTimeline, bool interrupt)
{
if(_originalBaseAnimation == null)
_originalBaseAnimation = new(Character.Native()->EventState, Character.Native()->ModeParam, Character.Native()->ActionTimelineManager.BaseOverride);
_originalBaseAnimation = new(Character.Native()->Mode, Character.Native()->ModeParam, Character.Native()->ActionTimelineManager.BaseOverride);

var chara = Character.Native();

Expand All @@ -99,7 +99,7 @@ public unsafe void ResetBaseOverride()
var chara = Character.Native();

chara->ActionTimelineManager.BaseOverride = _originalBaseAnimation.Value.OriginalTimeline;
chara->EventState = _originalBaseAnimation.Value.OriginalMode;
chara->Mode = _originalBaseAnimation.Value.OriginalMode;
chara->ModeParam = _originalBaseAnimation.Value.OriginalInput;

_originalBaseAnimation = null;
Expand Down Expand Up @@ -131,5 +131,5 @@ public override void Dispose()
return null;
}

public record struct OriginalBaseAnimation(byte OriginalMode, byte OriginalInput, ushort OriginalTimeline);
public record struct OriginalBaseAnimation(CharacterModes OriginalMode, byte OriginalInput, ushort OriginalTimeline);
}
2 changes: 2 additions & 0 deletions Brio/Game/Posing/PoseImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ namespace Brio.Game.Posing;

internal class PoseImporter(PoseFile poseFile, PoseImporterOptions options, bool asExpression = false)
{
public bool AsExpression => asExpression;

public void ApplyBone(Bone bone, BonePoseInfo poseInfo)
{
if(poseInfo.Slot == PoseInfoSlot.Character)
Expand Down
4 changes: 2 additions & 2 deletions Brio/IPC/GlamourerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal class GlamourerService : IDisposable
private readonly Glamourer.Api.IpcSubscribers.ApiVersion _glamourerApiVersions;
private readonly Glamourer.Api.IpcSubscribers.RevertState _glamourerRevertCharacter;

private Glamourer.Api.IpcSubscribers.Legacy.RevertCharacter _gLegacyRevertCharacter;
private Glamourer.Api.IpcSubscribers.Legacy.RevertCharacter? _gLegacyRevertCharacter;

public GlamourerService(DalamudPluginInterface pluginInterface, ConfigurationService configurationService, GPoseService gPoseService, IFramework framework, ActorRedrawService redrawService)
{
Expand Down Expand Up @@ -116,7 +116,7 @@ public Task RevertCharacter(Character? character)

if(GlamourerUseLegacyApi)
{
_gLegacyRevertCharacter.Invoke(character);
_gLegacyRevertCharacter?.Invoke(character);
}
else
{
Expand Down
12 changes: 6 additions & 6 deletions Brio/IPC/PenumbraService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ internal class PenumbraService : IDisposable
private readonly SetCollectionForObject _penumbraSetCollectionForObject;
private readonly GetCollectionForObject _penumbraGetCollectionForObject;

private Penumbra.Api.IpcSubscribers.Legacy.GetCollectionForObject _pLegacyGetCollectionForObject;
private Penumbra.Api.IpcSubscribers.Legacy.SetCollectionForObject _pLegacySetCollectionForObject;
private Penumbra.Api.IpcSubscribers.Legacy.GetCollections _pLegacyGetCollections;
private Penumbra.Api.IpcSubscribers.Legacy.GetCollectionForObject? _pLegacyGetCollectionForObject;
private Penumbra.Api.IpcSubscribers.Legacy.SetCollectionForObject? _pLegacySetCollectionForObject;
private Penumbra.Api.IpcSubscribers.Legacy.GetCollections? _pLegacyGetCollections;

public PenumbraService(DalamudPluginInterface pluginInterface, ConfigurationService configurationService)
{
Expand Down Expand Up @@ -117,7 +117,7 @@ public string GetCollectionForObject(GameObject gameObject)
{
if(PenumbraUseLegacyApi)
{
var (_, _, name) = _pLegacyGetCollectionForObject.Invoke(gameObject.ObjectIndex);
var (_, _, name) = _pLegacyGetCollectionForObject!.Invoke(gameObject.ObjectIndex);
return name;
}

Expand All @@ -128,7 +128,7 @@ public string GetCollectionForObject(GameObject gameObject)
public string LegacySetCollectionForObject(GameObject gameObject, string collectionName)
{
Brio.Log.Debug($"Setting GameObject {gameObject.ObjectIndex} collection to {collectionName}");
var (_, name) = _pLegacySetCollectionForObject.Invoke(gameObject.ObjectIndex, collectionName.ToString(), true, true);
var (_, name) = _pLegacySetCollectionForObject!.Invoke(gameObject.ObjectIndex, collectionName.ToString(), true, true);
return name;
}
public Guid SetCollectionForObject(GameObject gameObject, Guid collectionName)
Expand All @@ -140,7 +140,7 @@ public Guid SetCollectionForObject(GameObject gameObject, Guid collectionName)

public IEnumerable<string> LegacyGetCollections()
{
return _pLegacyGetCollections.Invoke();
return _pLegacyGetCollections!.Invoke();
}
public Dictionary<Guid, string> GetCollections()
{
Expand Down

0 comments on commit f57d372

Please sign in to comment.