Skip to content

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

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down