CWeapon done, ps2 cheats fix

This commit is contained in:
Fire-Head
2020-04-15 08:03:53 +03:00
parent 6473778c47
commit daed13485e
22 changed files with 2331 additions and 60 deletions

View File

@ -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)

View File

@ -642,6 +642,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

View File

@ -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()

View File

@ -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;

View File

@ -1557,8 +1557,9 @@ void SystemInit()
//
#endif
#ifdef GTA_PS2_STUFF
CPad::Initialise();
#endif
CPad::GetPad(0)->Mode = 0;
CGame::frenchGame = false;