Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
Minor fixes
  • Loading branch information
0x7c13 committed Apr 19, 2022
1 parent a7b6e00 commit 1375a57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Assets/Scripts/Pal3/Actor/ActorActionController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ public void PerformAction(string actionName,

if (mv3File.TagNodes is {Length: > 0} && _actor.GetWeaponName() is {} weaponName &&
!string.Equals(ActorConstants.ActionNames[ActorActionType.Dead], actionName, StringComparison.OrdinalIgnoreCase) &&
!string.Equals(ActorConstants.ActionNames[ActorActionType.Freeze], actionName, StringComparison.OrdinalIgnoreCase))
!string.Equals(ActorConstants.ActionNames[ActorActionType.Freeze], actionName, StringComparison.OrdinalIgnoreCase) &&
!string.Equals(ActorConstants.ActionNames[ActorActionType.BeAttack], actionName, StringComparison.OrdinalIgnoreCase) &&
!string.Equals(ActorConstants.ActionNames[ActorActionType.Attack1], actionName, StringComparison.OrdinalIgnoreCase) &&
!string.Equals(ActorConstants.ActionNames[ActorActionType.Attack2], actionName, StringComparison.OrdinalIgnoreCase))
{
var separator = CpkConstants.CpkDirectorySeparatorChar;

Expand Down Expand Up @@ -246,13 +249,13 @@ private void RenderShadow()

public Bounds GetWorldBounds()
{
return _mv3AnimationRenderer == null ? _worldBounds :
return !_mv3AnimationRenderer.IsVisible() ? _worldBounds :
_mv3AnimationRenderer.GetWorldBounds();
}

public Bounds GetLocalBounds()
{
return _mv3AnimationRenderer == null ? _localBounds :
return !_mv3AnimationRenderer.IsVisible() ? _localBounds :
_mv3AnimationRenderer.GetLocalBounds();
}

Expand Down
5 changes: 4 additions & 1 deletion Assets/Scripts/Pal3/Renderer/Mv3ModelRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ namespace Pal3.Renderer
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Core.DataLoader;
Expand Down Expand Up @@ -409,6 +408,8 @@ private void Dispose()
Destroy(renderMeshComponent.Mesh);
Destroy(renderMeshComponent.MeshRenderer);
}

_renderMeshComponents = null;
}

if (_meshObjects != null)
Expand All @@ -417,6 +418,8 @@ private void Dispose()
{
Destroy(meshObject);
}

_meshObjects = null;
}
}
}
Expand Down

0 comments on commit 1375a57

Please sign in to comment.