diff --git a/Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs b/Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs index 24f42cd40..7dc81ef4b 100644 --- a/Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs +++ b/Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs @@ -473,27 +473,27 @@ public void RequestAction(ActionID actionID, SkillTriggerStyle triggerStyle, ulo void Update() { - if (Input.GetKeyDown(KeyCode.Alpha1)) + if (Input.GetKeyDown(KeyCode.Alpha1) && CharacterClass.Skill1) { RequestAction(actionState1.actionID, SkillTriggerStyle.Keyboard); } - else if (Input.GetKeyUp(KeyCode.Alpha1)) + else if (Input.GetKeyUp(KeyCode.Alpha1) && CharacterClass.Skill1) { RequestAction(actionState1.actionID, SkillTriggerStyle.KeyboardRelease); } - if (Input.GetKeyDown(KeyCode.Alpha2)) + if (Input.GetKeyDown(KeyCode.Alpha2) && CharacterClass.Skill2) { RequestAction(actionState2.actionID, SkillTriggerStyle.Keyboard); } - else if (Input.GetKeyUp(KeyCode.Alpha2)) + else if (Input.GetKeyUp(KeyCode.Alpha2) && CharacterClass.Skill2) { RequestAction(actionState2.actionID, SkillTriggerStyle.KeyboardRelease); } - if (Input.GetKeyDown(KeyCode.Alpha3)) + if (Input.GetKeyDown(KeyCode.Alpha3) && CharacterClass.Skill3) { RequestAction(actionState3.actionID, SkillTriggerStyle.Keyboard); } - else if (Input.GetKeyUp(KeyCode.Alpha3)) + else if (Input.GetKeyUp(KeyCode.Alpha3) && CharacterClass.Skill3) { RequestAction(actionState3.actionID, SkillTriggerStyle.KeyboardRelease); } diff --git a/CHANGELOG.md b/CHANGELOG.md index e69ae48c9..17003298d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ Additional documentation and release notes are available at [Multiplayer Documen ### Cleanup * Removed NetworkObject from MainMenuState (#881) +### Fixed +* Added Null reference check to ClientInputSender to fix null reference for missing ability (#880) + + ## [2.4.0] - 2023-12-13 ### Changed @@ -105,7 +109,7 @@ Additional documentation and release notes are available at [Multiplayer Documen * Updated Boss Room to NGO 1.1.0 (#708) * Now uses managed types for custom INetworkSerializable in NetworkVariables. NetworkGUID is now a class instead of a struct. * Cleanup Relay and UTP setup. Flow is now simpler, no need for the RelayUtilities anymore. - * This cleansup various setup steps and puts them all in a new "ConnectionMethod.cs". + * This cleans up various setup steps and puts them all in a new "ConnectionMethod.cs". * MaxSendQueueSize value is removed, reserialized NetworkManager to remove that now useless value. * Reverted the default value for max payload size, this is no longer useful as NGO is mostly reliable. * Set connection approval timeout higher, 1 sec is pretty short. If there's a packet drop, some hangups on the network, clients would get timedout too easily.