From 0f9178568b3470d35ffc1d5e21a230d8cc11eef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Mon, 16 Sep 2019 20:32:58 +0300 Subject: Peds, a fix and a tad of VC --- src/core/General.h | 9 +-------- src/core/World.h | 3 ++- 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/General.h b/src/core/General.h index 366c571c..d73cf36f 100644 --- a/src/core/General.h +++ b/src/core/General.h @@ -54,14 +54,7 @@ public: static float LimitRadianAngle(float angle) { - float result; - - if (angle < -25.0f) - result = -25.0f; - else if (angle > 25.0f) - result = 25.0f; - else - result = angle; + float result = clamp(angle, -25.0f, 25.0f); while (result >= PI) { result -= 2 * PI; diff --git a/src/core/World.h b/src/core/World.h index b24e66f0..523585e7 100644 --- a/src/core/World.h +++ b/src/core/World.h @@ -56,9 +56,10 @@ class CWorld static CPtrList &ms_listMovingEntityPtrs; static CSector (*ms_aSectors)[NUMSECTORS_X]; // [NUMSECTORS_Y][NUMSECTORS_X]; static uint16 &ms_nCurrentScanCode; - static CColPoint &ms_testSpherePoint; public: + static CColPoint& ms_testSpherePoint; + static uint8 &PlayerInFocus; static CPlayerInfo *Players; static CEntity *&pIgnoreEntity; -- cgit v1.2.3