mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 10:32:27 +00:00
- Ensure crouch_toggle
is cleared when clearing all input.
This commit is contained in:
parent
f35e8eecf1
commit
22077c5b50
2 changed files with 14 additions and 6 deletions
|
@ -80,6 +80,19 @@ bool scaletozero(DAngle& angle, const double scale, const double push)
|
|||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Clears entire game input state.
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void GameInput::Clear()
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
crouch_toggle = false;
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Player's movement function, called from game's ticker or from gi->doPlayerMovement() as required.
|
||||
|
|
|
@ -60,12 +60,6 @@ public:
|
|||
ActionsToSend |= action;
|
||||
}
|
||||
|
||||
// Clear all values within this object.
|
||||
void Clear()
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
}
|
||||
|
||||
// Receives mouse input from OS for processing.
|
||||
void MouseAddToPos(float x, float y)
|
||||
{
|
||||
|
@ -77,6 +71,7 @@ public:
|
|||
void processMovement(PlayerAngles* const plrAngles, const float scaleAdjust, const int drink_amt = 0, const bool allowstrafe = true, const float turnscale = 1.f);
|
||||
void processVehicle(PlayerAngles* const plrAngles, const float scaleAdjust, const float baseVel, const float velScale, const bool canMove, const bool canTurn, const bool attenuate);
|
||||
void getInput(const double scaleAdjust, InputPacket* packet = nullptr);
|
||||
void Clear();
|
||||
};
|
||||
|
||||
struct PlayerAngles
|
||||
|
|
Loading…
Reference in a new issue