From 0625954bb74e687ed73b496bc06e9db58407e045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sat, 20 Jun 2020 16:23:32 +0300 Subject: Ducking, shooting vehicle occupants and weapon fixes --- src/core/Pad.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/Pad.cpp') diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index ab66dd9b..084fe888 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -2336,6 +2336,14 @@ bool CPad::TargetJustDown(void) return false; } +bool CPad::DuckJustDown(void) +{ + if (ArePlayerControlsDisabled()) + return false; + + return !!(NewState.LeftShock && !OldState.LeftShock); +} + bool CPad::JumpJustDown(void) { if ( ArePlayerControlsDisabled() ) -- cgit v1.2.3