Skip to content

Commit

Permalink
wip fix reload buggerino
Browse files Browse the repository at this point in the history
  • Loading branch information
toberge committed Jul 2, 2024
1 parent 6944a9b commit 5e4c896
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
9 changes: 8 additions & 1 deletion Assets/Animation/Augments/Lazur/Cannon_CannonAction.anim
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,7 @@ AnimationClip:
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1.3166667
m_StopTime: 1.3333334
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
Expand Down Expand Up @@ -11057,3 +11057,10 @@ AnimationClip:
floatParameter: 0
intParameter: 0
messageOptions: 0
- time: 1.3333334
functionName: EndFiring
data:
objectReferenceParameter: {fileID: 0}
floatParameter: 0
intParameter: 0
messageOptions: 0
10 changes: 5 additions & 5 deletions Assets/Animation/Augments/Lazur/Lazur.controller
Original file line number Diff line number Diff line change
Expand Up @@ -167,31 +167,31 @@ AnimatorController:
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: Outer
m_Type: 1
m_DefaultFloat: 0.2
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: Inner
m_Type: 1
m_DefaultFloat: -0.3
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: Spinner
m_Type: 1
m_DefaultFloat: 3
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
- m_Name: Spiral
m_Type: 1
m_DefaultFloat: -0.25
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
Expand Down
10 changes: 8 additions & 2 deletions Assets/LazurFiringAnimator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ public void PlayChargeUpSound()

public void ShootLazer()
{
this.OnShotFiredAnimation?.Invoke();
this.OnAnimationEnd?.Invoke();
Debug.Log("SHOOP DA WOOP");
OnShotFiredAnimation?.Invoke();
}

public void EndFiring()
{
Debug.Log("SHOOP DONE");
OnAnimationEnd?.Invoke();
}

public override void OnFire(GunStats stats)
Expand Down
6 changes: 3 additions & 3 deletions Assets/Models/GunParts/CoilBarrel.fbx.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/Scripts/Augment/AugmentImplementations/Revolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ protected override void Reload(GunStats stats)
extension.transform.SetParent(attachmentSite, true);

animator.SetTrigger("Reload");
gunController.onReload?.Invoke(stats);
}

public void TriggerSteam()
Expand Down Expand Up @@ -92,6 +91,7 @@ public void ResetReload()
if (extension)
extension.transform.SetParent(gunController.transform, true);
gunController.Reload(reloadEfficiencyPercentage);
gunController.onReload?.Invoke(gunController.stats);
}

}
2 changes: 1 addition & 1 deletion Assets/Scripts/Augment/GunController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private void RpcFireWithNoAmmo()

private void FireGun()
{
if (stats.Ammo <= 0)
if (stats.Ammo < 1)
{
CmdFireWithNoAmmo();
return;
Expand Down

0 comments on commit 5e4c896

Please sign in to comment.