summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-15 22:28:09 +0200
committerGitHub <noreply@github.com>2020-04-15 22:28:09 +0200
commit5cb7e2e42a17104a80053f1219ebbb022ff1dea1 (patch)
treec59643f93c566c0813551f0b59596d44573c7c5b /src/core
parentMerge pull request #429 from Nick007J/master (diff)
parentfixed crash (diff)
downloadre3-5cb7e2e42a17104a80053f1219ebbb022ff1dea1.tar
re3-5cb7e2e42a17104a80053f1219ebbb022ff1dea1.tar.gz
re3-5cb7e2e42a17104a80053f1219ebbb022ff1dea1.tar.bz2
re3-5cb7e2e42a17104a80053f1219ebbb022ff1dea1.tar.lz
re3-5cb7e2e42a17104a80053f1219ebbb022ff1dea1.tar.xz
re3-5cb7e2e42a17104a80053f1219ebbb022ff1dea1.tar.zst
re3-5cb7e2e42a17104a80053f1219ebbb022ff1dea1.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/General.h5
-rw-r--r--src/core/Pad.cpp2
-rw-r--r--src/core/World.cpp1
-rw-r--r--src/core/World.h2
-rw-r--r--src/core/main.cpp3
5 files changed, 12 insertions, 1 deletions
diff --git a/src/core/General.h b/src/core/General.h
index f32846eb..77828854 100644
--- a/src/core/General.h
+++ b/src/core/General.h
@@ -90,6 +90,11 @@ public:
return -Atan2(x / y, 1.0f);
}
}
+
+ static float GetAngleBetweenPoints(float x1, float y1, float x2, float y2)
+ {
+ return RADTODEG(GetRadianAngleBetweenPoints(x1, y1, x2, y2));
+ }
// should return direction in 0-8 range. fits perfectly to peds' path directions.
static int GetNodeHeadingFromVector(float x, float y)
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index f83998b8..201dc5b6 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -644,6 +644,8 @@ void CPad::AddToCheatString(char c)
{
for ( int32 i = ARRAY_SIZE(CheatString) - 2; i >= 0; i-- )
CheatString[i + 1] = CheatString[i];
+
+ CheatString[0] = c;
#define _CHEATCMP(str) strncmp(str, CheatString, sizeof(str)-1)
// "4414LDRULDRU" - R2 R2 L1 R2 LEFT DOWN RIGHT UP LEFT DOWN RIGHT UP
diff --git a/src/core/World.cpp b/src/core/World.cpp
index 289be256..313b958a 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -58,6 +58,7 @@ WRAPPER void CWorld::ClearPedsFromArea(float, float, float, float, float, float)
WRAPPER void CWorld::CallOffChaseForArea(float, float, float, float) { EAXJMP(0x4B5530); }
WRAPPER void CWorld::TriggerExplosion(const CVector& a1, float a2, float a3, CEntity *a4, bool a5) { EAXJMP(0x4B1140); }
WRAPPER void CWorld::SetPedsOnFire(float, float, float, float, CEntity*) { EAXJMP(0x4B3D30); }
+WRAPPER void CWorld::UseDetonator(CEntity *) { EAXJMP(0x4B4650); }
void
CWorld::Initialise()
diff --git a/src/core/World.h b/src/core/World.h
index 62fdc3b3..d3f1e2d5 100644
--- a/src/core/World.h
+++ b/src/core/World.h
@@ -142,6 +142,8 @@ public:
static void RemoveStaticObjects();
static void Process();
static void TriggerExplosion(const CVector &, float, float, CEntity*, bool);
+
+ static void UseDetonator(CEntity *);
};
extern CColPoint gaTempSphereColPoints[MAX_COLLISION_POINTS];
diff --git a/src/core/main.cpp b/src/core/main.cpp
index 6d263b8c..b028b5fb 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -1560,8 +1560,9 @@ void SystemInit()
//
#endif
-
+#ifdef GTA_PS2_STUFF
CPad::Initialise();
+#endif
CPad::GetPad(0)->Mode = 0;
CGame::frenchGame = false;