Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 8b03eef

Browse files
committed
add header changes
1 parent e6150ca commit 8b03eef

File tree

1 file changed

+14
-29
lines changed

1 file changed

+14
-29
lines changed

Managers/UInputMan.h

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -578,23 +578,7 @@ namespace RTE {
578578
/// <param name="player">Which player to set for.</param>
579579
/// <param name="element">Which input element to set for.</param>
580580
/// <param name="state">The new state of the input element. True or false.</param>
581-
void SetNetworkInputElementHeldState(int player, int element, bool state) { SetNetworkInputElementState(player, element, InputState::Held, state); }
582-
583-
/// <summary>
584-
/// Sets whether an input element is pressed by a player during network multiplayer.
585-
/// </summary>
586-
/// <param name="player">Which player to set for.</param>
587-
/// <param name="element">Which input element to set for.</param>
588-
/// <param name="state">The new state of the input element. True or false.</param>
589-
void SetNetworkInputElementPressedState(int player, int element, bool state) { SetNetworkInputElementState(player, element, InputState::Pressed, state); }
590-
591-
/// <summary>
592-
/// Sets whether an input element is released by a player during network multiplayer.
593-
/// </summary>
594-
/// <param name="player">Which player to set for.</param>
595-
/// <param name="element">Which input element to set for.</param>
596-
/// <param name="state">The new state of the input element. True or false.</param>
597-
void SetNetworkInputElementReleasedState(int player, int element, bool state) { SetNetworkInputElementState(player, element, InputState::Released, state); }
581+
void SetNetworkInputElementState(int player, int element, bool state);
598582

599583
/// <summary>
600584
/// Sets whether a mouse button is held by a player during network multiplayer.
@@ -698,9 +682,12 @@ namespace RTE {
698682
/// </summary>
699683
bool m_PrepareToEnableMouseMoving;
700684

701-
bool m_NetworkAccumulatedElementState[InputElements::INPUT_COUNT][InputState::InputStateCount]; //!< The state of an input element during network multiplayer.
702-
bool m_NetworkInputElementState[Players::MaxPlayerCount][InputElements::INPUT_COUNT][InputState::InputStateCount]; //!< The state of a player's input element during network multiplayer.
703-
bool m_NetworkMouseButtonState[Players::MaxPlayerCount][MouseButtons::MAX_MOUSE_BUTTONS][InputState::InputStateCount]; //!< The state of a player's mouse button during network multiplayer.
685+
bool m_NetworkAccumulatedElementState[InputElements::INPUT_COUNT][InputState::InputStateCount]; //!< The state of a client input element during network multiplayer.
686+
bool m_NetworkServerChangedInputElementState[Players::MaxPlayerCount][InputElements::INPUT_COUNT]; //!< The server side state of a player's input element during network multiplayer.
687+
688+
std::array<std::array<bool, InputElements::INPUT_COUNT>, Players::MaxPlayerCount> m_NetworkServerPreviousInputElementState;
689+
bool m_NetworkServerChangedMouseButtonState[Players::MaxPlayerCount][MouseButtons::MAX_MOUSE_BUTTONS]; //!< The state of a player's mouse button during network multiplayer.
690+
std::array<std::array<bool, InputElements::INPUT_COUNT>, Players::MaxPlayerCount> m_NetworkServerPreviousMouseButtonState;
704691

705692
Vector m_NetworkAccumulatedRawMouseMovement[Players::MaxPlayerCount]; //!< The position of the mouse for each player during network multiplayer.
706693
Vector m_NetworkAnalogMoveData[Players::MaxPlayerCount]; //!< Mouse analog movement data for each player during network multiplayer.
@@ -732,6 +719,8 @@ namespace RTE {
732719
/// <returns>Whether the element is in the specified state or not.</returns>
733720
bool GetInputElementState(int whichPlayer, int whichElement, InputState whichState);
734721

722+
bool GetNetworkInputElementState(int whichPlayer, int whichElement, InputState whichState);
723+
735724
/// <summary>
736725
/// Gets whether any generic button with the menu cursor is in the specified state.
737726
/// </summary>
@@ -776,15 +765,6 @@ namespace RTE {
776765
/// <returns>Whether the joystick stick axis is in the specified state or not.</returns>
777766
bool GetJoystickDirectionState(int whichJoy, int whichAxis, int whichDir, InputState whichState) const;
778767

779-
/// <summary>
780-
/// Sets an input element of a player to the specified state during network multiplayer.
781-
/// </summary>
782-
/// <param name="player">Which player to set for. See Players enumeration.</param>
783-
/// <param name="element">Which element to set. See InputElements enumeration.</param>
784-
/// <param name="whichState">Which input state to set. See InputState enumeration.</param>
785-
/// <param name="newState">The new state of the specified InputState. True or false.</param>
786-
void SetNetworkInputElementState(int player, int element, InputState whichState, bool newState);
787-
788768
/// <summary>
789769
/// Sets a mouse button for a player to the specified state during network multiplayer.
790770
/// </summary>
@@ -816,6 +796,11 @@ namespace RTE {
816796
/// </summary>
817797
void UpdateNetworkMouseMovement();
818798

799+
/// <summary>
800+
/// Clear all NetworkServerChanged* arrays.
801+
/// </summary>
802+
void ClearNetworkChangedState();
803+
819804
/// <summary>
820805
/// Handles the mouse input. This is called from Update().
821806
/// </summary>

0 commit comments

Comments
 (0)