mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 19:14:15 +01:00
CCopPed done and #include cleanup
This commit is contained in:
parent
739e80614d
commit
112685ebac
@ -38,13 +38,12 @@ to reverse at the time, calling the original functions is acceptable.
|
|||||||
|
|
||||||
### Unreversed / incomplete classes (at least the ones we know)
|
### Unreversed / incomplete classes (at least the ones we know)
|
||||||
```
|
```
|
||||||
cAudioManager - being worked on
|
cAudioManager - WIP
|
||||||
CBoat
|
CBoat
|
||||||
CBrightLights
|
CBrightLights
|
||||||
CBulletInfo
|
CBulletInfo
|
||||||
CBulletTraces
|
CBulletTraces
|
||||||
CCamera
|
CCamera
|
||||||
CCopPed
|
|
||||||
CCrane
|
CCrane
|
||||||
CCranes
|
CCranes
|
||||||
CCullZone
|
CCullZone
|
||||||
@ -57,7 +56,7 @@ CGame
|
|||||||
CGarage
|
CGarage
|
||||||
CGarages
|
CGarages
|
||||||
CGlass
|
CGlass
|
||||||
CMenuManager
|
CMenuManager - WIP
|
||||||
CMotionBlurStreaks
|
CMotionBlurStreaks
|
||||||
CObject
|
CObject
|
||||||
CPacManPickups
|
CPacManPickups
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "MusicManager.h"
|
#include "MusicManager.h"
|
||||||
#include "Pad.h"
|
#include "Pad.h"
|
||||||
#include "Ped.h"
|
#include "Ped.h"
|
||||||
|
#include "Fire.h"
|
||||||
#include "Physical.h"
|
#include "Physical.h"
|
||||||
#include "Placeable.h"
|
#include "Placeable.h"
|
||||||
#include "Plane.h"
|
#include "Plane.h"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "patcher.h"
|
#include "patcher.h"
|
||||||
#include "AudioScriptObject.h"
|
#include "AudioScriptObject.h"
|
||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
|
|
||||||
WRAPPER void cAudioScriptObject::SaveAllAudioScriptObjects(uint8 *buf, uint32 *size) { EAXJMP(0x57c460); }
|
WRAPPER void cAudioScriptObject::SaveAllAudioScriptObjects(uint8 *buf, uint32 *size) { EAXJMP(0x57c460); }
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "audio_enums.h"
|
#include "audio_enums.h"
|
||||||
#include "Wanted.h"
|
|
||||||
|
|
||||||
enum eSound : int16
|
enum eSound : int16
|
||||||
{
|
{
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "Hud.h"
|
#include "Hud.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
#include "Replay.h"
|
#include "Replay.h"
|
||||||
|
#include "Pad.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "Wanted.h"
|
||||||
|
|
||||||
struct cAMCrime {
|
struct cAMCrime {
|
||||||
int32 type;
|
int32 type;
|
||||||
CVector position;
|
CVector position;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Entity.h"
|
|
||||||
|
class CEntity;
|
||||||
|
|
||||||
enum bridgeStates {
|
enum bridgeStates {
|
||||||
STATE_BRIDGE_LOCKED,
|
STATE_BRIDGE_LOCKED,
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
#include "HandlingMgr.h"
|
#include "HandlingMgr.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
|
#include "Fire.h"
|
||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "TrafficLights.h"
|
#include "TrafficLights.h"
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "Ped.h"
|
#include "Ped.h"
|
||||||
#include "PlayerInfo.h"
|
#include "PlayerInfo.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
#include "Renderer.h"
|
#include "Renderer.h"
|
||||||
#include "RoadBlocks.h"
|
#include "RoadBlocks.h"
|
||||||
@ -27,7 +28,7 @@
|
|||||||
#include "Streaming.h"
|
#include "Streaming.h"
|
||||||
#include "VisibilityPlugins.h"
|
#include "VisibilityPlugins.h"
|
||||||
#include "Vehicle.h"
|
#include "Vehicle.h"
|
||||||
#include "Wanted.h"
|
#include "Fire.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Zones.h"
|
#include "Zones.h"
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "Darkel.h"
|
#include "Darkel.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "Timer.h"
|
#include "Timer.h"
|
||||||
#include "DMAudio.h"
|
#include "DMAudio.h"
|
||||||
#include "Population.h"
|
#include "Population.h"
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Weapon.h"
|
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
|
|
||||||
class CVehicle;
|
class CVehicle;
|
||||||
class CPed;
|
class CPed;
|
||||||
|
enum eWeaponType;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "CutsceneMgr.h"
|
#include "CutsceneMgr.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
#include "Messages.h"
|
#include "Messages.h"
|
||||||
#include "CarCtrl.h"
|
#include "CarCtrl.h"
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "patcher.h"
|
#include "patcher.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
#include "Gangs.h"
|
#include "Gangs.h"
|
||||||
|
#include "Weapon.h"
|
||||||
|
|
||||||
//CGangInfo(&CGangs::Gang)[NUM_GANGS] = *(CGangInfo(*)[NUM_GANGS])*(uintptr*)0x6EDF78;
|
//CGangInfo(&CGangs::Gang)[NUM_GANGS] = *(CGangInfo(*)[NUM_GANGS])*(uintptr*)0x6EDF78;
|
||||||
CGangInfo CGangs::Gang[NUM_GANGS];
|
CGangInfo CGangs::Gang[NUM_GANGS];
|
||||||
@ -38,8 +39,8 @@ void CGangs::SetGangVehicleModel(int16 gang, int32 model)
|
|||||||
void CGangs::SetGangWeapons(int16 gang, int32 weapon1, int32 weapon2)
|
void CGangs::SetGangWeapons(int16 gang, int32 weapon1, int32 weapon2)
|
||||||
{
|
{
|
||||||
CGangInfo *gi = GetGangInfo(gang);
|
CGangInfo *gi = GetGangInfo(gang);
|
||||||
gi->m_Weapon1 = (eWeaponType)weapon1;
|
gi->m_Weapon1 = weapon1;
|
||||||
gi->m_Weapon2 = (eWeaponType)weapon2;
|
gi->m_Weapon2 = weapon2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGangs::SetGangPedModelOverride(int16 gang, int8 ovrd)
|
void CGangs::SetGangPedModelOverride(int16 gang, int8 ovrd)
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Weapon.h"
|
|
||||||
|
|
||||||
struct CGangInfo
|
struct CGangInfo
|
||||||
{
|
{
|
||||||
int32 m_nVehicleMI;
|
int32 m_nVehicleMI;
|
||||||
int8 m_nPedModelOverride;
|
int8 m_nPedModelOverride;
|
||||||
eWeaponType m_Weapon1;
|
int32 m_Weapon1;
|
||||||
eWeaponType m_Weapon2;
|
int32 m_Weapon2;
|
||||||
|
|
||||||
CGangInfo();
|
CGangInfo();
|
||||||
};
|
};
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "AudioScriptObject.h"
|
#include "AudioScriptObject.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
|
#include "AnimBlendAssociation.h"
|
||||||
|
|
||||||
CPhoneInfo &gPhoneInfo = *(CPhoneInfo*)0x732A20;
|
CPhoneInfo &gPhoneInfo = *(CPhoneInfo*)0x732A20;
|
||||||
|
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
#include "Pad.h"
|
#include "Pad.h"
|
||||||
#include "Pickups.h"
|
#include "Pickups.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
|
#include "Fire.h"
|
||||||
#include "PointLights.h"
|
#include "PointLights.h"
|
||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
#include "Script.h"
|
#include "Script.h"
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "SpecialFX.h"
|
#include "SpecialFX.h"
|
||||||
#include "CarCtrl.h"
|
#include "CarCtrl.h"
|
||||||
#include "CivilianPed.h"
|
#include "CivilianPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "Clock.h"
|
#include "Clock.h"
|
||||||
#include "DMAudio.h"
|
#include "DMAudio.h"
|
||||||
#include "Draw.h"
|
#include "Draw.h"
|
||||||
@ -22,6 +23,8 @@
|
|||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
#include "Population.h"
|
#include "Population.h"
|
||||||
#include "Replay.h"
|
#include "Replay.h"
|
||||||
|
#include "References.h"
|
||||||
|
#include "Pools.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
#include "RwHelper.h"
|
#include "RwHelper.h"
|
||||||
#include "CutsceneMgr.h"
|
#include "CutsceneMgr.h"
|
||||||
@ -33,6 +36,8 @@
|
|||||||
#include "Zones.h"
|
#include "Zones.h"
|
||||||
#include "Font.h"
|
#include "Font.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
#include "Camera.h"
|
||||||
|
#include "Radar.h"
|
||||||
|
|
||||||
uint8 &CReplay::Mode = *(uint8*)0x95CD5B;
|
uint8 &CReplay::Mode = *(uint8*)0x95CD5B;
|
||||||
CAddressInReplayBuffer &CReplay::Record = *(CAddressInReplayBuffer*)0x942F7C;
|
CAddressInReplayBuffer &CReplay::Record = *(CAddressInReplayBuffer*)0x942F7C;
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Camera.h"
|
|
||||||
#include "Ped.h"
|
|
||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
#include "Radar.h"
|
|
||||||
#include "References.h"
|
|
||||||
#include "Vehicle.h"
|
|
||||||
#include "Wanted.h"
|
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
#ifndef DONT_FIX_REPLAY_BUGS
|
#ifndef DONT_FIX_REPLAY_BUGS
|
||||||
@ -16,6 +9,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
class CVehicle;
|
||||||
|
struct CReference;
|
||||||
|
|
||||||
struct CAddressInReplayBuffer
|
struct CAddressInReplayBuffer
|
||||||
{
|
{
|
||||||
uint32 m_nOffset;
|
uint32 m_nOffset;
|
||||||
|
@ -53,6 +53,8 @@
|
|||||||
#include "Restart.h"
|
#include "Restart.h"
|
||||||
#include "Replay.h"
|
#include "Replay.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
|
#include "AnimBlendAssociation.h"
|
||||||
|
#include "Fire.h"
|
||||||
#include "Rubbish.h"
|
#include "Rubbish.h"
|
||||||
#include "Shadows.h"
|
#include "Shadows.h"
|
||||||
#include "SpecialFX.h"
|
#include "SpecialFX.h"
|
||||||
@ -65,6 +67,7 @@
|
|||||||
#include "Weather.h"
|
#include "Weather.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Zones.h"
|
#include "Zones.h"
|
||||||
|
#include "Radar.h"
|
||||||
|
|
||||||
#define PICKUP_PLACEMENT_OFFSET 0.5f
|
#define PICKUP_PLACEMENT_OFFSET 0.5f
|
||||||
#define PED_FIND_Z_OFFSET 5.0f
|
#define PED_FIND_Z_OFFSET 5.0f
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "Clock.h"
|
#include "Clock.h"
|
||||||
#include "Timecycle.h"
|
#include "Timecycle.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
|
#include "AnimBlendAssociation.h"
|
||||||
#include "Shadows.h"
|
#include "Shadows.h"
|
||||||
#include "Radar.h"
|
#include "Radar.h"
|
||||||
#include "Hud.h"
|
#include "Hud.h"
|
||||||
@ -207,6 +208,7 @@ PlayAnimation(RpClump *clump, AssocGroupId animGroup, AnimationId anim)
|
|||||||
animAssoc->SetRun();
|
animAssoc->SetRun();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern void (*DebugMenuProcess)(void);
|
||||||
void
|
void
|
||||||
CAnimViewer::Update(void)
|
CAnimViewer::Update(void)
|
||||||
{
|
{
|
||||||
@ -246,6 +248,9 @@ CAnimViewer::Update(void)
|
|||||||
}
|
}
|
||||||
CPad::UpdatePads();
|
CPad::UpdatePads();
|
||||||
CPad* pad = CPad::GetPad(0);
|
CPad* pad = CPad::GetPad(0);
|
||||||
|
|
||||||
|
DebugMenuProcess();
|
||||||
|
|
||||||
CStreaming::UpdateForAnimViewer();
|
CStreaming::UpdateForAnimViewer();
|
||||||
CStreaming::RequestModel(modelId, 0);
|
CStreaming::RequestModel(modelId, 0);
|
||||||
if (CStreaming::HasModelLoaded(modelId)) {
|
if (CStreaming::HasModelLoaded(modelId)) {
|
||||||
|
@ -9,12 +9,14 @@
|
|||||||
#include "FileMgr.h"
|
#include "FileMgr.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "AnimManager.h"
|
#include "AnimManager.h"
|
||||||
|
#include "AnimBlendAssociation.h"
|
||||||
#include "AnimBlendAssocGroup.h"
|
#include "AnimBlendAssocGroup.h"
|
||||||
#include "AnimBlendClumpData.h"
|
#include "AnimBlendClumpData.h"
|
||||||
#include "Pad.h"
|
#include "Pad.h"
|
||||||
#include "DMAudio.h"
|
#include "DMAudio.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "CutsceneHead.h"
|
#include "CutsceneHead.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
|
@ -212,7 +212,7 @@ CEventList::ReportCrimeForEvent(eEventType type, int32 crimeId, bool copsDontCar
|
|||||||
|
|
||||||
#ifdef VC_PED_PORTS
|
#ifdef VC_PED_PORTS
|
||||||
if (crime == CRIME_HIT_PED && ((CPed*)crimeId)->IsPointerValid() &&
|
if (crime == CRIME_HIT_PED && ((CPed*)crimeId)->IsPointerValid() &&
|
||||||
FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 && ((CPed*)crimeId)->m_ped_flagE2) {
|
FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 && ((CPed*)crimeId)->bBeingChasedByPolice) {
|
||||||
|
|
||||||
if(!((CPed*)crimeId)->DyingOrDead()) {
|
if(!((CPed*)crimeId)->DyingOrDead()) {
|
||||||
sprintf(gString, "$50 Good Citizen Bonus!");
|
sprintf(gString, "$50 Good Citizen Bonus!");
|
||||||
|
@ -94,7 +94,6 @@ int32 *&pControlEdit = *(int32**)0x628D08;
|
|||||||
bool &DisplayComboButtonErrMsg = *(bool*)0x628D14;
|
bool &DisplayComboButtonErrMsg = *(bool*)0x628D14;
|
||||||
int32 &MouseButtonJustClicked = *(int32*)0x628D0C;
|
int32 &MouseButtonJustClicked = *(int32*)0x628D0C;
|
||||||
int32 &JoyButtonJustClicked = *(int32*)0x628D10;
|
int32 &JoyButtonJustClicked = *(int32*)0x628D10;
|
||||||
uint32 &nTimeForSomething = *(uint32*)0x628D54;
|
|
||||||
bool &holdingScrollBar = *(bool*)0x628D59;
|
bool &holdingScrollBar = *(bool*)0x628D59;
|
||||||
//int32 *pControlTemp = 0;
|
//int32 *pControlTemp = 0;
|
||||||
|
|
||||||
@ -2202,15 +2201,15 @@ CMenuManager::ProcessButtonPresses(void)
|
|||||||
field_535 = false;
|
field_535 = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int nTimeForSomething = 0;
|
static uint32 lastTimeClickedScrollButton = 0;
|
||||||
|
|
||||||
if (CTimer::GetTimeInMillisecondsPauseMode() - nTimeForSomething >= 200) {
|
if (CTimer::GetTimeInMillisecondsPauseMode() - lastTimeClickedScrollButton >= 200) {
|
||||||
m_bPressedPgUpOnList = false;
|
m_bPressedPgUpOnList = false;
|
||||||
m_bPressedPgDnOnList = false;
|
m_bPressedPgDnOnList = false;
|
||||||
m_bPressedUpOnList = false;
|
m_bPressedUpOnList = false;
|
||||||
m_bPressedDownOnList = false;
|
m_bPressedDownOnList = false;
|
||||||
m_bPressedScrollButton = false;
|
m_bPressedScrollButton = false;
|
||||||
nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CPad::GetPad(0)->GetTabJustDown()) {
|
if (CPad::GetPad(0)->GetTabJustDown()) {
|
||||||
@ -2249,7 +2248,7 @@ CMenuManager::ProcessButtonPresses(void)
|
|||||||
m_nCurrExLayer = 19;
|
m_nCurrExLayer = 19;
|
||||||
if (!m_bPressedUpOnList) {
|
if (!m_bPressedUpOnList) {
|
||||||
m_bPressedUpOnList = true;
|
m_bPressedUpOnList = true;
|
||||||
nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
|
||||||
ScrollUpListByOne();
|
ScrollUpListByOne();
|
||||||
}
|
}
|
||||||
@ -2271,7 +2270,7 @@ CMenuManager::ProcessButtonPresses(void)
|
|||||||
m_nCurrExLayer = 19;
|
m_nCurrExLayer = 19;
|
||||||
if (!m_bPressedDownOnList) {
|
if (!m_bPressedDownOnList) {
|
||||||
m_bPressedDownOnList = true;
|
m_bPressedDownOnList = true;
|
||||||
nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
|
||||||
ScrollDownListByOne();
|
ScrollDownListByOne();
|
||||||
}
|
}
|
||||||
@ -2286,7 +2285,7 @@ CMenuManager::ProcessButtonPresses(void)
|
|||||||
m_nCurrExLayer = 19;
|
m_nCurrExLayer = 19;
|
||||||
if (!m_bPressedPgUpOnList) {
|
if (!m_bPressedPgUpOnList) {
|
||||||
m_bPressedPgUpOnList = true;
|
m_bPressedPgUpOnList = true;
|
||||||
nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
m_bShowMouse = false;
|
m_bShowMouse = false;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
|
||||||
PageUpList(false);
|
PageUpList(false);
|
||||||
@ -2298,7 +2297,7 @@ CMenuManager::ProcessButtonPresses(void)
|
|||||||
m_nCurrExLayer = 19;
|
m_nCurrExLayer = 19;
|
||||||
if (!m_bPressedPgDnOnList) {
|
if (!m_bPressedPgDnOnList) {
|
||||||
m_bPressedPgDnOnList = true;
|
m_bPressedPgDnOnList = true;
|
||||||
nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
m_bShowMouse = false;
|
m_bShowMouse = false;
|
||||||
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_DENIED, 0);
|
||||||
PageDownList(false);
|
PageDownList(false);
|
||||||
@ -2384,7 +2383,7 @@ CMenuManager::ProcessButtonPresses(void)
|
|||||||
case HOVEROPTION_CLICKED_SCROLL_UP:
|
case HOVEROPTION_CLICKED_SCROLL_UP:
|
||||||
if (!m_bPressedScrollButton) {
|
if (!m_bPressedScrollButton) {
|
||||||
m_bPressedScrollButton = true;
|
m_bPressedScrollButton = true;
|
||||||
nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
ScrollUpListByOne();
|
ScrollUpListByOne();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -2392,7 +2391,7 @@ CMenuManager::ProcessButtonPresses(void)
|
|||||||
case HOVEROPTION_CLICKED_SCROLL_DOWN:
|
case HOVEROPTION_CLICKED_SCROLL_DOWN:
|
||||||
if (!m_bPressedScrollButton) {
|
if (!m_bPressedScrollButton) {
|
||||||
m_bPressedScrollButton = true;
|
m_bPressedScrollButton = true;
|
||||||
nTimeForSomething = CTimer::GetTimeInMillisecondsPauseMode();
|
lastTimeClickedScrollButton = CTimer::GetTimeInMillisecondsPauseMode();
|
||||||
ScrollDownListByOne();
|
ScrollDownListByOne();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3593,7 +3592,7 @@ void CMenuManager::SwitchMenuOnAndOff()
|
|||||||
PcSaveHelper.PopulateSlotInfo();
|
PcSaveHelper.PopulateSlotInfo();
|
||||||
m_nCurrOption = 0;
|
m_nCurrOption = 0;
|
||||||
}
|
}
|
||||||
/* // PS2 leftover?
|
/* // PS2 leftover
|
||||||
if (m_nCurrScreen != MENUPAGE_SOUND_SETTINGS && gMusicPlaying)
|
if (m_nCurrScreen != MENUPAGE_SOUND_SETTINGS && gMusicPlaying)
|
||||||
{
|
{
|
||||||
DMAudio.StopFrontEndTrack();
|
DMAudio.StopFrontEndTrack();
|
||||||
|
@ -41,6 +41,8 @@
|
|||||||
#include "Record.h"
|
#include "Record.h"
|
||||||
#include "Renderer.h"
|
#include "Renderer.h"
|
||||||
#include "Replay.h"
|
#include "Replay.h"
|
||||||
|
#include "References.h"
|
||||||
|
#include "Radar.h"
|
||||||
#include "Restart.h"
|
#include "Restart.h"
|
||||||
#include "RoadBlocks.h"
|
#include "RoadBlocks.h"
|
||||||
#include "PedRoutes.h"
|
#include "PedRoutes.h"
|
||||||
|
@ -574,8 +574,9 @@ void CPad::AffectFromXinput(uint32 pad)
|
|||||||
PCTempJoyState.RightShoulder2 = xstate.Gamepad.bRightTrigger;
|
PCTempJoyState.RightShoulder2 = xstate.Gamepad.bRightTrigger;
|
||||||
|
|
||||||
PCTempJoyState.Select = (xstate.Gamepad.wButtons & XINPUT_GAMEPAD_BACK) ? 255 : 0;
|
PCTempJoyState.Select = (xstate.Gamepad.wButtons & XINPUT_GAMEPAD_BACK) ? 255 : 0;
|
||||||
|
#ifdef REGISTER_START_BUTTON
|
||||||
PCTempJoyState.Start = (xstate.Gamepad.wButtons & XINPUT_GAMEPAD_START) ? 255 : 0;
|
PCTempJoyState.Start = (xstate.Gamepad.wButtons & XINPUT_GAMEPAD_START) ? 255 : 0;
|
||||||
|
#endif
|
||||||
float lx = (float)xstate.Gamepad.sThumbLX / (float)0x7FFF;
|
float lx = (float)xstate.Gamepad.sThumbLX / (float)0x7FFF;
|
||||||
float ly = (float)xstate.Gamepad.sThumbLY / (float)0x7FFF;
|
float ly = (float)xstate.Gamepad.sThumbLY / (float)0x7FFF;
|
||||||
float rx = (float)xstate.Gamepad.sThumbRX / (float)0x7FFF;
|
float rx = (float)xstate.Gamepad.sThumbRX / (float)0x7FFF;
|
||||||
|
@ -2,7 +2,9 @@
|
|||||||
#include "patcher.h"
|
#include "patcher.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "PlayerInfo.h"
|
#include "PlayerInfo.h"
|
||||||
|
#include "Fire.h"
|
||||||
#include "Frontend.h"
|
#include "Frontend.h"
|
||||||
#include "PlayerSkin.h"
|
#include "PlayerSkin.h"
|
||||||
#include "Darkel.h"
|
#include "Darkel.h"
|
||||||
@ -12,6 +14,7 @@
|
|||||||
#include "Remote.h"
|
#include "Remote.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Replay.h"
|
#include "Replay.h"
|
||||||
|
#include "Camera.h"
|
||||||
#include "Pad.h"
|
#include "Pad.h"
|
||||||
#include "ProjectileInfo.h"
|
#include "ProjectileInfo.h"
|
||||||
#include "Explosion.h"
|
#include "Explosion.h"
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "TxdStore.h"
|
#include "TxdStore.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "Directory.h"
|
#include "Directory.h"
|
||||||
#include "RwHelper.h"
|
#include "RwHelper.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
#include "Radar.h"
|
#include "Radar.h"
|
||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
|
#include "DummyObject.h"
|
||||||
|
|
||||||
WRAPPER void CObject::ObjectDamage(float amount) { EAXJMP(0x4BB240); }
|
WRAPPER void CObject::ObjectDamage(float amount) { EAXJMP(0x4BB240); }
|
||||||
WRAPPER void CObject::DeleteAllTempObjectInArea(CVector, float) { EAXJMP(0x4BBED0); }
|
WRAPPER void CObject::DeleteAllTempObjectInArea(CVector, float) { EAXJMP(0x4BBED0); }
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Physical.h"
|
#include "Physical.h"
|
||||||
#include "DummyObject.h"
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
GAME_OBJECT = 1,
|
GAME_OBJECT = 1,
|
||||||
@ -26,6 +25,7 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class CVehicle;
|
class CVehicle;
|
||||||
|
class CDummyObject;
|
||||||
|
|
||||||
class CObject : public CPhysical
|
class CObject : public CPhysical
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "Phones.h"
|
#include "Phones.h"
|
||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Vehicle.h"
|
#include "Vehicle.h"
|
||||||
#include "SurfaceTable.h"
|
#include "SurfaceTable.h"
|
||||||
|
@ -3,15 +3,19 @@
|
|||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
#include "CopPed.h"
|
#include "CopPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
#include "Vehicle.h"
|
#include "Vehicle.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
|
#include "AnimBlendAssociation.h"
|
||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "ZoneCull.h"
|
#include "ZoneCull.h"
|
||||||
#include "PathFind.h"
|
#include "PathFind.h"
|
||||||
#include "RoadBlocks.h"
|
#include "RoadBlocks.h"
|
||||||
|
#include "CarCtrl.h"
|
||||||
WRAPPER void CCopPed::ProcessControl() { EAXJMP(0x4C1400); }
|
#include "Renderer.h"
|
||||||
|
#include "Camera.h"
|
||||||
|
|
||||||
CCopPed::CCopPed(eCopType copType) : CPed(PEDTYPE_COP)
|
CCopPed::CCopPed(eCopType copType) : CPed(PEDTYPE_COP)
|
||||||
{
|
{
|
||||||
@ -62,12 +66,12 @@ CCopPed::CCopPed(eCopType copType) : CPed(PEDTYPE_COP)
|
|||||||
field_1356 = 0;
|
field_1356 = 0;
|
||||||
m_attackTimer = 0;
|
m_attackTimer = 0;
|
||||||
m_bBeatingSuspect = false;
|
m_bBeatingSuspect = false;
|
||||||
m_bZoneDisabledButClose = false;
|
m_bStopAndShootDisabledZone = false;
|
||||||
m_bZoneDisabled = false;
|
m_bZoneDisabled = false;
|
||||||
field_1364 = -1;
|
field_1364 = -1;
|
||||||
m_pPointGunAt = nil;
|
m_pPointGunAt = nil;
|
||||||
|
|
||||||
// VC also initializes in here, but it keeps object
|
// VC also initializes in here, but as nil
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
m_wRoadblockNode = -1;
|
m_wRoadblockNode = -1;
|
||||||
#endif
|
#endif
|
||||||
@ -171,7 +175,7 @@ CCopPed::ClearPursuit(void)
|
|||||||
bIsRunning = false;
|
bIsRunning = false;
|
||||||
bNotAllowedToDuck = false;
|
bNotAllowedToDuck = false;
|
||||||
bKindaStayInSamePlace = false;
|
bKindaStayInSamePlace = false;
|
||||||
m_bZoneDisabledButClose = false;
|
m_bStopAndShootDisabledZone = false;
|
||||||
m_bZoneDisabled = false;
|
m_bZoneDisabled = false;
|
||||||
ClearObjective();
|
ClearObjective();
|
||||||
if (IsPedInControl()) {
|
if (IsPedInControl()) {
|
||||||
@ -213,7 +217,7 @@ CCopPed::SetPursuit(bool ignoreCopLimit)
|
|||||||
SetObjectiveTimer(0);
|
SetObjectiveTimer(0);
|
||||||
bNotAllowedToDuck = true;
|
bNotAllowedToDuck = true;
|
||||||
bIsRunning = true;
|
bIsRunning = true;
|
||||||
m_bZoneDisabledButClose = false;
|
m_bStopAndShootDisabledZone = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -315,13 +319,15 @@ CCopPed::CopAI(void)
|
|||||||
m_prevObjective = OBJECTIVE_NONE;
|
m_prevObjective = OBJECTIVE_NONE;
|
||||||
m_nLastPedState = PED_NONE;
|
m_nLastPedState = PED_NONE;
|
||||||
SetAttackTimer(0);
|
SetAttackTimer(0);
|
||||||
|
|
||||||
|
// Safe distance for disabled zone? Or to just make game easier?
|
||||||
if (m_fDistanceToTarget > 15.0f)
|
if (m_fDistanceToTarget > 15.0f)
|
||||||
m_bZoneDisabledButClose = true;
|
m_bStopAndShootDisabledZone = true;
|
||||||
}
|
}
|
||||||
} else if (m_bZoneDisabled && !CCullZones::NoPolice()) {
|
} else if (m_bZoneDisabled && !CCullZones::NoPolice()) {
|
||||||
m_bZoneDisabled = false;
|
m_bZoneDisabled = false;
|
||||||
m_bIsDisabledCop = false;
|
m_bIsDisabledCop = false;
|
||||||
m_bZoneDisabledButClose = false;
|
m_bStopAndShootDisabledZone = false;
|
||||||
bKindaStayInSamePlace = false;
|
bKindaStayInSamePlace = false;
|
||||||
bCrouchWhenShooting = false;
|
bCrouchWhenShooting = false;
|
||||||
bDuckAndCover = false;
|
bDuckAndCover = false;
|
||||||
@ -524,7 +530,7 @@ CCopPed::CopAI(void)
|
|||||||
if (!anotherCopChasesHim) {
|
if (!anotherCopChasesHim) {
|
||||||
SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, nearPed);
|
SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, nearPed);
|
||||||
nearPed->SetObjective(OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, this);
|
nearPed->SetObjective(OBJECTIVE_FLEE_CHAR_ON_FOOT_TILL_SAFE, this);
|
||||||
nearPed->m_ped_flagE2 = true;
|
nearPed->bBeingChasedByPolice = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -551,6 +557,186 @@ CCopPed::CopAI(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CCopPed::ProcessControl(void)
|
||||||
|
{
|
||||||
|
if (m_nZoneLevel > LEVEL_NONE && m_nZoneLevel != CCollision::ms_collisionInMemory)
|
||||||
|
return;
|
||||||
|
|
||||||
|
CPed::ProcessControl();
|
||||||
|
if (bWasPostponed)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_nPedState == PED_DEAD) {
|
||||||
|
ClearPursuit();
|
||||||
|
m_objective = OBJECTIVE_NONE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (m_nPedState == PED_DIE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (m_nPedState == PED_ARREST_PLAYER) {
|
||||||
|
ArrestPlayer();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
GetWeapon()->Update(m_audioEntityId);
|
||||||
|
if (m_moved.Magnitude() > 0.0f)
|
||||||
|
Avoid();
|
||||||
|
|
||||||
|
CPhysical *playerOrHisVeh = FindPlayerVehicle() ? (CPhysical*)FindPlayerVehicle() : (CPhysical*)FindPlayerPed();
|
||||||
|
CPlayerPed *player = FindPlayerPed();
|
||||||
|
|
||||||
|
m_fDistanceToTarget = (playerOrHisVeh->GetPosition() - GetPosition()).Magnitude();
|
||||||
|
if (player->m_nPedState == PED_ARRESTED || player->DyingOrDead()) {
|
||||||
|
if (m_fDistanceToTarget < 5.0f) {
|
||||||
|
SetArrestPlayer(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (IsPedInControl())
|
||||||
|
SetIdle();
|
||||||
|
}
|
||||||
|
if (m_bIsInPursuit) {
|
||||||
|
if (player->m_nPedState != PED_ARRESTED && !player->DyingOrDead()) {
|
||||||
|
switch (m_nCopType) {
|
||||||
|
case COP_FBI:
|
||||||
|
Say(SOUND_PED_PURSUIT_FBI);
|
||||||
|
break;
|
||||||
|
case COP_SWAT:
|
||||||
|
Say(SOUND_PED_PURSUIT_SWAT);
|
||||||
|
break;
|
||||||
|
case COP_ARMY:
|
||||||
|
Say(SOUND_PED_PURSUIT_ARMY);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Say(SOUND_PED_PURSUIT_COP);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IsPedInControl()) {
|
||||||
|
CopAI();
|
||||||
|
/* switch (m_nCopType)
|
||||||
|
{
|
||||||
|
case COP_FBI:
|
||||||
|
CopAI();
|
||||||
|
break;
|
||||||
|
case COP_SWAT:
|
||||||
|
CopAI();
|
||||||
|
break;
|
||||||
|
case COP_ARMY:
|
||||||
|
CopAI();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
CopAI();
|
||||||
|
break;
|
||||||
|
} */
|
||||||
|
} else if (InVehicle()) {
|
||||||
|
if (m_pMyVehicle->pDriver == this && m_pMyVehicle->AutoPilot.m_nCarMission == MISSION_NONE &&
|
||||||
|
CanPedDriveOff() && m_pMyVehicle->VehicleCreatedBy != MISSION_VEHICLE) {
|
||||||
|
|
||||||
|
CCarCtrl::JoinCarWithRoadSystem(m_pMyVehicle);
|
||||||
|
m_pMyVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
|
||||||
|
m_pMyVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_STOP_FOR_CARS;
|
||||||
|
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = 17;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (IsPedInControl() || m_nPedState == PED_DRIVING)
|
||||||
|
ScanForCrimes();
|
||||||
|
|
||||||
|
// They may have used goto to jump here in case of PED_ATTACK.
|
||||||
|
if (m_nPedState == PED_IDLE || m_nPedState == PED_ATTACK) {
|
||||||
|
if (m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT &&
|
||||||
|
player && player->EnteringCar() && m_fDistanceToTarget < 1.3f) {
|
||||||
|
SetArrestPlayer(player);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (m_nPedState == PED_SEEK_POS) {
|
||||||
|
if (player->m_nPedState == PED_ARRESTED) {
|
||||||
|
SetIdle();
|
||||||
|
SetLookFlag(player, false);
|
||||||
|
SetLookTimer(1000);
|
||||||
|
RestorePreviousObjective();
|
||||||
|
} else {
|
||||||
|
if (player->m_pMyVehicle && player->m_pMyVehicle->m_nNumGettingIn != 0) {
|
||||||
|
// This is 1.3f when arresting in car without seeking first (in above)
|
||||||
|
#if defined(VC_PED_PORTS) || defined(FIX_BUGS)
|
||||||
|
m_distanceToCountSeekDone = 1.3f;
|
||||||
|
#else
|
||||||
|
m_distanceToCountSeekDone = 2.0f;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bDuckAndCover) {
|
||||||
|
if (!bNotAllowedToDuck && Seek()) {
|
||||||
|
SetMoveState(PEDMOVE_STILL);
|
||||||
|
SetMoveAnim();
|
||||||
|
SetPointGunAt(m_pedInObjective);
|
||||||
|
}
|
||||||
|
} else if (Seek()) {
|
||||||
|
CVehicle *playerVeh = FindPlayerVehicle();
|
||||||
|
if (!playerVeh && player && player->EnteringCar()) {
|
||||||
|
SetArrestPlayer(player);
|
||||||
|
} else if (1.5f + GetPosition().z <= m_vecSeekPos.z || GetPosition().z - 0.3f >= m_vecSeekPos.z) {
|
||||||
|
SetMoveState(PEDMOVE_STILL);
|
||||||
|
} else if (playerVeh && playerVeh->CanPedEnterCar() && playerVeh->m_nNumGettingIn == 0) {
|
||||||
|
SetCarJack(playerVeh);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (m_nPedState == PED_SEEK_ENTITY) {
|
||||||
|
if (!m_pSeekTarget) {
|
||||||
|
RestorePreviousState();
|
||||||
|
} else {
|
||||||
|
m_vecSeekPos = m_pSeekTarget->GetPosition();
|
||||||
|
if (Seek()) {
|
||||||
|
if (m_objective == OBJECTIVE_KILL_CHAR_ON_FOOT && m_fDistanceToTarget < 2.5f && player) {
|
||||||
|
if (player->m_nPedState == PED_ARRESTED || player->m_nPedState == PED_ENTER_CAR ||
|
||||||
|
(player->m_nPedState == PED_CARJACK && m_fDistanceToTarget < 1.3f)) {
|
||||||
|
SetArrestPlayer(player);
|
||||||
|
} else
|
||||||
|
RestorePreviousState();
|
||||||
|
} else {
|
||||||
|
RestorePreviousState();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!m_bStopAndShootDisabledZone)
|
||||||
|
return;
|
||||||
|
|
||||||
|
bool dontShoot = false;
|
||||||
|
if (GetIsOnScreen() && CRenderer::IsEntityCullZoneVisible(this)) {
|
||||||
|
if (((CTimer::GetFrameCounter() + m_randomSeed) & 0x1F) == 17) {
|
||||||
|
CEntity *foundBuilding = nil;
|
||||||
|
CColPoint foundCol;
|
||||||
|
CVector lookPos = GetPosition() + CVector(0.0f, 0.0f, 0.7f);
|
||||||
|
CVector camPos = TheCamera.GetGameCamPosition();
|
||||||
|
CWorld::ProcessLineOfSight(camPos, lookPos, foundCol, foundBuilding,
|
||||||
|
true, false, false, false, false, false, false);
|
||||||
|
|
||||||
|
// He's at least 15.0 far, in disabled zone, collided into somewhere (that's why m_bStopAndShootDisabledZone set),
|
||||||
|
// and now has building on front of him. He's stupid, we don't need him.
|
||||||
|
if (foundBuilding) {
|
||||||
|
FlagToDestroyWhenNextProcessed();
|
||||||
|
dontShoot = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
FlagToDestroyWhenNextProcessed();
|
||||||
|
dontShoot = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dontShoot) {
|
||||||
|
bStopAndShoot = true;
|
||||||
|
bKindaStayInSamePlace = true;
|
||||||
|
bIsPointingGunAt = true;
|
||||||
|
SetAttack(m_pedInObjective);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
||||||
class CCopPed_ : public CCopPed
|
class CCopPed_ : public CCopPed
|
||||||
@ -558,11 +744,13 @@ class CCopPed_ : public CCopPed
|
|||||||
public:
|
public:
|
||||||
CCopPed *ctor(eCopType type) { return ::new (this) CCopPed(type); };
|
CCopPed *ctor(eCopType type) { return ::new (this) CCopPed(type); };
|
||||||
void dtor(void) { CCopPed::~CCopPed(); }
|
void dtor(void) { CCopPed::~CCopPed(); }
|
||||||
|
void ProcessControl_(void) { CCopPed::ProcessControl(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
STARTPATCHES
|
STARTPATCHES
|
||||||
InjectHook(0x4C11B0, &CCopPed_::ctor, PATCH_JUMP);
|
InjectHook(0x4C11B0, &CCopPed_::ctor, PATCH_JUMP);
|
||||||
InjectHook(0x4C13E0, &CCopPed_::dtor, PATCH_JUMP);
|
InjectHook(0x4C13E0, &CCopPed_::dtor, PATCH_JUMP);
|
||||||
|
InjectHook(0x4C1400, &CCopPed_::ProcessControl_, PATCH_JUMP);
|
||||||
InjectHook(0x4C28C0, &CCopPed::ClearPursuit, PATCH_JUMP);
|
InjectHook(0x4C28C0, &CCopPed::ClearPursuit, PATCH_JUMP);
|
||||||
InjectHook(0x4C2B00, &CCopPed::SetArrestPlayer, PATCH_JUMP);
|
InjectHook(0x4C2B00, &CCopPed::SetArrestPlayer, PATCH_JUMP);
|
||||||
InjectHook(0x4C27D0, &CCopPed::SetPursuit, PATCH_JUMP);
|
InjectHook(0x4C27D0, &CCopPed::SetPursuit, PATCH_JUMP);
|
||||||
|
@ -17,10 +17,10 @@ public:
|
|||||||
int8 field_1343;
|
int8 field_1343;
|
||||||
float m_fDistanceToTarget;
|
float m_fDistanceToTarget;
|
||||||
int8 m_bIsInPursuit;
|
int8 m_bIsInPursuit;
|
||||||
int8 m_bIsDisabledCop; // What disabled cop actually is?
|
int8 m_bIsDisabledCop;
|
||||||
int8 field_1350;
|
int8 field_1350;
|
||||||
bool m_bBeatingSuspect;
|
bool m_bBeatingSuspect;
|
||||||
int8 m_bZoneDisabledButClose;
|
int8 m_bStopAndShootDisabledZone;
|
||||||
int8 m_bZoneDisabled;
|
int8 m_bZoneDisabled;
|
||||||
int8 field_1354;
|
int8 field_1354;
|
||||||
int8 field_1355;
|
int8 field_1355;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "patcher.h"
|
#include "patcher.h"
|
||||||
#include "EmergencyPed.h"
|
#include "EmergencyPed.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
#include "Vehicle.h"
|
#include "Vehicle.h"
|
||||||
#include "Fire.h"
|
#include "Fire.h"
|
||||||
|
@ -7,13 +7,21 @@
|
|||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
#include "Ped.h"
|
#include "Ped.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "PedType.h"
|
||||||
|
#include "AnimBlendClumpData.h"
|
||||||
|
#include "AnimBlendAssociation.h"
|
||||||
|
#include "Fire.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "SurfaceTable.h"
|
#include "SurfaceTable.h"
|
||||||
#include "VisibilityPlugins.h"
|
#include "VisibilityPlugins.h"
|
||||||
#include "AudioManager.h"
|
#include "AudioManager.h"
|
||||||
#include "HandlingMgr.h"
|
#include "HandlingMgr.h"
|
||||||
#include "Replay.h"
|
#include "Replay.h"
|
||||||
|
#include "Camera.h"
|
||||||
|
#include "Radar.h"
|
||||||
#include "PedPlacement.h"
|
#include "PedPlacement.h"
|
||||||
#include "Shadows.h"
|
#include "Shadows.h"
|
||||||
#include "Weather.h"
|
#include "Weather.h"
|
||||||
@ -552,7 +560,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
|
|||||||
bScriptObjectiveCompleted = false;
|
bScriptObjectiveCompleted = false;
|
||||||
|
|
||||||
bKindaStayInSamePlace = false;
|
bKindaStayInSamePlace = false;
|
||||||
m_ped_flagE2 = false;
|
bBeingChasedByPolice = false;
|
||||||
bNotAllowedToDuck = false;
|
bNotAllowedToDuck = false;
|
||||||
bCrouchWhenShooting = false;
|
bCrouchWhenShooting = false;
|
||||||
bIsDucking = false;
|
bIsDucking = false;
|
||||||
@ -9597,7 +9605,7 @@ CPed::ProcessControl(void)
|
|||||||
float neededTurnToCriminal = angleToLookCriminal - angleToFace;
|
float neededTurnToCriminal = angleToLookCriminal - angleToFace;
|
||||||
|
|
||||||
if (neededTurnToCriminal > DEGTORAD(150.0f) && neededTurnToCriminal < DEGTORAD(210.0f)) {
|
if (neededTurnToCriminal > DEGTORAD(150.0f) && neededTurnToCriminal < DEGTORAD(210.0f)) {
|
||||||
((CCopPed*)this)->m_bZoneDisabledButClose = true;
|
((CCopPed*)this)->m_bStopAndShootDisabledZone = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,9 @@
|
|||||||
#include "Physical.h"
|
#include "Physical.h"
|
||||||
#include "Weapon.h"
|
#include "Weapon.h"
|
||||||
#include "PedStats.h"
|
#include "PedStats.h"
|
||||||
#include "PedType.h"
|
|
||||||
#include "PedIK.h"
|
#include "PedIK.h"
|
||||||
#include "AnimManager.h"
|
#include "AnimManager.h"
|
||||||
#include "AnimBlendClumpData.h"
|
|
||||||
#include "AnimBlendAssociation.h"
|
|
||||||
#include "WeaponInfo.h"
|
#include "WeaponInfo.h"
|
||||||
#include "Fire.h"
|
|
||||||
#include "DMAudio.h"
|
|
||||||
#include "EventList.h"
|
#include "EventList.h"
|
||||||
|
|
||||||
#define FEET_OFFSET 1.04f
|
#define FEET_OFFSET 1.04f
|
||||||
@ -19,6 +14,10 @@
|
|||||||
struct CPathNode;
|
struct CPathNode;
|
||||||
class CAccident;
|
class CAccident;
|
||||||
class CObject;
|
class CObject;
|
||||||
|
class CFire;
|
||||||
|
struct AnimBlendFrameData;
|
||||||
|
class CAnimBlendAssociation;
|
||||||
|
enum eCrimeType;
|
||||||
|
|
||||||
struct PedAudioData
|
struct PedAudioData
|
||||||
{
|
{
|
||||||
@ -339,7 +338,7 @@ public:
|
|||||||
uint8 bScriptObjectiveCompleted : 1;
|
uint8 bScriptObjectiveCompleted : 1;
|
||||||
|
|
||||||
uint8 bKindaStayInSamePlace : 1;
|
uint8 bKindaStayInSamePlace : 1;
|
||||||
uint8 m_ped_flagE2 : 1; // bBeingChasedByPolice?
|
uint8 bBeingChasedByPolice : 1; // Unused VC leftover. Should've been set for criminal/gang members
|
||||||
uint8 bNotAllowedToDuck : 1;
|
uint8 bNotAllowedToDuck : 1;
|
||||||
uint8 bCrouchWhenShooting : 1;
|
uint8 bCrouchWhenShooting : 1;
|
||||||
uint8 bIsDucking : 1;
|
uint8 bIsDucking : 1;
|
||||||
|
@ -80,7 +80,7 @@ CPedIK::RotateTorso(AnimBlendFrameData *animBlend, LimbOrientation *limb, bool c
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CPedIK::GetComponentPosition(RwV3d *pos, PedNode node)
|
CPedIK::GetComponentPosition(RwV3d *pos, uint32 node)
|
||||||
{
|
{
|
||||||
RwFrame *f;
|
RwFrame *f;
|
||||||
RwMatrix *mat;
|
RwMatrix *mat;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "PedModelInfo.h"
|
|
||||||
#include "AnimBlendClumpData.h"
|
#include "AnimBlendClumpData.h"
|
||||||
|
|
||||||
struct LimbOrientation
|
struct LimbOrientation
|
||||||
@ -52,7 +51,7 @@ public:
|
|||||||
bool PointGunInDirection(float phi, float theta);
|
bool PointGunInDirection(float phi, float theta);
|
||||||
bool PointGunInDirectionUsingArm(float phi, float theta);
|
bool PointGunInDirectionUsingArm(float phi, float theta);
|
||||||
bool PointGunAtPosition(CVector const& position);
|
bool PointGunAtPosition(CVector const& position);
|
||||||
void GetComponentPosition(RwV3d *pos, PedNode node);
|
void GetComponentPosition(RwV3d *pos, uint32 node);
|
||||||
static RwMatrix *GetWorldMatrix(RwFrame *source, RwMatrix *destination);
|
static RwMatrix *GetWorldMatrix(RwFrame *source, RwMatrix *destination);
|
||||||
void RotateTorso(AnimBlendFrameData* animBlend, LimbOrientation* limb, bool changeRoll);
|
void RotateTorso(AnimBlendFrameData* animBlend, LimbOrientation* limb, bool changeRoll);
|
||||||
void ExtractYawAndPitchLocal(RwMatrixTag *mat, float *yaw, float *pitch);
|
void ExtractYawAndPitchLocal(RwMatrixTag *mat, float *yaw, float *pitch);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "patcher.h"
|
#include "patcher.h"
|
||||||
|
#include "Ped.h"
|
||||||
#include "PedPlacement.h"
|
#include "PedPlacement.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Ped.h"
|
|
||||||
|
|
||||||
class CPedPlacement {
|
class CPedPlacement {
|
||||||
public:
|
public:
|
||||||
static void FindZCoorForPed(CVector* pos);
|
static void FindZCoorForPed(CVector* pos);
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "patcher.h"
|
#include "patcher.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
|
#include "Fire.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
|
#include "Pad.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
#include "WeaponEffects.h"
|
#include "WeaponEffects.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
|
#include "AnimBlendAssociation.h"
|
||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
#include "Darkel.h"
|
#include "Darkel.h"
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Ped.h"
|
#include "Ped.h"
|
||||||
#include "Wanted.h"
|
|
||||||
#include "Pad.h"
|
class CPad;
|
||||||
|
class CCopPed;
|
||||||
|
class CWanted;
|
||||||
|
|
||||||
class CPlayerPed : public CPed
|
class CPlayerPed : public CPed
|
||||||
{
|
{
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
#include "General.h"
|
#include "General.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Population.h"
|
#include "Population.h"
|
||||||
|
#include "CopPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "FileMgr.h"
|
#include "FileMgr.h"
|
||||||
#include "Gangs.h"
|
#include "Gangs.h"
|
||||||
#include "ModelIndices.h"
|
#include "ModelIndices.h"
|
||||||
@ -11,6 +13,7 @@
|
|||||||
#include "CivilianPed.h"
|
#include "CivilianPed.h"
|
||||||
#include "EmergencyPed.h"
|
#include "EmergencyPed.h"
|
||||||
#include "Replay.h"
|
#include "Replay.h"
|
||||||
|
#include "Camera.h"
|
||||||
#include "CutsceneMgr.h"
|
#include "CutsceneMgr.h"
|
||||||
#include "CarCtrl.h"
|
#include "CarCtrl.h"
|
||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
@ -110,7 +113,8 @@ CPopulation::ChooseCivilianOccupation(int32 group)
|
|||||||
return ms_pPedGroups[group].models[CGeneral::GetRandomNumberInRange(0, NUMMODELSPERPEDGROUP)];
|
return ms_pPedGroups[group].models[CGeneral::GetRandomNumberInRange(0, NUMMODELSPERPEDGROUP)];
|
||||||
}
|
}
|
||||||
|
|
||||||
eCopType
|
// returns eCopType
|
||||||
|
int32
|
||||||
CPopulation::ChoosePolicePedOccupation()
|
CPopulation::ChoosePolicePedOccupation()
|
||||||
{
|
{
|
||||||
CGeneral::GetRandomNumber();
|
CGeneral::GetRandomNumber();
|
||||||
@ -512,9 +516,9 @@ CPopulation::AddPed(ePedType pedType, uint32 miOrCopType, CVector const &coors)
|
|||||||
|
|
||||||
uint32 weapon;
|
uint32 weapon;
|
||||||
if (CGeneral::GetRandomNumberInRange(0, 100) >= 50)
|
if (CGeneral::GetRandomNumberInRange(0, 100) >= 50)
|
||||||
weapon = ped->GiveWeapon(CGangs::GetGangInfo(pedType - PEDTYPE_GANG1)->m_Weapon2, 25001);
|
weapon = ped->GiveWeapon((eWeaponType)CGangs::GetGangInfo(pedType - PEDTYPE_GANG1)->m_Weapon2, 25001);
|
||||||
else
|
else
|
||||||
weapon = ped->GiveWeapon(CGangs::GetGangInfo(pedType - PEDTYPE_GANG1)->m_Weapon1, 25001);
|
weapon = ped->GiveWeapon((eWeaponType)CGangs::GetGangInfo(pedType - PEDTYPE_GANG1)->m_Weapon1, 25001);
|
||||||
ped->SetCurrentWeapon(weapon);
|
ped->SetCurrentWeapon(weapon);
|
||||||
return ped;
|
return ped;
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "PedType.h"
|
#include "PedType.h"
|
||||||
#include "CopPed.h"
|
|
||||||
|
|
||||||
class CPed;
|
class CPed;
|
||||||
class CVehicle;
|
class CVehicle;
|
||||||
class CDummyObject;
|
class CDummyObject;
|
||||||
|
class CObject;
|
||||||
|
|
||||||
struct PedGroup
|
struct PedGroup
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ public:
|
|||||||
static bool IsPointInSafeZone(CVector *coors);
|
static bool IsPointInSafeZone(CVector *coors);
|
||||||
static void RemovePed(CPed *ent);
|
static void RemovePed(CPed *ent);
|
||||||
static int32 ChooseCivilianOccupation(int32);
|
static int32 ChooseCivilianOccupation(int32);
|
||||||
static eCopType ChoosePolicePedOccupation();
|
static int32 ChoosePolicePedOccupation();
|
||||||
static int32 ChooseGangOccupation(int);
|
static int32 ChooseGangOccupation(int);
|
||||||
static void FindCollisionZoneForCoors(CVector*, int*, eLevelName*);
|
static void FindCollisionZoneForCoors(CVector*, int*, eLevelName*);
|
||||||
static void FindClosestZoneForCoors(CVector*, int*, eLevelName, eLevelName);
|
static void FindClosestZoneForCoors(CVector*, int*, eLevelName, eLevelName);
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "Pad.h"
|
#include "Pad.h"
|
||||||
#include "Radar.h"
|
#include "Radar.h"
|
||||||
#include "Replay.h"
|
#include "Replay.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "Sprite.h"
|
#include "Sprite.h"
|
||||||
#include "Sprite2d.h"
|
#include "Sprite2d.h"
|
||||||
#include "Text.h"
|
#include "Text.h"
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "PathFind.h"
|
#include "PathFind.h"
|
||||||
#include "AnimManager.h"
|
#include "AnimManager.h"
|
||||||
#include "RpAnimBlend.h"
|
#include "RpAnimBlend.h"
|
||||||
|
#include "AnimBlendAssociation.h"
|
||||||
#include "Ped.h"
|
#include "Ped.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "WaterLevel.h"
|
#include "WaterLevel.h"
|
||||||
#include "PlayerPed.h"
|
#include "PlayerPed.h"
|
||||||
|
#include "Wanted.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
#include "Object.h"
|
#include "Object.h"
|
||||||
#include "HandlingMgr.h"
|
#include "HandlingMgr.h"
|
||||||
#include "Heli.h"
|
#include "Heli.h"
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
#include "Streaming.h"
|
#include "Streaming.h"
|
||||||
#include "Replay.h"
|
#include "Replay.h"
|
||||||
#include "Camera.h"
|
#include "Camera.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
|
#include "Wanted.h"
|
||||||
#include "Coronas.h"
|
#include "Coronas.h"
|
||||||
#include "Particle.h"
|
#include "Particle.h"
|
||||||
#include "Explosion.h"
|
#include "Explosion.h"
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "Coronas.h"
|
#include "Coronas.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Ped.h"
|
#include "Ped.h"
|
||||||
|
#include "DMAudio.h"
|
||||||
#include "HandlingMgr.h"
|
#include "HandlingMgr.h"
|
||||||
#include "Train.h"
|
#include "Train.h"
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include "Renderer.h"
|
#include "Renderer.h"
|
||||||
#include "DMAudio.h"
|
#include "DMAudio.h"
|
||||||
#include "Radar.h"
|
#include "Radar.h"
|
||||||
|
#include "Fire.h"
|
||||||
|
|
||||||
bool &CVehicle::bWheelsOnlyCheat = *(bool *)0x95CD78;
|
bool &CVehicle::bWheelsOnlyCheat = *(bool *)0x95CD78;
|
||||||
bool &CVehicle::bAllDodosCheat = *(bool *)0x95CD75;
|
bool &CVehicle::bAllDodosCheat = *(bool *)0x95CD75;
|
||||||
|
@ -3,7 +3,9 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "FileMgr.h"
|
#include "FileMgr.h"
|
||||||
#include "WeaponInfo.h"
|
#include "WeaponInfo.h"
|
||||||
|
#include "AnimManager.h"
|
||||||
#include "AnimBlendAssociation.h"
|
#include "AnimBlendAssociation.h"
|
||||||
|
#include "Weapon.h"
|
||||||
|
|
||||||
//CWeaponInfo (&CWeaponInfo::ms_apWeaponInfos)[14] = * (CWeaponInfo(*)[14]) * (uintptr*)0x6503EC;
|
//CWeaponInfo (&CWeaponInfo::ms_apWeaponInfos)[14] = * (CWeaponInfo(*)[14]) * (uintptr*)0x6503EC;
|
||||||
CWeaponInfo CWeaponInfo::ms_apWeaponInfos[WEAPONTYPE_TOTALWEAPONS];
|
CWeaponInfo CWeaponInfo::ms_apWeaponInfos[WEAPONTYPE_TOTALWEAPONS];
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "common.h"
|
|
||||||
#include "Weapon.h"
|
enum AnimationId;
|
||||||
#include "AnimManager.h"
|
enum eWeaponFire;
|
||||||
|
enum eWeaponType;
|
||||||
|
|
||||||
class CWeaponInfo {
|
class CWeaponInfo {
|
||||||
// static CWeaponInfo(&ms_apWeaponInfos)[14];
|
// static CWeaponInfo(&ms_apWeaponInfos)[14];
|
||||||
|
Loading…
Reference in New Issue
Block a user