Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix: Added null reference check to ClientInputSender script [MTT-6672] #880

Merged
merged 9 commits into from
Mar 12, 2024
12 changes: 6 additions & 6 deletions Assets/Scripts/Gameplay/UserInput/ClientInputSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com).

### Fixed
* Added Null reference check to ClientInputSender to fix null reference for missing ability (#880)

## [2.4.0] - 2023-12-13

### Changed
Expand Down
Loading