mirror of
https://github.com/halpz/re3.git
synced 2025-07-05 00:00:45 +00:00
implemented CHeli
This commit is contained in:
@ -7,8 +7,10 @@ bool& CStats::CommercialPassed = *(bool*)0x8F4334;
|
||||
bool& CStats::IndustrialPassed = *(bool*)0x8E2A68;
|
||||
int32 &CStats::NumberKillFrenziesPassed = *(int32*)0x8E287C;
|
||||
int32 &CStats::PeopleKilledByOthers = *(int32*)0x8E2C50;
|
||||
int32 &CStats::HelisDestroyed = *(int32*)0x8E2A64;
|
||||
int32 *CStats::PedsKilledOfThisType = (int32*)0x880DBC;
|
||||
|
||||
void CStats::AnotherKillFrenzyPassed()
|
||||
{
|
||||
++NumberKillFrenziesPassed;
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,8 @@ public:
|
||||
static bool& IndustrialPassed;
|
||||
static int32 &NumberKillFrenziesPassed;
|
||||
static int32 &PeopleKilledByOthers;
|
||||
static int32 &HelisDestroyed;
|
||||
static int32 *PedsKilledOfThisType; //[NUM_PEDTYPES]
|
||||
|
||||
public:
|
||||
static void AnotherKillFrenzyPassed();
|
||||
|
@ -77,6 +77,8 @@ public:
|
||||
void ReportCrimeNow(eCrimeType type, const CVector &coors, bool policeDoesntCare);
|
||||
void UpdateWantedLevel();
|
||||
|
||||
bool IsIgnored(void) { return m_bIgnoredByCops || m_bIgnoredByEveryone; }
|
||||
|
||||
static int32 WorkOutPolicePresence(CVector posn, float radius);
|
||||
static void SetMaximumWantedLevel(int32 level);
|
||||
};
|
||||
|
@ -646,7 +646,7 @@ CWorld::FindObjectsInRange(CVector ¢re, float distance, bool ignoreZ, short
|
||||
}
|
||||
|
||||
CEntity*
|
||||
CWorld::TestSphereAgainstWorld(CVector centre, float distance, CEntity* entityToIgnore, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSomeObjects)
|
||||
CWorld::TestSphereAgainstWorld(CVector centre, float distance, CEntity *entityToIgnore, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSomeObjects)
|
||||
{
|
||||
CEntity* foundE = nil;
|
||||
|
||||
|
@ -95,8 +95,8 @@ public:
|
||||
static bool GetIsLineOfSightSectorClear(CSector §or, const CColLine &line, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSeeThrough, bool ignoreSomeObjects = false);
|
||||
static bool GetIsLineOfSightSectorListClear(CPtrList &list, const CColLine &line, bool ignoreSeeThrough, bool ignoreSomeObjects = false);
|
||||
|
||||
static CEntity* TestSphereAgainstWorld(CVector, float, CEntity*, bool, bool, bool, bool, bool, bool);
|
||||
static CEntity* TestSphereAgainstSectorList(CPtrList&, CVector, float, CEntity*, bool);
|
||||
static CEntity *TestSphereAgainstWorld(CVector centre, float distance, CEntity *entityToIgnore, bool checkBuildings, bool checkVehicles, bool checkPeds, bool checkObjects, bool checkDummies, bool ignoreSomeObjects);
|
||||
static CEntity *TestSphereAgainstSectorList(CPtrList&, CVector, float, CEntity*, bool);
|
||||
static void FindObjectsInRangeSectorList(CPtrList&, CVector&, float, bool, short*, short, CEntity**);
|
||||
static void FindObjectsInRange(CVector&, float, bool, short*, short, CEntity**, bool, bool, bool, bool, bool);
|
||||
static float FindGroundZForCoord(float x, float y);
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "Streaming.h"
|
||||
#include "PathFind.h"
|
||||
#include "Boat.h"
|
||||
#include "Heli.h"
|
||||
#include "Automobile.h"
|
||||
#include "debugmenu_public.h"
|
||||
|
||||
@ -318,6 +319,12 @@ DebugMenuPopulate(void)
|
||||
DebugMenuAddCmd("Debug", "Toggle Comedy Controls", ToggleComedy);
|
||||
DebugMenuAddCmd("Debug", "Place Car on Road", PlaceOnRoad);
|
||||
|
||||
DebugMenuAddVarBool8("Debug", "Catalina Heli On", (int8*)&CHeli::CatalinaHeliOn, nil);
|
||||
DebugMenuAddCmd("Debug", "Catalina Fly By", CHeli::StartCatalinaFlyBy);
|
||||
DebugMenuAddCmd("Debug", "Catalina Take Off", CHeli::CatalinaTakeOff);
|
||||
DebugMenuAddCmd("Debug", "Catalina Fly Away", CHeli::MakeCatalinaHeliFlyAway);
|
||||
DebugMenuAddVarBool8("Debug", "Script Heli On", (int8*)0x95CD43, nil);
|
||||
|
||||
DebugMenuAddVarBool8("Debug", "Show Ped Road Groups", (int8*)&gbShowPedRoadGroups, nil);
|
||||
DebugMenuAddVarBool8("Debug", "Show Car Road Groups", (int8*)&gbShowCarRoadGroups, nil);
|
||||
DebugMenuAddVarBool8("Debug", "Show Collision Lines", (int8*)&gbShowCollisionLines, nil);
|
||||
@ -347,29 +354,6 @@ delayedPatches10(int a, int b)
|
||||
}
|
||||
*/
|
||||
|
||||
void __declspec(naked) HeadlightsFix()
|
||||
{
|
||||
static const float fMinusOne = -1.0f;
|
||||
_asm
|
||||
{
|
||||
fld [esp+708h-690h]
|
||||
fcomp fMinusOne
|
||||
fnstsw ax
|
||||
and ah, 5
|
||||
cmp ah, 1
|
||||
jnz HeadlightsFix_DontLimit
|
||||
fld fMinusOne
|
||||
fstp [esp+708h-690h]
|
||||
|
||||
HeadlightsFix_DontLimit:
|
||||
fld [esp+708h-690h]
|
||||
fabs
|
||||
fld st
|
||||
push 0x5382F2
|
||||
retn
|
||||
}
|
||||
}
|
||||
|
||||
const int re3_buffsize = 1024;
|
||||
static char re3_buff[re3_buffsize];
|
||||
|
||||
@ -454,10 +438,6 @@ patch()
|
||||
InjectHook(0x475E00, printf, PATCH_JUMP); // _Error
|
||||
|
||||
|
||||
// stolen from silentpatch (sorry)
|
||||
Patch<WORD>(0x5382BF, 0x0EEB);
|
||||
InjectHook(0x5382EC, HeadlightsFix, PATCH_JUMP);
|
||||
|
||||
// InterceptCall(&open_script_orig, open_script, 0x438869);
|
||||
|
||||
// InterceptCall(&RsEventHandler_orig, delayedPatches10, 0x58275E);
|
||||
|
Reference in New Issue
Block a user