summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-09-29 01:30:48 +0200
committereray orçunus <erayorcunus@gmail.com>2020-09-29 01:30:48 +0200
commit7646ceeaaaaf86c4be548d531e59cf81f5220e21 (patch)
treea5daa0fa61395b04de2d4fa28d9fc42f6dd560b4 /src/core
parentRestore All Cars are Heli cheat (diff)
parentMerge pull request #717 from theR4K/miami (diff)
downloadre3-7646ceeaaaaf86c4be548d531e59cf81f5220e21.tar
re3-7646ceeaaaaf86c4be548d531e59cf81f5220e21.tar.gz
re3-7646ceeaaaaf86c4be548d531e59cf81f5220e21.tar.bz2
re3-7646ceeaaaaf86c4be548d531e59cf81f5220e21.tar.lz
re3-7646ceeaaaaf86c4be548d531e59cf81f5220e21.tar.xz
re3-7646ceeaaaaf86c4be548d531e59cf81f5220e21.tar.zst
re3-7646ceeaaaaf86c4be548d531e59cf81f5220e21.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ControllerConfig.cpp2
-rw-r--r--src/core/common.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp
index e7982221..bdfab34c 100644
--- a/src/core/ControllerConfig.cpp
+++ b/src/core/ControllerConfig.cpp
@@ -732,7 +732,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving(int32
if (FindPlayerVehicle() && (FindPlayerVehicle()->IsVehicle() && (
FindPlayerVehicle()->GetModelIndex() == MI_DODO
#ifdef FIX_BUGS
- || CVehicle::bAllDodosCheat
+ || (CVehicle::bAllDodosCheat && !FindPlayerVehicle()->IsRealHeli())
#endif
)))
{
diff --git a/src/core/common.h b/src/core/common.h
index ba1d24ef..0a2a236e 100644
--- a/src/core/common.h
+++ b/src/core/common.h
@@ -219,6 +219,8 @@ extern int strncasecmp(const char *str1, const char *str2, size_t len);
#define clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v))
+#define clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius))
+
inline float sq(float x) { return x*x; }
#define SQR(x) ((x) * (x))