From b956be0f44930fe1d764c07e680f7cee47c1587a Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Sun, 27 Sep 2020 04:22:59 +0300 Subject: another clamp --- src/core/common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core') 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)) -- cgit v1.2.3 From ca73f0344ca61b4741b392fa0332d42d623625ff Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Mon, 28 Sep 2020 01:38:05 +0300 Subject: fixed original bug, when heli go ma if cars fly cheat activated --- src/core/ControllerConfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp index b0e04e2b..68a29b28 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()) #ifdef ALLCARSHELI_CHEAT || bAllCarCheat #endif -- cgit v1.2.3