mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-04-28 13:07:59 +03:00
- Added static const int DUCK_DELAY_FRAMES = 30
to define the delay (1 second at 30 FPS).
- Added `int duckFrameCounter` to track frames the duck button is held. - Added `bool isDucking` to track crouch state and prevent re-triggering. - Updated `CPad` constructor to initialize `duckFrameCounter` and `isDucking`.
This commit is contained in:
parent
f7d23f3bb3
commit
d0ea5f41be
1 changed files with 17 additions and 2 deletions
|
@ -173,11 +173,26 @@ public:
|
||||||
uint32 CameraJustUpTime;
|
uint32 CameraJustUpTime;
|
||||||
uint32 CameraLastPressed;
|
uint32 CameraLastPressed;
|
||||||
bool CameraIsDoublePressed;
|
bool CameraIsDoublePressed;
|
||||||
|
static const int DUCK_DELAY_FRAMES = 30; // 1 second at 30 FPS
|
||||||
|
int duckFrameCounter; // Frames the duck button has been held
|
||||||
|
bool isDucking; // Tracks if duck action is active
|
||||||
|
|
||||||
#ifdef DETECT_PAD_INPUT_SWITCH
|
#ifdef DETECT_PAD_INPUT_SWITCH
|
||||||
static bool IsAffectedByController;
|
static bool IsAffectedByController;
|
||||||
#endif
|
#endif
|
||||||
CPad() { }
|
|
||||||
|
CPad() : duckFrameCounter(0), isDucking(false), // New variables initialized
|
||||||
|
SteeringLeftRightBuffer{0}, DrunkDrivingBufferUsed(0), Phase(0), Mode(0),
|
||||||
|
ShakeDur(0), DisablePlayerControls(0), ShakeFreq(0), iCurrHornHistory(0),
|
||||||
|
JustOutOfFrontend(0), bApplyBrakes(0), LastTimeTouched(0), AverageWeapon(0),
|
||||||
|
AverageEntries(0), IsKeyboardMouse(false), IsDualAnalog(false),
|
||||||
|
CameraJustDown(false), CameraJustUp(false), CameraJustUpTime(0),
|
||||||
|
CameraLastPressed(0), CameraIsDoublePressed(false) {
|
||||||
|
Clear(false);
|
||||||
|
memset(bHornHistory, 0, sizeof(bHornHistory));
|
||||||
|
memset(CheatString, 0, sizeof(CheatString));
|
||||||
|
}
|
||||||
|
|
||||||
~CPad() { }
|
~CPad() { }
|
||||||
|
|
||||||
static bool bDisplayNoControllerMessage;
|
static bool bDisplayNoControllerMessage;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue