From a52bf9139d936ba26c3b869b5c99906a5db062a4 Mon Sep 17 00:00:00 2001 From: Hazim Bin Ijaz Date: Tue, 11 Mar 2025 05:53:15 +0500 Subject: [PATCH] Fixed a few bugs --- Assets/Scenes/BossRoom.unity | 11 +++++------ Assets/Scripts/Gameplay/AbilitySystem.cs | 2 +- .../Scripts/Gameplay/UserInput/ClientInputSender.cs | 10 ++++++++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Assets/Scenes/BossRoom.unity b/Assets/Scenes/BossRoom.unity index 42134d45..fdb06e5e 100644 --- a/Assets/Scenes/BossRoom.unity +++ b/Assets/Scenes/BossRoom.unity @@ -19212,11 +19212,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.y - value: 0.28987607 + value: 0.28987613 objectReference: {fileID: 0} - target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.z - value: -0.18152031 + value: -0.18152039 objectReference: {fileID: 0} - target: {fileID: 1676734516302391364, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_UpdateMethod @@ -19268,7 +19268,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.w - value: 0.8027669 + value: 0.80276686 objectReference: {fileID: 0} - target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.x @@ -19276,11 +19276,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.y - value: 0.29218328 + value: 0.2921833 objectReference: {fileID: 0} - target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_LocalRotation.z - value: -0.17778282 + value: -0.17778286 objectReference: {fileID: 0} - target: {fileID: 1676734516866984540, guid: 0193228de87741d40a42e561901c9083, type: 3} propertyPath: m_VerticalDamping @@ -282888,7 +282888,6 @@ MonoBehaviour: CrowButtons: - {fileID: 517697839} - {fileID: 279428266} - - {fileID: 960617631} OtherButtons: - {fileID: 5277713032040811801} - {fileID: 308008434} diff --git a/Assets/Scripts/Gameplay/AbilitySystem.cs b/Assets/Scripts/Gameplay/AbilitySystem.cs index 70a91980..8050fdb1 100644 --- a/Assets/Scripts/Gameplay/AbilitySystem.cs +++ b/Assets/Scripts/Gameplay/AbilitySystem.cs @@ -397,7 +397,7 @@ public class AbilitySystem : NetworkBehaviour { GameObject indicator = activeAbility.abilityKey == "VectorFence" ? wallIndicator : currentAbilityIndicator; startPosition = indicator.transform.position; - direction = indicator.transform.forward; + direction = indicator.transform.rotation.eulerAngles; } if (!IsPlacementWithinRadius(startPosition)) diff --git a/Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs b/Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs index 0c0ab9ce..00dba5ec 100644 --- a/Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs +++ b/Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs @@ -580,6 +580,11 @@ namespace Unity.BossRoom.Gameplay.UserInput } if (CnInputManager.GetButtonDown(GameDataSource.Instance.FreezeThrowAbilityKey) || Input.GetKeyDown(KeyCode.R)) // Freeze Throw { + if (m_ServerCharacter.IsCrow) + { + m_UIMessageFeed.DisplayMessage("Ability not available for crow"); + return; + } ActivateAbilityIfAllowed(GameDataSource.Instance.FreezeThrowAbilityKey); } if (CnInputManager.GetButtonDown(GameDataSource.Instance.VectorWallAbilityKey) || Input.GetKeyDown(KeyCode.F)) // Vector Wall @@ -867,6 +872,11 @@ namespace Unity.BossRoom.Gameplay.UserInput } if (CnInputManager.GetButtonDown(GameDataSource.Instance.FreezeThrowAbilityKey)) { + if (m_ServerCharacter.IsCrow) + { + m_UIMessageFeed.DisplayMessage("Ability not available for crow"); + return; + } ActivateAbilityIfAllowed(GameDataSource.Instance.FreezeThrowAbilityKey); } if (CnInputManager.GetButtonDown("VectorWall"))