mirror of
https://github.com/halpz/re3.git
synced 2024-12-27 18:25:28 +00:00
Merge branch 'miami' of https://github.com/GTAmodding/re3 into miami
This commit is contained in:
commit
d4efd003bc
|
@ -14,7 +14,7 @@ such that we have a working game at all times.
|
||||||
|
|
||||||
## How can I try it?
|
## How can I try it?
|
||||||
|
|
||||||
- re3 requires game assets to work, so you **must** own a copy of GTA III.
|
- re3 requires game assets to work, so you **must** own [a copy of GTA III](https://store.steampowered.com/app/12100/Grand_Theft_Auto_III/).
|
||||||
- Build re3 or download it from one of the above links (Debug or Release).
|
- Build re3 or download it from one of the above links (Debug or Release).
|
||||||
- (Optional) If you want to use optional features like Russian language or menu map, copy the files in /gamefiles folder to your game root folder.
|
- (Optional) If you want to use optional features like Russian language or menu map, copy the files in /gamefiles folder to your game root folder.
|
||||||
- Move re3.exe to GTA 3 directory and run it.
|
- Move re3.exe to GTA 3 directory and run it.
|
||||||
|
|
|
@ -47,6 +47,8 @@ function getarch(a)
|
||||||
return 'amd64'
|
return 'amd64'
|
||||||
elseif a == 'ARM' then
|
elseif a == 'ARM' then
|
||||||
return 'arm'
|
return 'arm'
|
||||||
|
elseif a == 'ARM64' then
|
||||||
|
return 'arm64'
|
||||||
end
|
end
|
||||||
return a
|
return a
|
||||||
end
|
end
|
||||||
|
@ -75,6 +77,7 @@ workspace "reVC"
|
||||||
"linux-x86-librw_gl3_glfw-oal",
|
"linux-x86-librw_gl3_glfw-oal",
|
||||||
"linux-amd64-librw_gl3_glfw-oal",
|
"linux-amd64-librw_gl3_glfw-oal",
|
||||||
"linux-arm-librw_gl3_glfw-oal",
|
"linux-arm-librw_gl3_glfw-oal",
|
||||||
|
"linux-arm64-librw_gl3_glfw-oal",
|
||||||
}
|
}
|
||||||
|
|
||||||
filter { "system:bsd" }
|
filter { "system:bsd" }
|
||||||
|
|
|
@ -139,4 +139,5 @@ public:
|
||||||
static void LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32] = nil);
|
static void LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32] = nil);
|
||||||
static void CreateAnimAssocGroups(void);
|
static void CreateAnimAssocGroups(void);
|
||||||
static void RemoveLastAnimFile(void);
|
static void RemoveLastAnimFile(void);
|
||||||
|
static CAnimBlendAssocGroup* GetAnimAssocGroups(void) { return ms_aAnimAssocGroups; }
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -811,7 +811,11 @@ cAudioManager::ProcessActiveQueues()
|
||||||
if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) {
|
if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) {
|
||||||
int32 freq;
|
int32 freq;
|
||||||
if (sample.m_nFrequency <= m_asActiveSamples[j].m_nFrequency) {
|
if (sample.m_nFrequency <= m_asActiveSamples[j].m_nFrequency) {
|
||||||
freq = Max(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency - 6000);
|
#ifdef FIX_BUGS
|
||||||
|
freq = Max((int32)sample.m_nFrequency, (int32)m_asActiveSamples[j].m_nFrequency - 6000);
|
||||||
|
#else
|
||||||
|
freq = Max((int32)sample.m_nFrequency, int32(m_asActiveSamples[j].m_nFrequency - 6000));
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
freq = Min(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency + 6000);
|
freq = Min(sample.m_nFrequency, m_asActiveSamples[j].m_nFrequency + 6000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,13 +241,13 @@ public:
|
||||||
// "Should" be in alphabetic order, except "getXTalkSfx"
|
// "Should" be in alphabetic order, except "getXTalkSfx"
|
||||||
void AddDetailsToRequestedOrderList(uint8 sample);
|
void AddDetailsToRequestedOrderList(uint8 sample);
|
||||||
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank,
|
void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank,
|
||||||
uint8 counter, bool notLooping);
|
uint8 counter, bool notLooping); //done
|
||||||
void AddReflectionsToRequestedQueue();
|
void AddReflectionsToRequestedQueue();
|
||||||
void AddReleasingSounds();
|
void AddReleasingSounds();
|
||||||
void AddSampleToRequestedQueue();
|
void AddSampleToRequestedQueue();
|
||||||
void AgeCrimes();
|
void AgeCrimes();
|
||||||
|
|
||||||
void CalculateDistance(bool &condition, float dist);
|
void CalculateDistance(bool &condition, float dist); //done
|
||||||
bool CheckForAnAudioFileOnCD() const;
|
bool CheckForAnAudioFileOnCD() const;
|
||||||
void ClearActiveSamples();
|
void ClearActiveSamples();
|
||||||
void ClearMissionAudio(uint8 slot);
|
void ClearMissionAudio(uint8 slot);
|
||||||
|
@ -275,7 +275,7 @@ public:
|
||||||
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
|
float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used
|
||||||
float GetCollisionOneShotRatio(int32 a, float b) const;
|
float GetCollisionOneShotRatio(int32 a, float b) const;
|
||||||
float GetCollisionRatio(float a, float b, float c, float d) const;
|
float GetCollisionRatio(float a, float b, float c, float d) const;
|
||||||
float GetDistanceSquared(const CVector &v) const;
|
float GetDistanceSquared(const CVector &v) const; //done
|
||||||
int32 GetJumboTaxiFreq() const;
|
int32 GetJumboTaxiFreq() const;
|
||||||
uint8 GetMissionAudioLoadingStatus(uint8 slot) const;
|
uint8 GetMissionAudioLoadingStatus(uint8 slot) const;
|
||||||
int8 GetMissionScriptPoliceAudioPlayingStatus() const;
|
int8 GetMissionScriptPoliceAudioPlayingStatus() const;
|
||||||
|
@ -287,7 +287,7 @@ public:
|
||||||
float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
|
float GetVehicleNonDriveWheelSkidValue(uint8 wheel, CAutomobile *automobile,
|
||||||
cTransmission *transmission, float velocityChange);
|
cTransmission *transmission, float velocityChange);
|
||||||
|
|
||||||
bool HasAirBrakes(int32 model) const;
|
bool HasAirBrakes(int32 model) const; //done
|
||||||
|
|
||||||
void Initialise();
|
void Initialise();
|
||||||
void InitialisePoliceRadio();
|
void InitialisePoliceRadio();
|
||||||
|
@ -302,13 +302,13 @@ public:
|
||||||
void PlayLoadedMissionAudio(uint8 slot);
|
void PlayLoadedMissionAudio(uint8 slot);
|
||||||
void PlayOneShot(int32 index, int16 sound, float vol);
|
void PlayOneShot(int32 index, int16 sound, float vol);
|
||||||
void PlaySuspectLastSeen(float x, float y, float z);
|
void PlaySuspectLastSeen(float x, float y, float z);
|
||||||
void PlayerJustGotInCar() const;
|
void PlayerJustGotInCar() const; //done
|
||||||
void PlayerJustLeftCar() const;
|
void PlayerJustLeftCar() const; //done
|
||||||
void PostInitialiseGameSpecificSetup();
|
void PostInitialiseGameSpecificSetup();
|
||||||
void PostTerminateGameSpecificShutdown();
|
void PostTerminateGameSpecificShutdown(); //done
|
||||||
void PreInitialiseGameSpecificSetup() const;
|
void PreInitialiseGameSpecificSetup() const; //done
|
||||||
void PreloadMissionAudio(uint8 slot, Const char *name);
|
void PreloadMissionAudio(uint8 slot, Const char *name);
|
||||||
void PreTerminateGameSpecificShutdown();
|
void PreTerminateGameSpecificShutdown(); //done
|
||||||
/// processX - main logic of adding new sounds
|
/// processX - main logic of adding new sounds
|
||||||
void ProcessActiveQueues();
|
void ProcessActiveQueues();
|
||||||
bool ProcessAirBrakes(cVehicleParams *params);
|
bool ProcessAirBrakes(cVehicleParams *params);
|
||||||
|
@ -320,17 +320,18 @@ public:
|
||||||
void ProcessBridgeOneShots();
|
void ProcessBridgeOneShots();
|
||||||
void ProcessBridgeWarning();
|
void ProcessBridgeWarning();
|
||||||
#endif
|
#endif
|
||||||
bool ProcessCarBombTick(cVehicleParams *params);
|
bool ProcessCarBombTick(cVehicleParams *params); //done
|
||||||
void ProcessCesna(cVehicleParams *params);
|
void ProcessCesna(cVehicleParams *params);
|
||||||
//void ProcessCrane();
|
//void ProcessCrane();
|
||||||
bool ProcessEngineDamage(cVehicleParams *params);
|
bool ProcessEngineDamage(cVehicleParams *params); //done
|
||||||
void ProcessEntity(int32 sound);
|
void ProcessEntity(int32 sound); //done
|
||||||
void ProcessExplosions(int32 explosion);
|
void ProcessExplosions(int32 explosion);
|
||||||
void ProcessFireHydrant();
|
void ProcessFireHydrant();
|
||||||
void ProcessFires(int32 entity);
|
void ProcessFires(int32 entity);
|
||||||
void ProcessFrontEnd();
|
void ProcessFrontEnd();
|
||||||
void ProcessGarages();
|
void ProcessGarages();
|
||||||
bool ProcessHelicopter(cVehicleParams *params);
|
void ProcessCarHeli(cVehicleParams* params); //done
|
||||||
|
void ProcessVehicleFlatTyre(cVehicleParams* params); //done
|
||||||
void ProcessJumbo(cVehicleParams *);
|
void ProcessJumbo(cVehicleParams *);
|
||||||
void ProcessJumboAccel(CPlane *plane);
|
void ProcessJumboAccel(CPlane *plane);
|
||||||
void ProcessJumboDecel(CPlane *plane);
|
void ProcessJumboDecel(CPlane *plane);
|
||||||
|
@ -345,22 +346,22 @@ public:
|
||||||
void ProcessOneShotScriptObject(uint8 sound);
|
void ProcessOneShotScriptObject(uint8 sound);
|
||||||
void ProcessPed(CPhysical *ped);
|
void ProcessPed(CPhysical *ped);
|
||||||
void ProcessPedOneShots(cPedParams *params);
|
void ProcessPedOneShots(cPedParams *params);
|
||||||
void ProcessPhysical(int32 id);
|
void ProcessPhysical(int32 id); //done
|
||||||
void ProcessPlane(cVehicleParams *params);
|
void ProcessPlane(cVehicleParams *params); //done
|
||||||
void ProcessPlayersVehicleEngine(cVehicleParams *params, CVehicle* veh);
|
void ProcessPlayersVehicleEngine(cVehicleParams *params, CVehicle* veh); //done
|
||||||
void ProcessProjectiles();
|
void ProcessProjectiles();
|
||||||
void ProcessRainOnVehicle(cVehicleParams *params);
|
void ProcessRainOnVehicle(cVehicleParams *params);
|
||||||
void ProcessReverb() const;
|
void ProcessReverb() const;
|
||||||
bool ProcessReverseGear(cVehicleParams *params);
|
bool ProcessReverseGear(cVehicleParams *params); //done
|
||||||
void ProcessScriptObject(int32 id);
|
void ProcessScriptObject(int32 id); //done
|
||||||
void ProcessSpecial();
|
void ProcessSpecial();
|
||||||
#ifdef GTA_TRAIN
|
#ifdef GTA_TRAIN
|
||||||
bool ProcessTrainNoise(cVehicleParams *params);
|
bool ProcessTrainNoise(cVehicleParams *params);
|
||||||
#endif
|
#endif
|
||||||
void ProcessVehicle(CVehicle *vehicle);
|
void ProcessVehicle(CVehicle *vehicle); //done, but need add model functions
|
||||||
bool ProcessVehicleDoors(cVehicleParams *params);
|
bool ProcessVehicleDoors(cVehicleParams *params); //done
|
||||||
void ProcessVehicleEngine(cVehicleParams *params);
|
void ProcessVehicleEngine(cVehicleParams *params); //done
|
||||||
void UpdateGasPedalAudio(CVehicle* veh, int vehType);
|
void UpdateGasPedalAudio(CVehicle* veh, int vehType); //done
|
||||||
void ProcessVehicleHorn(cVehicleParams *params);
|
void ProcessVehicleHorn(cVehicleParams *params);
|
||||||
void ProcessVehicleOneShots(cVehicleParams *params);
|
void ProcessVehicleOneShots(cVehicleParams *params);
|
||||||
bool ProcessVehicleReverseWarning(cVehicleParams *params);
|
bool ProcessVehicleReverseWarning(cVehicleParams *params);
|
||||||
|
@ -368,8 +369,10 @@ public:
|
||||||
bool ProcessVehicleSirenOrAlarm(cVehicleParams *params);
|
bool ProcessVehicleSirenOrAlarm(cVehicleParams *params);
|
||||||
bool ProcessVehicleSkidding(cVehicleParams *params);
|
bool ProcessVehicleSkidding(cVehicleParams *params);
|
||||||
void ProcessWaterCannon(int32);
|
void ProcessWaterCannon(int32);
|
||||||
void ProcessWeather(int32 id);
|
void ProcessWeather(int32 id); //done
|
||||||
bool ProcessWetRoadNoise(cVehicleParams *params);
|
bool ProcessWetRoadNoise(cVehicleParams *params);
|
||||||
|
void ProcessEscalators(); //done
|
||||||
|
void ProcessExtraSounds(); //done
|
||||||
|
|
||||||
int32 RandomDisplacement(uint32 seed) const;
|
int32 RandomDisplacement(uint32 seed) const;
|
||||||
void ReacquireDigitalHandle() const;
|
void ReacquireDigitalHandle() const;
|
||||||
|
@ -402,11 +405,11 @@ public:
|
||||||
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter);
|
void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter);
|
||||||
void SetUpOneShotCollisionSound(const cAudioCollision &col);
|
void SetUpOneShotCollisionSound(const cAudioCollision &col);
|
||||||
bool SetupCrimeReport();
|
bool SetupCrimeReport();
|
||||||
bool SetupJumboEngineSound(uint8 vol, int32 freq);
|
bool SetupJumboEngineSound(uint8 vol, uint32 freq);
|
||||||
bool SetupJumboFlySound(uint8 emittingVol);
|
bool SetupJumboFlySound(uint8 emittingVol);
|
||||||
bool SetupJumboRumbleSound(uint8 emittingVol);
|
bool SetupJumboRumbleSound(uint8 emittingVol);
|
||||||
bool SetupJumboTaxiSound(uint8 vol);
|
bool SetupJumboTaxiSound(uint8 vol);
|
||||||
bool SetupJumboWhineSound(uint8 emittingVol, int32 freq);
|
bool SetupJumboWhineSound(uint8 emittingVol, uint32 freq);
|
||||||
void SetupPedComments(cPedParams *params, uint32 sound);
|
void SetupPedComments(cPedParams *params, uint32 sound);
|
||||||
void SetupSuspectLastSeenReport();
|
void SetupSuspectLastSeenReport();
|
||||||
|
|
||||||
|
@ -414,11 +417,11 @@ public:
|
||||||
void TranslateEntity(Const CVector *v1, CVector *v2) const;
|
void TranslateEntity(Const CVector *v1, CVector *v2) const;
|
||||||
|
|
||||||
void UpdateReflections();
|
void UpdateReflections();
|
||||||
bool UsesReverseWarning(int32 model) const;
|
bool UsesReverseWarning(int32 model) const; //done
|
||||||
bool UsesSiren(int32 model) const;
|
bool UsesSiren(int32 model) const;
|
||||||
bool UsesSirenSwitching(int32 model) const;
|
bool UsesSirenSwitching(int32 model) const;
|
||||||
|
|
||||||
CVehicle *FindVehicleOfPlayer();
|
CVehicle *FindVehicleOfPlayer(); //done
|
||||||
void SetPedTalkingStatus(CPed *ped, uint8 status);
|
void SetPedTalkingStatus(CPed *ped, uint8 status);
|
||||||
void SetPlayersMood(uint8 mood, int32 time);
|
void SetPlayersMood(uint8 mood, int32 time);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
cSampleManager SampleManager;
|
cSampleManager SampleManager;
|
||||||
bool _bSampmanInitialised = false;
|
bool _bSampmanInitialised = false;
|
||||||
|
|
||||||
uint32 BankStartOffset[MAX_SAMPLEBANKS];
|
uint32 BankStartOffset[MAX_SFX_BANKS];
|
||||||
uint32 nNumMP3s;
|
uint32 nNumMP3s;
|
||||||
|
|
||||||
cSampleManager::cSampleManager(void)
|
cSampleManager::cSampleManager(void)
|
||||||
|
@ -136,20 +136,20 @@ cSampleManager::SetMonoMode(uint8 nMode)
|
||||||
bool
|
bool
|
||||||
cSampleManager::LoadSampleBank(uint8 nBank)
|
cSampleManager::LoadSampleBank(uint8 nBank)
|
||||||
{
|
{
|
||||||
ASSERT( nBank < MAX_SAMPLEBANKS );
|
ASSERT( nBank < MAX_SFX_BANKS );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cSampleManager::UnloadSampleBank(uint8 nBank)
|
cSampleManager::UnloadSampleBank(uint8 nBank)
|
||||||
{
|
{
|
||||||
ASSERT( nBank < MAX_SAMPLEBANKS );
|
ASSERT( nBank < MAX_SFX_BANKS );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
cSampleManager::IsSampleBankLoaded(uint8 nBank)
|
cSampleManager::IsSampleBankLoaded(uint8 nBank)
|
||||||
{
|
{
|
||||||
ASSERT( nBank < MAX_SAMPLEBANKS );
|
ASSERT( nBank < MAX_SFX_BANKS );
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
|
||||||
int32
|
int32
|
||||||
cSampleManager::GetBankContainingSound(uint32 offset)
|
cSampleManager::GetBankContainingSound(uint32 offset)
|
||||||
{
|
{
|
||||||
return SAMPLEBANK_INVALID;
|
return INVALID_SFX_BANK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32
|
int32
|
||||||
|
|
|
@ -1819,7 +1819,13 @@ CVehicle* CStoredCar::RestoreCar()
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
if (pVehicle->IsCar())
|
if (pVehicle->IsCar())
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
((CAutomobile*)pVehicle)->m_bombType = m_nCarBombType;
|
((CAutomobile*)pVehicle)->m_bombType = m_nCarBombType;
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if (m_nCarBombType != CARBOMB_NONE)
|
||||||
|
((CAutomobile*)pVehicle)->m_pBombRigger = FindPlayerPed();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
pVehicle->bHasBeenOwnedByPlayer = true;
|
pVehicle->bHasBeenOwnedByPlayer = true;
|
||||||
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||||
pVehicle->bBulletProof = m_bBulletproof;
|
pVehicle->bBulletProof = m_bBulletproof;
|
||||||
|
|
|
@ -300,5 +300,6 @@ private:
|
||||||
static bool IsThisGarageTypeSafehouse(eGarageType type) { return FindSafeHouseIndexForGarageType(type) >= 0; }
|
static bool IsThisGarageTypeSafehouse(eGarageType type) { return FindSafeHouseIndexForGarageType(type) >= 0; }
|
||||||
|
|
||||||
friend class cAudioManager;
|
friend class cAudioManager;
|
||||||
|
friend class CReplay;
|
||||||
friend class CGarage;
|
friend class CGarage;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1869,6 +1869,13 @@ CPathFind::TakeWidthIntoAccountForWandering(CPathNode* nextNode, uint16 random)
|
||||||
return CVector(newX, newY, pos.z);
|
return CVector(newX, newY, pos.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CPathFind::TakeWidthIntoAccountForCoors(CPathNode* node1, CPathNode* node2, uint16 random, float* x, float* y)
|
||||||
|
{
|
||||||
|
*x += (Min(node1->width, node2->width) * ((random % 16) - 7));
|
||||||
|
*y += (Min(node1->width, node2->width) * (((random / 16) % 16) - 7));
|
||||||
|
}
|
||||||
|
|
||||||
CPathNode*
|
CPathNode*
|
||||||
CPathFind::GetNode(int16 index)
|
CPathFind::GetNode(int16 index)
|
||||||
{
|
{
|
||||||
|
|
|
@ -255,6 +255,7 @@ public:
|
||||||
void Load(uint8 *buf, uint32 size);
|
void Load(uint8 *buf, uint32 size);
|
||||||
|
|
||||||
static CVector TakeWidthIntoAccountForWandering(CPathNode*, uint16);
|
static CVector TakeWidthIntoAccountForWandering(CPathNode*, uint16);
|
||||||
|
static void TakeWidthIntoAccountForCoors(CPathNode*, CPathNode*, uint16, float*, float*);
|
||||||
|
|
||||||
CPathNode *GetNode(int16 index);
|
CPathNode *GetNode(int16 index);
|
||||||
int16 GetIndex(CPathNode *node);
|
int16 GetIndex(CPathNode *node);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "Pools.h"
|
#include "Pools.h"
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
|
#include "WeaponEffects.h"
|
||||||
#include "ParticleType.h"
|
#include "ParticleType.h"
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
|
@ -25,14 +26,17 @@ struct CStoredAnimationState
|
||||||
uint8 animId;
|
uint8 animId;
|
||||||
uint8 time;
|
uint8 time;
|
||||||
uint8 speed;
|
uint8 speed;
|
||||||
|
uint8 groupId;
|
||||||
uint8 secAnimId;
|
uint8 secAnimId;
|
||||||
uint8 secTime;
|
uint8 secTime;
|
||||||
uint8 secSpeed;
|
uint8 secSpeed;
|
||||||
|
uint8 secGroupId;
|
||||||
uint8 blendAmount;
|
uint8 blendAmount;
|
||||||
uint8 partAnimId;
|
uint8 partAnimId;
|
||||||
uint8 partAnimTime;
|
uint8 partAnimTime;
|
||||||
uint8 partAnimSpeed;
|
uint8 partAnimSpeed;
|
||||||
uint8 partBlendAmount;
|
uint8 partBlendAmount;
|
||||||
|
uint8 partGroupId;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -46,20 +50,18 @@ struct CStoredDetailedAnimationState
|
||||||
uint8 aCurTime[NUM_MAIN_ANIMS_IN_REPLAY];
|
uint8 aCurTime[NUM_MAIN_ANIMS_IN_REPLAY];
|
||||||
uint8 aSpeed[NUM_MAIN_ANIMS_IN_REPLAY];
|
uint8 aSpeed[NUM_MAIN_ANIMS_IN_REPLAY];
|
||||||
uint8 aBlendAmount[NUM_MAIN_ANIMS_IN_REPLAY];
|
uint8 aBlendAmount[NUM_MAIN_ANIMS_IN_REPLAY];
|
||||||
#ifdef FIX_REPLAY_BUGS
|
|
||||||
int8 aBlendDelta[NUM_MAIN_ANIMS_IN_REPLAY];
|
int8 aBlendDelta[NUM_MAIN_ANIMS_IN_REPLAY];
|
||||||
#endif
|
|
||||||
uint8 aFunctionCallbackID[NUM_MAIN_ANIMS_IN_REPLAY];
|
uint8 aFunctionCallbackID[NUM_MAIN_ANIMS_IN_REPLAY];
|
||||||
uint16 aFlags[NUM_MAIN_ANIMS_IN_REPLAY];
|
uint16 aFlags[NUM_MAIN_ANIMS_IN_REPLAY];
|
||||||
|
uint8 aGroupId[NUM_MAIN_ANIMS_IN_REPLAY];
|
||||||
uint8 aAnimId2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
uint8 aAnimId2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
||||||
uint8 aCurTime2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
uint8 aCurTime2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
||||||
uint8 aSpeed2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
uint8 aSpeed2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
||||||
uint8 aBlendAmount2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
uint8 aBlendAmount2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
||||||
#ifdef FIX_REPLAY_BUGS
|
|
||||||
int8 aBlendDelta2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
int8 aBlendDelta2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
||||||
#endif
|
|
||||||
uint8 aFunctionCallbackID2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
uint8 aFunctionCallbackID2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
||||||
uint16 aFlags2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
uint16 aFlags2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
||||||
|
uint8 aGroupId2[NUM_PARTIAL_ANIMS_IN_REPLAY];
|
||||||
};
|
};
|
||||||
|
|
||||||
void PlayReplayFromHD(void);
|
void PlayReplayFromHD(void);
|
||||||
|
@ -73,21 +75,24 @@ class CReplay
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
REPLAYCAMMODE_ASSTORED = 0,
|
REPLAYCAMMODE_ASSTORED = 0,
|
||||||
REPLAYCAMMODE_TOPDOWN = 1,
|
REPLAYCAMMODE_TOPDOWN,
|
||||||
REPLAYCAMMODE_FIXED = 2
|
REPLAYCAMMODE_FIXED
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
REPLAYPACKET_END = 0,
|
REPLAYPACKET_END = 0,
|
||||||
REPLAYPACKET_VEHICLE = 1,
|
REPLAYPACKET_VEHICLE,
|
||||||
REPLAYPACKET_PED_HEADER = 2,
|
REPLAYPACKET_BIKE,
|
||||||
REPLAYPACKET_PED_UPDATE = 3,
|
REPLAYPACKET_PED_HEADER,
|
||||||
REPLAYPACKET_GENERAL = 4,
|
REPLAYPACKET_PED_UPDATE,
|
||||||
REPLAYPACKET_CLOCK = 5,
|
REPLAYPACKET_GENERAL,
|
||||||
REPLAYPACKET_WEATHER = 6,
|
REPLAYPACKET_CLOCK,
|
||||||
REPLAYPACKET_ENDOFFRAME = 7,
|
REPLAYPACKET_WEATHER,
|
||||||
REPLAYPACKET_TIMER = 8,
|
REPLAYPACKET_ENDOFFRAME,
|
||||||
REPLAYPACKET_BULLET_TRACES = 9
|
REPLAYPACKET_TIMER,
|
||||||
|
REPLAYPACKET_BULLET_TRACES,
|
||||||
|
REPLAYPACKET_PARTICLE,
|
||||||
|
REPLAYPACKET_MISC
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
@ -176,8 +181,9 @@ class CReplay
|
||||||
int8 vehicle_index;
|
int8 vehicle_index;
|
||||||
CStoredAnimationState anim_state;
|
CStoredAnimationState anim_state;
|
||||||
CCompressedMatrixNotAligned matrix;
|
CCompressedMatrixNotAligned matrix;
|
||||||
int8 assoc_group_id;
|
|
||||||
uint16 weapon_model;
|
uint16 weapon_model;
|
||||||
|
int8 assoc_group_id;
|
||||||
|
bool is_visible;
|
||||||
};
|
};
|
||||||
VALIDATE_SIZE(tPedUpdatePacket, 40);
|
VALIDATE_SIZE(tPedUpdatePacket, 40);
|
||||||
|
|
||||||
|
@ -203,8 +209,64 @@ class CReplay
|
||||||
uint8 door_status;
|
uint8 door_status;
|
||||||
uint8 primary_color;
|
uint8 primary_color;
|
||||||
uint8 secondary_color;
|
uint8 secondary_color;
|
||||||
|
bool render_scorched;
|
||||||
|
int8 skimmer_speed;
|
||||||
|
int8 vehicle_type;
|
||||||
|
|
||||||
};
|
};
|
||||||
VALIDATE_SIZE(tVehicleUpdatePacket, 48);
|
VALIDATE_SIZE(tVehicleUpdatePacket, 52);
|
||||||
|
|
||||||
|
struct tBikeUpdatePacket
|
||||||
|
{
|
||||||
|
uint8 type;
|
||||||
|
uint8 index;
|
||||||
|
uint8 health;
|
||||||
|
uint8 acceleration;
|
||||||
|
CCompressedMatrixNotAligned matrix;
|
||||||
|
int8 door_angles[2];
|
||||||
|
uint16 mi;
|
||||||
|
int8 velocityX;
|
||||||
|
int8 velocityY;
|
||||||
|
int8 velocityZ;
|
||||||
|
int8 wheel_state;
|
||||||
|
uint8 wheel_susp_dist[4];
|
||||||
|
uint8 wheel_rotation[4];
|
||||||
|
uint8 primary_color;
|
||||||
|
uint8 secondary_color;
|
||||||
|
int8 lean_angle;
|
||||||
|
int8 wheel_angle;
|
||||||
|
|
||||||
|
};
|
||||||
|
VALIDATE_SIZE(tBikeUpdatePacket, 44);
|
||||||
|
|
||||||
|
struct tParticlePacket
|
||||||
|
{
|
||||||
|
uint8 type;
|
||||||
|
uint8 particle_type;
|
||||||
|
int8 dir_x;
|
||||||
|
int8 dir_y;
|
||||||
|
int8 dir_z;
|
||||||
|
uint8 r;
|
||||||
|
uint8 g;
|
||||||
|
uint8 b;
|
||||||
|
uint8 a;
|
||||||
|
int16 pos_x;
|
||||||
|
int16 pos_y;
|
||||||
|
int16 pos_z;
|
||||||
|
float size;
|
||||||
|
};
|
||||||
|
VALIDATE_SIZE(tParticlePacket, 20);
|
||||||
|
|
||||||
|
struct tMiscPacket
|
||||||
|
{
|
||||||
|
uint8 type;
|
||||||
|
uint32 cam_shake_start;
|
||||||
|
float cam_shake_strength;
|
||||||
|
uint8 cur_area;
|
||||||
|
uint8 special_fx_flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
VALIDATE_SIZE(tMiscPacket, 16);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static uint8 Mode;
|
static uint8 Mode;
|
||||||
|
@ -269,6 +331,31 @@ private:
|
||||||
static float fDistanceLookAroundCam;
|
static float fDistanceLookAroundCam;
|
||||||
static float fAlphaAngleLookAroundCam;
|
static float fAlphaAngleLookAroundCam;
|
||||||
static float fBetaAngleLookAroundCam;
|
static float fBetaAngleLookAroundCam;
|
||||||
|
static int ms_nNumCivMale_Stored;
|
||||||
|
static int ms_nNumCivFemale_Stored;
|
||||||
|
static int ms_nNumCop_Stored;
|
||||||
|
static int ms_nNumEmergency_Stored;
|
||||||
|
static int ms_nNumGang1_Stored;
|
||||||
|
static int ms_nNumGang2_Stored;
|
||||||
|
static int ms_nNumGang3_Stored;
|
||||||
|
static int ms_nNumGang4_Stored;
|
||||||
|
static int ms_nNumGang5_Stored;
|
||||||
|
static int ms_nNumGang6_Stored;
|
||||||
|
static int ms_nNumGang7_Stored;
|
||||||
|
static int ms_nNumGang8_Stored;
|
||||||
|
static int ms_nNumGang9_Stored;
|
||||||
|
static int ms_nNumDummy_Stored;
|
||||||
|
static int ms_nTotalCarPassengerPeds_Stored;
|
||||||
|
static int ms_nTotalCivPeds_Stored;
|
||||||
|
static int ms_nTotalGangPeds_Stored;
|
||||||
|
static int ms_nTotalPeds_Stored;
|
||||||
|
static int ms_nTotalMissionPeds_Stored;
|
||||||
|
static uint8* pGarages;
|
||||||
|
static CFire* FireArray;
|
||||||
|
static uint32 NumOfFires;
|
||||||
|
static uint8* paProjectileInfo;
|
||||||
|
static uint8* paProjectiles;
|
||||||
|
static uint8 CurrArea;
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
static int nHandleOfPlayerPed[NUMPLAYERS];
|
static int nHandleOfPlayerPed[NUMPLAYERS];
|
||||||
#endif
|
#endif
|
||||||
|
@ -288,8 +375,7 @@ public:
|
||||||
static bool IsPlayingBack() { return Mode == MODE_PLAYBACK; }
|
static bool IsPlayingBack() { return Mode == MODE_PLAYBACK; }
|
||||||
static bool IsPlayingBackFromFile() { return bPlayingBackFromFile; }
|
static bool IsPlayingBackFromFile() { return bPlayingBackFromFile; }
|
||||||
|
|
||||||
static void RecordParticle(tParticleType type, CVector const &vecPos, CVector const &vecDir, float fSize, RwRGBA const&color)
|
static void RecordParticle(tParticleType type, CVector const& vecPos, CVector const& vecDir, float fSize, RwRGBA const& color);
|
||||||
{ } //TODO
|
|
||||||
private:
|
private:
|
||||||
static void RecordThisFrame(void);
|
static void RecordThisFrame(void);
|
||||||
static void StorePedUpdate(CPed *ped, int id);
|
static void StorePedUpdate(CPed *ped, int id);
|
||||||
|
@ -302,7 +388,9 @@ private:
|
||||||
static void TriggerPlaybackLastCoupleOfSeconds(uint32, uint8, float, float, float, uint32);
|
static void TriggerPlaybackLastCoupleOfSeconds(uint32, uint8, float, float, float, uint32);
|
||||||
static bool FastForwardToTime(uint32);
|
static bool FastForwardToTime(uint32);
|
||||||
static void StoreCarUpdate(CVehicle *vehicle, int id);
|
static void StoreCarUpdate(CVehicle *vehicle, int id);
|
||||||
|
static void StoreBikeUpdate(CVehicle* vehicle, int id);
|
||||||
static void ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressInReplayBuffer *buffer);
|
static void ProcessCarUpdate(CVehicle *vehicle, float interpolation, CAddressInReplayBuffer *buffer);
|
||||||
|
static void ProcessBikeUpdate(CVehicle* vehicle, float interpolation, CAddressInReplayBuffer* buffer);
|
||||||
static bool PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, float interpolation, uint32 *pTimer);
|
static bool PlayBackThisFrameInterpolation(CAddressInReplayBuffer *buffer, float interpolation, uint32 *pTimer);
|
||||||
static void ProcessReplayCamera(void);
|
static void ProcessReplayCamera(void);
|
||||||
static void StoreStuffInMem(void);
|
static void StoreStuffInMem(void);
|
||||||
|
@ -314,6 +402,7 @@ private:
|
||||||
static void FindFirstFocusCoordinate(CVector *coord);
|
static void FindFirstFocusCoordinate(CVector *coord);
|
||||||
static void ProcessLookAroundCam(void);
|
static void ProcessLookAroundCam(void);
|
||||||
static size_t FindSizeOfPacket(uint8);
|
static size_t FindSizeOfPacket(uint8);
|
||||||
|
static void GoToNextBlock(void);
|
||||||
|
|
||||||
/* Absolute nonsense, but how could this function end up being outside of class? */
|
/* Absolute nonsense, but how could this function end up being outside of class? */
|
||||||
friend void PlayReplayFromHD(void);
|
friend void PlayReplayFromHD(void);
|
||||||
|
|
|
@ -92,9 +92,15 @@ CRoadBlocks::GenerateRoadBlockCopsForCar(CVehicle* pVehicle, int32 roadBlockType
|
||||||
pCopPed->SetIdle();
|
pCopPed->SetIdle();
|
||||||
pCopPed->bKindaStayInSamePlace = true;
|
pCopPed->bKindaStayInSamePlace = true;
|
||||||
pCopPed->bNotAllowedToDuck = false;
|
pCopPed->bNotAllowedToDuck = false;
|
||||||
pCopPed->bCrouchWhenShooting = roadBlockType != 2;
|
pCopPed->m_nExtendedRangeTimer = CTimer::GetTimeInMilliseconds() + 10000;
|
||||||
|
pCopPed->m_nRoadblockVeh = pVehicle;
|
||||||
|
pCopPed->m_nRoadblockVeh->RegisterReference((CEntity**)&pCopPed->m_nRoadblockVeh);
|
||||||
|
pCopPed->bCrouchWhenShooting = roadBlockType == 2 ? false : true;
|
||||||
if (pEntityToAttack) {
|
if (pEntityToAttack) {
|
||||||
|
if (pCopPed->m_pPointGunAt)
|
||||||
|
pCopPed->m_pPointGunAt->CleanUpOldReference(&pCopPed->m_pPointGunAt);
|
||||||
pCopPed->m_pPointGunAt = pEntityToAttack;
|
pCopPed->m_pPointGunAt = pEntityToAttack;
|
||||||
|
if (pEntityToAttack)
|
||||||
pEntityToAttack->RegisterReference(&pCopPed->m_pPointGunAt);
|
pEntityToAttack->RegisterReference(&pCopPed->m_pPointGunAt);
|
||||||
pCopPed->SetAttack(pEntityToAttack);
|
pCopPed->SetAttack(pEntityToAttack);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10098,11 +10098,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
|
||||||
model = CStreaming::ms_vehiclesLoaded[index];
|
model = CStreaming::ms_vehiclesLoaded[index];
|
||||||
if (model == -1)
|
if (model == -1)
|
||||||
continue;
|
continue;
|
||||||
// desperatly want to believe this was inlined :|
|
if (CModelInfo::IsCarModel(model) || CModelInfo::IsBikeModel(model)) {
|
||||||
CBaseModelInfo* pInfo = CModelInfo::GetModelInfo(model);
|
|
||||||
script_assert(pInfo->GetModelType() == MITYPE_VEHICLE);
|
|
||||||
CVehicleModelInfo* pVehicleInfo = (CVehicleModelInfo*)pInfo;
|
|
||||||
if (pVehicleInfo->m_vehicleType != VEHICLE_TYPE_CAR) {
|
|
||||||
switch (model) {
|
switch (model) {
|
||||||
case MI_LANDSTAL:
|
case MI_LANDSTAL:
|
||||||
case MI_LINERUN:
|
case MI_LINERUN:
|
||||||
|
|
|
@ -107,11 +107,13 @@ CdStreamInit(int32 numChannels)
|
||||||
|
|
||||||
_gdwCdStreamFlags = 0;
|
_gdwCdStreamFlags = 0;
|
||||||
|
|
||||||
|
#ifndef FIX_BUGS // this just slows down streaming
|
||||||
if ( BytesPerSector <= CDSTREAM_SECTOR_SIZE )
|
if ( BytesPerSector <= CDSTREAM_SECTOR_SIZE )
|
||||||
{
|
{
|
||||||
_gdwCdStreamFlags |= FILE_FLAG_NO_BUFFERING;
|
_gdwCdStreamFlags |= FILE_FLAG_NO_BUFFERING;
|
||||||
debug("Using no buffered loading for streaming\n");
|
debug("Using no buffered loading for streaming\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_gbCdStreamOverlapped = TRUE;
|
_gbCdStreamOverlapped = TRUE;
|
||||||
|
|
||||||
|
|
|
@ -732,10 +732,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving(int32
|
||||||
if (FindPlayerVehicle() && (FindPlayerVehicle()->IsVehicle() && (
|
if (FindPlayerVehicle() && (FindPlayerVehicle()->IsVehicle() && (
|
||||||
FindPlayerVehicle()->GetModelIndex() == MI_DODO
|
FindPlayerVehicle()->GetModelIndex() == MI_DODO
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
|| CVehicle::bAllDodosCheat
|
|| (CVehicle::bAllDodosCheat && !FindPlayerVehicle()->IsRealHeli())
|
||||||
#ifdef ALLCARSHELI_CHEAT
|
|
||||||
|| bAllCarCheat
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
)))
|
)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -230,7 +230,11 @@ CEventList::ReportCrimeForEvent(eEventType type, size_t crimeId, bool copsDontCa
|
||||||
if(crime == CRIME_NONE)
|
if(crime == CRIME_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
CVector playerPedCoors = FindPlayerCoors();
|
||||||
|
#else
|
||||||
CVector playerPedCoors = FindPlayerPed()->GetPosition();
|
CVector playerPedCoors = FindPlayerPed()->GetPosition();
|
||||||
|
#endif
|
||||||
CVector playerCoors = FindPlayerCoors();
|
CVector playerCoors = FindPlayerCoors();
|
||||||
|
|
||||||
if(CWanted::WorkOutPolicePresence(playerCoors, 14.0f) != 0 ||
|
if(CWanted::WorkOutPolicePresence(playerCoors, 14.0f) != 0 ||
|
||||||
|
|
|
@ -812,7 +812,7 @@ CMenuManager::DoSettingsBeforeStartingAGame()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CMenuManager::DrawStandardMenus(bool drawCurrScreen)
|
CMenuManager::DrawStandardMenus(bool activeScreen)
|
||||||
{
|
{
|
||||||
float nextYToUse = 0.0f; // III leftover, set but unused in VC
|
float nextYToUse = 0.0f; // III leftover, set but unused in VC
|
||||||
#ifdef PS2_LIKE_MENU
|
#ifdef PS2_LIKE_MENU
|
||||||
|
@ -1182,7 +1182,7 @@ CMenuManager::DrawStandardMenus(bool drawCurrScreen)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Highlight trapezoid
|
// Highlight trapezoid
|
||||||
if (drawCurrScreen && i == m_nCurrOption && itemsAreSelectable && section == 0) {
|
if (activeScreen && i == m_nCurrOption && itemsAreSelectable && section == 0) {
|
||||||
|
|
||||||
int leftXMax, rightXMin;
|
int leftXMax, rightXMin;
|
||||||
|
|
||||||
|
@ -2460,16 +2460,16 @@ CMenuManager::DrawBackground(bool transitionCall)
|
||||||
m_nMenuFadeAlpha = 255 - m_nMenuFadeAlpha;
|
m_nMenuFadeAlpha = 255 - m_nMenuFadeAlpha;
|
||||||
switch (m_nCurrScreen) {
|
switch (m_nCurrScreen) {
|
||||||
case MENUPAGE_SKIN_SELECT:
|
case MENUPAGE_SKIN_SELECT:
|
||||||
CMenuManager::DrawPlayerSetupScreen();
|
DrawPlayerSetupScreen(false);
|
||||||
break;
|
break;
|
||||||
case MENUPAGE_KEYBOARD_CONTROLS:
|
case MENUPAGE_KEYBOARD_CONTROLS:
|
||||||
CMenuManager::DrawControllerSetupScreen();
|
DrawControllerSetupScreen();
|
||||||
break;
|
break;
|
||||||
case MENUPAGE_OUTRO:
|
case MENUPAGE_OUTRO:
|
||||||
CMenuManager::DrawQuitGameScreen();
|
DrawQuitGameScreen();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
CMenuManager::DrawStandardMenus(false);
|
DrawStandardMenus(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
m_nCurrScreen = actualScreen;
|
m_nCurrScreen = actualScreen;
|
||||||
|
@ -2479,7 +2479,7 @@ CMenuManager::DrawBackground(bool transitionCall)
|
||||||
|
|
||||||
switch (m_nCurrScreen) {
|
switch (m_nCurrScreen) {
|
||||||
case MENUPAGE_SKIN_SELECT:
|
case MENUPAGE_SKIN_SELECT:
|
||||||
DrawPlayerSetupScreen();
|
DrawPlayerSetupScreen(true);
|
||||||
break;
|
break;
|
||||||
case MENUPAGE_KEYBOARD_CONTROLS:
|
case MENUPAGE_KEYBOARD_CONTROLS:
|
||||||
DrawControllerSetupScreen();
|
DrawControllerSetupScreen();
|
||||||
|
@ -2530,7 +2530,7 @@ CMenuManager::DrawBackground(bool transitionCall)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
CMenuManager::DrawPlayerSetupScreen()
|
CMenuManager::DrawPlayerSetupScreen(bool activeScreen)
|
||||||
{
|
{
|
||||||
CFont::SetBackgroundOff();
|
CFont::SetBackgroundOff();
|
||||||
CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT));
|
CFont::SetScale(MENU_X(MENUACTION_SCALE_MULT), MENU_Y(MENUACTION_SCALE_MULT));
|
||||||
|
@ -2807,6 +2807,7 @@ CMenuManager::DrawPlayerSetupScreen()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (activeScreen)
|
||||||
CPlayerSkin::RenderFrontendSkinEdit();
|
CPlayerSkin::RenderFrontendSkinEdit();
|
||||||
|
|
||||||
// Big apply button
|
// Big apply button
|
||||||
|
@ -4112,6 +4113,9 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
|
||||||
|
|
||||||
int oldOption = m_nCurrOption;
|
int oldOption = m_nCurrOption;
|
||||||
if (goDown) {
|
if (goDown) {
|
||||||
|
if (m_nCurrScreen != MENUPAGE_MAP)
|
||||||
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
||||||
|
|
||||||
m_nCurrOption++;
|
m_nCurrOption++;
|
||||||
if (m_nCurrOption == NUM_MENUROWS || (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_NOTHING)) {
|
if (m_nCurrOption == NUM_MENUROWS || (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_Action == MENUACTION_NOTHING)) {
|
||||||
m_nCurrOption = 0;
|
m_nCurrOption = 0;
|
||||||
|
@ -4120,6 +4124,9 @@ CMenuManager::ProcessButtonPresses(uint8 goDown, uint8 goUp, uint8 optionSelecte
|
||||||
m_nOptionHighlightTransitionBlend = 0;
|
m_nOptionHighlightTransitionBlend = 0;
|
||||||
}
|
}
|
||||||
if (goUp) {
|
if (goUp) {
|
||||||
|
if (m_nCurrScreen != MENUPAGE_MAP)
|
||||||
|
DMAudio.PlayFrontEndSound(SOUND_FRONTEND_MENU_NEW_PAGE, 0);
|
||||||
|
|
||||||
if (m_nCurrOption == (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL)) {
|
if (m_nCurrOption == (aScreens[m_nCurrScreen].m_aEntries[0].m_Action == MENUACTION_LABEL)) {
|
||||||
while (m_nCurrOption != NUM_MENUROWS - 1
|
while (m_nCurrOption != NUM_MENUROWS - 1
|
||||||
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption + 1].m_Action != MENUACTION_NOTHING) {
|
&& aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption + 1].m_Action != MENUACTION_NOTHING) {
|
||||||
|
|
|
@ -663,7 +663,7 @@ public:
|
||||||
void DrawQuitGameScreen();
|
void DrawQuitGameScreen();
|
||||||
void DrawFrontEnd();
|
void DrawFrontEnd();
|
||||||
void DrawBackground(bool transitionCall);
|
void DrawBackground(bool transitionCall);
|
||||||
void DrawPlayerSetupScreen();
|
void DrawPlayerSetupScreen(bool);
|
||||||
int FadeIn(int alpha);
|
int FadeIn(int alpha);
|
||||||
void FilterOutColorMarkersFromString(wchar*);
|
void FilterOutColorMarkersFromString(wchar*);
|
||||||
int GetStartOptionsCntrlConfigScreens();
|
int GetStartOptionsCntrlConfigScreens();
|
||||||
|
|
|
@ -526,7 +526,7 @@ void KangarooCheat()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ALLCARSHELI_CHEAT
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
void AllCarsHeliCheat(void)
|
void AllCarsHeliCheat(void)
|
||||||
{
|
{
|
||||||
wchar* string;
|
wchar* string;
|
||||||
|
@ -1438,7 +1438,7 @@ void CPad::AddToPCCheatString(char c)
|
||||||
CPed::SwitchDebugDisplay();
|
CPed::SwitchDebugDisplay();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ALLCARSHELI_CHEAT
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
// "CARSAREHELI"
|
// "CARSAREHELI"
|
||||||
if (!_CHEATCMP("ILEHERASRAC"))
|
if (!_CHEATCMP("ILEHERASRAC"))
|
||||||
AllCarsHeliCheat();
|
AllCarsHeliCheat();
|
||||||
|
@ -3105,10 +3105,11 @@ void CPad::PrintErrorMessage(void)
|
||||||
{
|
{
|
||||||
if ( bDisplayNoControllerMessage && !CGame::playingIntro && !FrontEndMenuManager.m_bMenuActive )
|
if ( bDisplayNoControllerMessage && !CGame::playingIntro && !FrontEndMenuManager.m_bMenuActive )
|
||||||
{
|
{
|
||||||
CFont::SetScale(0.85f, 1.0f);
|
CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(20.0f), SCREEN_SCALE_FROM_BOTTOM(130.0f), SCREEN_STRETCH_FROM_RIGHT(20.0f), SCREEN_SCALE_Y(140.0f)), CRGBA(50, 50, 50, 210));
|
||||||
|
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
|
||||||
CFont::SetJustifyOff();
|
CFont::SetJustifyOff();
|
||||||
CFont::SetBackgroundOff();
|
CFont::SetBackgroundOff();
|
||||||
CFont::SetCentreSize(SCREEN_WIDTH - 20);
|
CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetColor(CRGBA(255, 255, 200, 200));
|
CFont::SetColor(CRGBA(255, 255, 200, 200));
|
||||||
|
@ -3116,16 +3117,17 @@ void CPad::PrintErrorMessage(void)
|
||||||
CFont::PrintString
|
CFont::PrintString
|
||||||
(
|
(
|
||||||
SCREEN_WIDTH / 2,
|
SCREEN_WIDTH / 2,
|
||||||
SCREEN_HEIGHT / 2,
|
SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(40.0f),
|
||||||
TheText.Get("NOCONT") // Please reconnect an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2). to controller port 1 to continue
|
TheText.Get("NOCONT") // Please reconnect an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2). to controller port 1 to continue
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if ( bObsoleteControllerMessage )
|
else if ( bObsoleteControllerMessage )
|
||||||
{
|
{
|
||||||
CFont::SetScale(0.85f, 1.0f);
|
CSprite2d::DrawRect(CRect(SCREEN_STRETCH_X(20.0f), SCREEN_SCALE_FROM_BOTTOM(130.0f), SCREEN_STRETCH_FROM_RIGHT(20.0f), SCREEN_SCALE_Y(140.0f)), CRGBA(50, 50, 50, 210));
|
||||||
|
CFont::SetScale(SCREEN_SCALE_X(0.85f), SCREEN_SCALE_Y(1.0f));
|
||||||
CFont::SetJustifyOff();
|
CFont::SetJustifyOff();
|
||||||
CFont::SetBackgroundOff();
|
CFont::SetBackgroundOff();
|
||||||
CFont::SetCentreSize(SCREEN_WIDTH - 20);
|
CFont::SetCentreSize(SCREEN_STRETCH_FROM_RIGHT(50.0f));
|
||||||
CFont::SetCentreOn();
|
CFont::SetCentreOn();
|
||||||
CFont::SetPropOn();
|
CFont::SetPropOn();
|
||||||
CFont::SetColor(CRGBA(255, 255, 200, 200));
|
CFont::SetColor(CRGBA(255, 255, 200, 200));
|
||||||
|
@ -3133,7 +3135,7 @@ void CPad::PrintErrorMessage(void)
|
||||||
CFont::PrintString
|
CFont::PrintString
|
||||||
(
|
(
|
||||||
SCREEN_WIDTH / 2,
|
SCREEN_WIDTH / 2,
|
||||||
SCREEN_HEIGHT / 2,
|
SCREEN_HEIGHT / 2 - SCREEN_SCALE_Y(40.0f),
|
||||||
TheText.Get("WRCONT") // The controller connected to controller port 1 is an unsupported controller. Grand Theft Auto III requires an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2).
|
TheText.Get("WRCONT") // The controller connected to controller port 1 is an unsupported controller. Grand Theft Auto III requires an analog controller (DUALSHOCK@) or analog controller (DUALSHOCK@2).
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,6 +286,8 @@ public:
|
||||||
bool GetMiddleMouseJustUp() { return !!(!NewMouseControllerState.MMB && OldMouseControllerState.MMB); }
|
bool GetMiddleMouseJustUp() { return !!(!NewMouseControllerState.MMB && OldMouseControllerState.MMB); }
|
||||||
bool GetMouseWheelUpJustUp() { return !!(!NewMouseControllerState.WHEELUP && OldMouseControllerState.WHEELUP); }
|
bool GetMouseWheelUpJustUp() { return !!(!NewMouseControllerState.WHEELUP && OldMouseControllerState.WHEELUP); }
|
||||||
bool GetMouseWheelDownJustUp() { return !!(!NewMouseControllerState.WHEELDN && OldMouseControllerState.WHEELDN); }
|
bool GetMouseWheelDownJustUp() { return !!(!NewMouseControllerState.WHEELDN && OldMouseControllerState.WHEELDN); }
|
||||||
|
bool GetMouseX1JustUp() { return !!(!NewMouseControllerState.MXB1 && OldMouseControllerState.MXB1); }
|
||||||
|
bool GetMouseX2JustUp() { return !!(!NewMouseControllerState.MXB2 && OldMouseControllerState.MXB2); }
|
||||||
|
|
||||||
bool GetLeftMouse() { return NewMouseControllerState.LMB; }
|
bool GetLeftMouse() { return NewMouseControllerState.LMB; }
|
||||||
bool GetRightMouse() { return NewMouseControllerState.RMB; }
|
bool GetRightMouse() { return NewMouseControllerState.RMB; }
|
||||||
|
@ -470,7 +472,3 @@ public:
|
||||||
|
|
||||||
VALIDATE_SIZE(CPad, 0xFC);
|
VALIDATE_SIZE(CPad, 0xFC);
|
||||||
extern CPad Pads[MAX_PADS];
|
extern CPad Pads[MAX_PADS];
|
||||||
|
|
||||||
#ifdef ALLCARSHELI_CHEAT
|
|
||||||
extern bool bAllCarCheat;
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1151,6 +1151,10 @@ int CRadar::SetCoordBlip(eBlipType type, CVector pos, int32 color, eBlipDisplay
|
||||||
if (!ms_RadarTrace[nextBlip].m_bInUse)
|
if (!ms_RadarTrace[nextBlip].m_bInUse)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if (nextBlip == NUMRADARBLIPS)
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
ms_RadarTrace[nextBlip].m_eBlipType = type;
|
ms_RadarTrace[nextBlip].m_eBlipType = type;
|
||||||
ms_RadarTrace[nextBlip].m_nColor = color;
|
ms_RadarTrace[nextBlip].m_nColor = color;
|
||||||
ms_RadarTrace[nextBlip].m_bDim = true;
|
ms_RadarTrace[nextBlip].m_bDim = true;
|
||||||
|
@ -1182,6 +1186,10 @@ int CRadar::SetEntityBlip(eBlipType type, int32 handle, int32 color, eBlipDispla
|
||||||
if (!ms_RadarTrace[nextBlip].m_bInUse)
|
if (!ms_RadarTrace[nextBlip].m_bInUse)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if (nextBlip == NUMRADARBLIPS)
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
ms_RadarTrace[nextBlip].m_eBlipType = type;
|
ms_RadarTrace[nextBlip].m_eBlipType = type;
|
||||||
ms_RadarTrace[nextBlip].m_nColor = color;
|
ms_RadarTrace[nextBlip].m_nColor = color;
|
||||||
ms_RadarTrace[nextBlip].m_bDim = true;
|
ms_RadarTrace[nextBlip].m_bDim = true;
|
||||||
|
@ -1526,6 +1534,10 @@ CRadar::ToggleTargetMarker(float x, float y)
|
||||||
if (!ms_RadarTrace[nextBlip].m_bInUse)
|
if (!ms_RadarTrace[nextBlip].m_bInUse)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if (nextBlip == NUMRADARBLIPS)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
ms_RadarTrace[nextBlip].m_eBlipType = BLIP_COORD;
|
ms_RadarTrace[nextBlip].m_eBlipType = BLIP_COORD;
|
||||||
ms_RadarTrace[nextBlip].m_nColor = 0x333333FF;
|
ms_RadarTrace[nextBlip].m_nColor = 0x333333FF;
|
||||||
ms_RadarTrace[nextBlip].m_bDim = 1;
|
ms_RadarTrace[nextBlip].m_bDim = 1;
|
||||||
|
|
|
@ -219,6 +219,8 @@ extern int strncasecmp(const char *str1, const char *str2, size_t len);
|
||||||
|
|
||||||
#define clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v))
|
#define clamp(v, low, high) ((v)<(low) ? (low) : (v)>(high) ? (high) : (v))
|
||||||
|
|
||||||
|
#define clamp2(v, center, radius) ((v) < (center) ? Max(v, center - radius) : Min(v, center + radius))
|
||||||
|
|
||||||
inline float sq(float x) { return x*x; }
|
inline float sq(float x) { return x*x; }
|
||||||
#define SQR(x) ((x) * (x))
|
#define SQR(x) ((x) * (x))
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ enum Config {
|
||||||
#endif
|
#endif
|
||||||
#define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m
|
#define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m
|
||||||
#define KANGAROO_CHEAT
|
#define KANGAROO_CHEAT
|
||||||
#define ALLCARSHELI_CHEAT
|
#define RESTORE_ALLCARSHELI_CHEAT
|
||||||
#define ALT_DODO_CHEAT
|
#define ALT_DODO_CHEAT
|
||||||
#define WALLCLIMB_CHEAT
|
#define WALLCLIMB_CHEAT
|
||||||
#define REGISTER_START_BUTTON
|
#define REGISTER_START_BUTTON
|
||||||
|
@ -258,14 +258,13 @@ enum Config {
|
||||||
|
|
||||||
// Hud, frontend and radar
|
// Hud, frontend and radar
|
||||||
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
|
#define HUD_ENHANCEMENTS // Adjusts some aspects to make the HUD look/behave a little bit better.
|
||||||
#define BETA_SLIDING_TEXT
|
//#define BETA_SLIDING_TEXT
|
||||||
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
|
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
|
||||||
#define PC_MENU
|
#define PC_MENU
|
||||||
|
|
||||||
#ifndef PC_MENU
|
#ifndef PC_MENU
|
||||||
# define PS2_MENU
|
# define PS2_MENU
|
||||||
//# define PS2_MENU_USEALLPAGEICONS
|
//# define PS2_MENU_USEALLPAGEICONS
|
||||||
//# define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
|
|
||||||
#else
|
#else
|
||||||
# define MAP_ENHANCEMENTS // Adding waypoint etc.
|
# define MAP_ENHANCEMENTS // Adding waypoint etc.
|
||||||
# define TRIANGLE_BACK_BUTTON
|
# define TRIANGLE_BACK_BUTTON
|
||||||
|
|
|
@ -740,12 +740,14 @@ DisplayGameDebugText()
|
||||||
static bool bDisplayRate = false;
|
static bool bDisplayRate = false;
|
||||||
static bool bDisplayCheatStr = false;
|
static bool bDisplayCheatStr = false;
|
||||||
|
|
||||||
|
#ifndef FINAL
|
||||||
{
|
{
|
||||||
SETTWEAKPATH("GameDebugText");
|
SETTWEAKPATH("GameDebugText");
|
||||||
TWEAKBOOL(bDisplayPosn);
|
TWEAKBOOL(bDisplayPosn);
|
||||||
TWEAKBOOL(bDisplayRate);
|
TWEAKBOOL(bDisplayRate);
|
||||||
TWEAKBOOL(bDisplayCheatStr);
|
TWEAKBOOL(bDisplayCheatStr);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
char str[200];
|
char str[200];
|
||||||
|
@ -1091,6 +1093,7 @@ Idle(void *arg)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, (void *)FALSE); // TODO: temp? this fixes OpenGL render but there should be a better place for this
|
||||||
// This has to be done BEFORE RwCameraBeginUpdate
|
// This has to be done BEFORE RwCameraBeginUpdate
|
||||||
RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip());
|
RwCameraSetFarClipPlane(Scene.camera, CTimeCycle::GetFarClip());
|
||||||
RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart());
|
RwCameraSetFogDistance(Scene.camera, CTimeCycle::GetFogStart());
|
||||||
|
|
|
@ -50,7 +50,7 @@ void tbInit()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void tbStartTimer(int32 unk, char *name)
|
void tbStartTimer(int32 unk, Const char *name)
|
||||||
{
|
{
|
||||||
strcpy(TimerBar.Timers[TimerBar.count].name, name);
|
strcpy(TimerBar.Timers[TimerBar.count].name, name);
|
||||||
TimerBar.Timers[TimerBar.count].unk = unk;
|
TimerBar.Timers[TimerBar.count].unk = unk;
|
||||||
|
@ -58,7 +58,7 @@ void tbStartTimer(int32 unk, char *name)
|
||||||
TimerBar.count++;
|
TimerBar.count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void tbEndTimer(char* name)
|
void tbEndTimer(Const char* name)
|
||||||
{
|
{
|
||||||
uint32 n = 1500;
|
uint32 n = 1500;
|
||||||
for (uint32 i = 0; i < TimerBar.count; i++) {
|
for (uint32 i = 0; i < TimerBar.count; i++) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
void tbInit();
|
void tbInit();
|
||||||
void tbStartTimer(int32, char*);
|
void tbStartTimer(int32, Const char*);
|
||||||
void tbEndTimer(char*);
|
void tbEndTimer(Const char*);
|
||||||
void tbDisplay();
|
void tbDisplay();
|
|
@ -200,7 +200,7 @@ enum
|
||||||
MI_WMYCR,
|
MI_WMYCR,
|
||||||
MI_WFYST,
|
MI_WFYST,
|
||||||
MI_WFOST,
|
MI_WFOST,
|
||||||
MI_WMIST,
|
MI_WMYST,
|
||||||
MI_WMOST,
|
MI_WMOST,
|
||||||
MI_WFYRI,
|
MI_WFYRI,
|
||||||
MI_WFORI,
|
MI_WFORI,
|
||||||
|
@ -214,6 +214,24 @@ enum
|
||||||
MI_WMYGO,
|
MI_WMYGO,
|
||||||
MI_WFOGO,
|
MI_WFOGO,
|
||||||
MI_WMOGO,
|
MI_WMOGO,
|
||||||
|
MI_WFYLG,
|
||||||
|
MI_WMYLG,
|
||||||
|
MI_WFYBU,
|
||||||
|
MI_WMYBU,
|
||||||
|
MI_WMOBU,
|
||||||
|
MI_WFYPR,
|
||||||
|
MI_WFOTR,
|
||||||
|
MI_WMOTR,
|
||||||
|
MI_WMYPI,
|
||||||
|
MI_WMOCA,
|
||||||
|
MI_WFYJG,
|
||||||
|
MI_WMYJG,
|
||||||
|
MI_WFYSK,
|
||||||
|
MI_WMYSK,
|
||||||
|
MI_WFYSH,
|
||||||
|
MI_WFOSH,
|
||||||
|
MI_JFOTO,
|
||||||
|
MI_JMOTO,
|
||||||
|
|
||||||
MI_CBA = 83,
|
MI_CBA = 83,
|
||||||
MI_CBB,
|
MI_CBB,
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// --MIAMI: Done
|
// --MIAMI: file done except TODOs
|
||||||
|
|
||||||
CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
|
CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
|
||||||
{
|
{
|
||||||
SetModelIndex(mi);
|
SetModelIndex(mi);
|
||||||
|
@ -43,7 +44,6 @@ CCivilianPed::CCivilianPed(ePedType pedtype, uint32 mi) : CPed(pedtype)
|
||||||
m_bAttractorUnk = (CGeneral::GetRandomNumberInRange(0.0f, 1.0f) < 1.25f);
|
m_bAttractorUnk = (CGeneral::GetRandomNumberInRange(0.0f, 1.0f) < 1.25f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
void
|
void
|
||||||
CCivilianPed::CivilianAI(void)
|
CCivilianPed::CivilianAI(void)
|
||||||
{
|
{
|
||||||
|
@ -221,7 +221,6 @@ CCivilianPed::CivilianAI(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done except comments
|
|
||||||
void
|
void
|
||||||
CCivilianPed::ProcessControl(void)
|
CCivilianPed::ProcessControl(void)
|
||||||
{
|
{
|
||||||
|
@ -504,7 +503,6 @@ bool CCivilianPed::IsAttractedTo(int8 type)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
void
|
void
|
||||||
CCivilianPed::EnterVacantNearbyCars(void)
|
CCivilianPed::EnterVacantNearbyCars(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
#include "Ropes.h"
|
#include "Ropes.h"
|
||||||
#include "Stinger.h"
|
#include "Stinger.h"
|
||||||
|
|
||||||
|
// --MIAMI: file done except TODOs
|
||||||
|
|
||||||
CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
|
CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
|
||||||
{
|
{
|
||||||
m_nCopType = copType;
|
m_nCopType = copType;
|
||||||
|
@ -83,10 +85,10 @@ CCopPed::CCopPed(eCopType copType, int32 modifier) : CPed(PEDTYPE_COP)
|
||||||
m_attackTimer = 0;
|
m_attackTimer = 0;
|
||||||
m_bBeatingSuspect = false;
|
m_bBeatingSuspect = false;
|
||||||
m_bStopAndShootDisabledZone = false;
|
m_bStopAndShootDisabledZone = false;
|
||||||
field_601 = false;
|
m_bDragsPlayerFromCar = false;
|
||||||
m_bZoneDisabled = false;
|
m_bZoneDisabled = false;
|
||||||
field_628 = -1;
|
field_628 = -1;
|
||||||
m_nRoadblockNode = -1; // TODO(Miami): this will be nil
|
m_nRoadblockVeh = nil;
|
||||||
m_bThrowsSpikeTrap = false;
|
m_bThrowsSpikeTrap = false;
|
||||||
m_pRopeEntity = nil;
|
m_pRopeEntity = nil;
|
||||||
m_fAbseilPos = 0.0f;
|
m_fAbseilPos = 0.0f;
|
||||||
|
@ -106,7 +108,6 @@ CCopPed::~CCopPed()
|
||||||
delete m_pStinger;
|
delete m_pStinger;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
// Parameter should always be CPlayerPed, but it seems they considered making civilians arrestable at some point
|
// Parameter should always be CPlayerPed, but it seems they considered making civilians arrestable at some point
|
||||||
void
|
void
|
||||||
CCopPed::SetArrestPlayer(CPed *player)
|
CCopPed::SetArrestPlayer(CPed *player)
|
||||||
|
@ -155,7 +156,6 @@ CCopPed::SetArrestPlayer(CPed *player)
|
||||||
SetCurrentWeapon(WEAPONTYPE_COLT45);
|
SetCurrentWeapon(WEAPONTYPE_COLT45);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
void
|
void
|
||||||
CCopPed::ClearPursuit(void)
|
CCopPed::ClearPursuit(void)
|
||||||
{
|
{
|
||||||
|
@ -194,7 +194,7 @@ CCopPed::ClearPursuit(void)
|
||||||
bNotAllowedToDuck = false;
|
bNotAllowedToDuck = false;
|
||||||
bKindaStayInSamePlace = false;
|
bKindaStayInSamePlace = false;
|
||||||
m_bStopAndShootDisabledZone = false;
|
m_bStopAndShootDisabledZone = false;
|
||||||
field_601 = false;
|
m_bDragsPlayerFromCar = false;
|
||||||
m_bZoneDisabled = false;
|
m_bZoneDisabled = false;
|
||||||
ClearObjective();
|
ClearObjective();
|
||||||
if (IsPedInControl()) {
|
if (IsPedInControl()) {
|
||||||
|
@ -212,7 +212,6 @@ CCopPed::ClearPursuit(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
// TODO: I don't know why they needed that parameter.
|
// TODO: I don't know why they needed that parameter.
|
||||||
void
|
void
|
||||||
CCopPed::SetPursuit(bool ignoreCopLimit)
|
CCopPed::SetPursuit(bool ignoreCopLimit)
|
||||||
|
@ -245,7 +244,6 @@ CCopPed::SetPursuit(bool ignoreCopLimit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
void
|
void
|
||||||
CCopPed::ArrestPlayer(void)
|
CCopPed::ArrestPlayer(void)
|
||||||
{
|
{
|
||||||
|
@ -311,7 +309,6 @@ CCopPed::ScanForCrimes(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
void
|
void
|
||||||
CCopPed::CopAI(void)
|
CCopPed::CopAI(void)
|
||||||
{
|
{
|
||||||
|
@ -465,17 +462,13 @@ CCopPed::CopAI(void)
|
||||||
bNotAllowedToDuck = false;
|
bNotAllowedToDuck = false;
|
||||||
bDuckAndCover = false;
|
bDuckAndCover = false;
|
||||||
} else {
|
} else {
|
||||||
// TODO(Miami): Roadblock system is still III
|
|
||||||
float dotProd;
|
float dotProd;
|
||||||
if (m_nRoadblockNode != -1) {
|
if (m_nRoadblockVeh) {
|
||||||
CPathNode *roadBlockNode = &ThePaths.m_pathNodes[CRoadBlocks::RoadBlockNodes[m_nRoadblockNode]];
|
dotProd = DotProduct2D(playerOrHisVeh->GetPosition() - m_nRoadblockVeh->GetPosition(), GetPosition() - m_nRoadblockVeh->GetPosition());
|
||||||
dotProd = DotProduct2D(playerOrHisVeh->GetPosition() - roadBlockNode->GetPosition(), GetPosition() - roadBlockNode->GetPosition());
|
|
||||||
} else
|
} else
|
||||||
dotProd = -1.0f;
|
dotProd = -1.0f;
|
||||||
|
|
||||||
if(dotProd >= 0.0f) {
|
if(dotProd < 0.0f) {
|
||||||
bIsPointingGunAt = true;
|
|
||||||
} else {
|
|
||||||
if (bIsDucking)
|
if (bIsDucking)
|
||||||
ClearDuck();
|
ClearDuck();
|
||||||
m_bIsDisabledCop = false;
|
m_bIsDisabledCop = false;
|
||||||
|
@ -484,6 +477,8 @@ CCopPed::CopAI(void)
|
||||||
bCrouchWhenShooting = false;
|
bCrouchWhenShooting = false;
|
||||||
bDuckAndCover = false;
|
bDuckAndCover = false;
|
||||||
SetPursuit(false);
|
SetPursuit(false);
|
||||||
|
} else {
|
||||||
|
bIsPointingGunAt = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -601,7 +596,6 @@ CCopPed::CopAI(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
void
|
void
|
||||||
CCopPed::ProcessControl(void)
|
CCopPed::ProcessControl(void)
|
||||||
{
|
{
|
||||||
|
@ -822,7 +816,6 @@ CCopPed::ProcessControl(void)
|
||||||
field_624 = 0;
|
field_624 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
void
|
void
|
||||||
CCopPed::ProcessHeliSwat(void)
|
CCopPed::ProcessHeliSwat(void)
|
||||||
{
|
{
|
||||||
|
@ -858,7 +851,6 @@ CCopPed::ProcessHeliSwat(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
|
||||||
void
|
void
|
||||||
CCopPed::ProcessStingerCop(void)
|
CCopPed::ProcessStingerCop(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,14 +14,14 @@ enum eCopType
|
||||||
class CCopPed : public CPed
|
class CCopPed : public CPed
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int16 m_nRoadblockNode;
|
CVehicle* m_nRoadblockVeh;
|
||||||
float m_fDistanceToTarget;
|
float m_fDistanceToTarget;
|
||||||
bool m_bIsInPursuit;
|
bool m_bIsInPursuit;
|
||||||
bool m_bIsDisabledCop;
|
bool m_bIsDisabledCop;
|
||||||
int8 field_5FE;
|
int8 field_5FE;
|
||||||
bool m_bBeatingSuspect;
|
bool m_bBeatingSuspect;
|
||||||
bool m_bStopAndShootDisabledZone;
|
bool m_bStopAndShootDisabledZone;
|
||||||
bool field_601; // set when police dragging player from car
|
bool m_bDragsPlayerFromCar;
|
||||||
bool m_bZoneDisabled;
|
bool m_bZoneDisabled;
|
||||||
float m_fAbseilPos;
|
float m_fAbseilPos;
|
||||||
eCopType m_nCopType;
|
eCopType m_nCopType;
|
||||||
|
|
|
@ -67,6 +67,8 @@
|
||||||
#include "CutsceneShadow.h"
|
#include "CutsceneShadow.h"
|
||||||
#include "Clock.h"
|
#include "Clock.h"
|
||||||
|
|
||||||
|
// --MIAMI: file done except TODOs
|
||||||
|
|
||||||
#define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f)
|
#define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f)
|
||||||
|
|
||||||
CPed *gapTempPedList[50];
|
CPed *gapTempPedList[50];
|
||||||
|
@ -10945,7 +10947,7 @@ CPed::PedAnimAlignCB(CAnimBlendAssociation *animAssoc, void *arg)
|
||||||
pedToDragOut->RegisterThreatWithGangPeds(ped);
|
pedToDragOut->RegisterThreatWithGangPeds(ped);
|
||||||
|
|
||||||
if (ped->m_nPedType == PEDTYPE_COP && pedToDragOut == FindPlayerPed() && veh->IsBike())
|
if (ped->m_nPedType == PEDTYPE_COP && pedToDragOut == FindPlayerPed() && veh->IsBike())
|
||||||
((CCopPed*)ped)->field_601 = 1;
|
((CCopPed*)ped)->m_bDragsPlayerFromCar = 1;
|
||||||
|
|
||||||
if (pedToDragOut == veh->pDriver) {
|
if (pedToDragOut == veh->pDriver) {
|
||||||
if (veh->pPassengers[0])
|
if (veh->pPassengers[0])
|
||||||
|
@ -20894,11 +20896,11 @@ CPed::KillCharOnFootMelee(CVector &ourPos, CVector &targetPos, CVector &distWith
|
||||||
}
|
}
|
||||||
if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
|
if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
|
||||||
float maxArrestDist = 1.5f;
|
float maxArrestDist = 1.5f;
|
||||||
if (((CCopPed*)this)->field_601) {
|
if (((CCopPed*)this)->m_bDragsPlayerFromCar) {
|
||||||
if (m_nPedState == PED_FALL) {
|
if (m_nPedState == PED_FALL) {
|
||||||
maxArrestDist = 3.5f;
|
maxArrestDist = 3.5f;
|
||||||
} else if (m_nPedState != PED_DRAG_FROM_CAR) {
|
} else if (m_nPedState != PED_DRAG_FROM_CAR) {
|
||||||
((CCopPed*)this)->field_601 = 0;
|
((CCopPed*)this)->m_bDragsPlayerFromCar = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21139,11 +21141,11 @@ CPed::KillCharOnFootArmed(CVector &ourPos, CVector &targetPos, CVector &distWith
|
||||||
}
|
}
|
||||||
if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
|
if (m_nPedType == PEDTYPE_COP && m_pedInObjective->IsPlayer()) {
|
||||||
float maxArrestDist = 1.5f;
|
float maxArrestDist = 1.5f;
|
||||||
if (((CCopPed*)this)->field_601) {
|
if (((CCopPed*)this)->m_bDragsPlayerFromCar) {
|
||||||
if (m_nPedState == PED_FALL) {
|
if (m_nPedState == PED_FALL) {
|
||||||
maxArrestDist = 3.5f;
|
maxArrestDist = 3.5f;
|
||||||
} else if (m_nPedState != PED_DRAG_FROM_CAR) {
|
} else if (m_nPedState != PED_DRAG_FROM_CAR) {
|
||||||
((CCopPed*)this)->field_601 = 0;
|
((CCopPed*)this)->m_bDragsPlayerFromCar = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ enum ePedType
|
||||||
PEDTYPE_GANG2,
|
PEDTYPE_GANG2,
|
||||||
PEDTYPE_GANG3,
|
PEDTYPE_GANG3,
|
||||||
PEDTYPE_GANG4,
|
PEDTYPE_GANG4,
|
||||||
PEDTYPE_GANG5,
|
PEDTYPE_GANG5, // Security - hardcoded
|
||||||
PEDTYPE_GANG6,
|
PEDTYPE_GANG6,
|
||||||
PEDTYPE_GANG7, // Vercetti gang
|
PEDTYPE_GANG7, // Vercetti gang - hardcoded
|
||||||
PEDTYPE_GANG8,
|
PEDTYPE_GANG8,
|
||||||
PEDTYPE_GANG9,
|
PEDTYPE_GANG9,
|
||||||
PEDTYPE_EMERGENCY,
|
PEDTYPE_EMERGENCY,
|
||||||
|
|
|
@ -490,7 +490,11 @@ CCoronas::RenderReflections(void)
|
||||||
int intensity = distanceFade*heightFade * 230.0 * CWeather::WetRoads;
|
int intensity = distanceFade*heightFade * 230.0 * CWeather::WetRoads;
|
||||||
|
|
||||||
CSprite::RenderBufferedOneXLUSprite(
|
CSprite::RenderBufferedOneXLUSprite(
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
spriteCoors.x, spriteCoors.y, spriteCoors.z,
|
||||||
|
#else
|
||||||
spriteCoors.x, spriteCoors.y, RwIm2DGetNearScreenZ(),
|
spriteCoors.x, spriteCoors.y, RwIm2DGetNearScreenZ(),
|
||||||
|
#endif
|
||||||
spritew * aCoronas[i].size * 0.75f,
|
spritew * aCoronas[i].size * 0.75f,
|
||||||
spriteh * aCoronas[i].size * 2.0f,
|
spriteh * aCoronas[i].size * 2.0f,
|
||||||
(intensity * CCoronas::aCoronas[i].red)>>8,
|
(intensity * CCoronas::aCoronas[i].red)>>8,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -103,6 +103,8 @@ public:
|
||||||
void Update(void);
|
void Update(void);
|
||||||
void SwitchOff(void);
|
void SwitchOff(void);
|
||||||
void AddThisOne(CVector pos0, CVector pos1, CVector pos2, CVector pos3, bool b_isMovingDown);
|
void AddThisOne(CVector pos0, CVector pos1, CVector pos2, CVector pos3, bool b_isMovingDown);
|
||||||
|
bool IsActive() const { return m_bIsActive; };
|
||||||
|
const CVector& GetPosition() const { return m_midPoint; };
|
||||||
};
|
};
|
||||||
|
|
||||||
class CEscalators
|
class CEscalators
|
||||||
|
@ -114,6 +116,7 @@ public:
|
||||||
static void Update(void);
|
static void Update(void);
|
||||||
static void AddOne(CVector pos0, CVector pos1, CVector pos2, CVector pos3, bool b_isMovingDown);
|
static void AddOne(CVector pos0, CVector pos1, CVector pos2, CVector pos3, bool b_isMovingDown);
|
||||||
static void Shutdown(void);
|
static void Shutdown(void);
|
||||||
|
static const CEscalator& GetEscalator(int ind) { return aEscalators[ind]; };
|
||||||
};
|
};
|
||||||
|
|
||||||
class CMovingThing
|
class CMovingThing
|
||||||
|
|
|
@ -1261,7 +1261,11 @@ void CParticle::Update()
|
||||||
{
|
{
|
||||||
if ( CTimer::GetFrameCounter() & 10 )
|
if ( CTimer::GetFrameCounter() & 10 )
|
||||||
{
|
{
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if ( FindPlayerPed() && FindPlayerPed()->GetWeapon()->m_eWeaponType == WEAPONTYPE_MINIGUN )
|
||||||
|
#else
|
||||||
if ( FindPlayerPed()->GetWeapon()->m_eWeaponType == WEAPONTYPE_MINIGUN )
|
if ( FindPlayerPed()->GetWeapon()->m_eWeaponType == WEAPONTYPE_MINIGUN )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
AddParticle(PARTICLE_HEATHAZE, particle->m_vecPosition, CVector(0.0f, 0.0f, 0.0f));
|
AddParticle(PARTICLE_HEATHAZE, particle->m_vecPosition, CVector(0.0f, 0.0f, 0.0f));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2745,7 +2745,11 @@ CWaterLevel::RenderSeaBirds()
|
||||||
void
|
void
|
||||||
CWaterLevel::RenderShipsOnHorizon()
|
CWaterLevel::RenderShipsOnHorizon()
|
||||||
{
|
{
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
CVector cur_pos = FindPlayerCoors();
|
||||||
|
#else
|
||||||
CVector cur_pos = FindPlayerPed()->GetPosition();
|
CVector cur_pos = FindPlayerPed()->GetPosition();
|
||||||
|
#endif
|
||||||
|
|
||||||
static CVector prev_pos(0.0f, 0.0f, 0.0f);
|
static CVector prev_pos(0.0f, 0.0f, 0.0f);
|
||||||
static CVector prev_front(0.0f, 0.0f, 0.0f);
|
static CVector prev_front(0.0f, 0.0f, 0.0f);
|
||||||
|
@ -2847,7 +2851,11 @@ CWaterLevel::HandleSeaLifeForms()
|
||||||
void
|
void
|
||||||
CWaterLevel::HandleBeachToysStuff(void)
|
CWaterLevel::HandleBeachToysStuff(void)
|
||||||
{
|
{
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
CVector cur_pos = FindPlayerCoors();
|
||||||
|
#else
|
||||||
CVector cur_pos = FindPlayerPed()->GetPosition();
|
CVector cur_pos = FindPlayerPed()->GetPosition();
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool bBeachBallInit = true;
|
static bool bBeachBallInit = true;
|
||||||
static CVector FirstBeachBallPos = cur_pos;
|
static CVector FirstBeachBallPos = cur_pos;
|
||||||
|
|
|
@ -84,7 +84,9 @@ enum eBeachToy
|
||||||
BEACHTOY_2,
|
BEACHTOY_2,
|
||||||
BEACHTOY_3,
|
BEACHTOY_3,
|
||||||
BEACHTOY_4,
|
BEACHTOY_4,
|
||||||
BEACHTOY_LOUNGE = 5
|
BEACHTOY_LOUNGE = 5,
|
||||||
|
BEACHTOY_6,
|
||||||
|
BEACHTOY_11 = 11
|
||||||
};
|
};
|
||||||
|
|
||||||
extern RwRaster* gpWaterRaster;
|
extern RwRaster* gpWaterRaster;
|
||||||
|
|
|
@ -1,5 +1,15 @@
|
||||||
#if defined RW_GL3 && !defined LIBRW_SDL2
|
#if defined RW_GL3 && !defined LIBRW_SDL2
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#include <mmsystem.h>
|
||||||
|
#include <shellapi.h>
|
||||||
|
#include <windowsx.h>
|
||||||
|
#include <basetsd.h>
|
||||||
|
#include <regstr.h>
|
||||||
|
#include <shlobj.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define WITHWINDOWS
|
#define WITHWINDOWS
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
@ -816,12 +826,28 @@ void joysChangeCB(int jid, int event);
|
||||||
|
|
||||||
bool IsThisJoystickBlacklisted(int i)
|
bool IsThisJoystickBlacklisted(int i)
|
||||||
{
|
{
|
||||||
const char *joyname = glfwGetJoystickName(i);
|
if (glfwJoystickIsGamepad(i))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const char* joyname = glfwGetJoystickName(i);
|
||||||
|
|
||||||
// this is just a keyboard and mouse
|
// this is just a keyboard and mouse
|
||||||
// Microsoft Microsoft® 2.4GHz Transceiver v8.0 Consumer Control
|
// Microsoft Microsoft® 2.4GHz Transceiver v8.0 Consumer Control
|
||||||
// Microsoft Microsoft® 2.4GHz Transceiver v8.0 System Control
|
// Microsoft Microsoft® 2.4GHz Transceiver v8.0 System Control
|
||||||
if(strstr(joyname, "2.4GHz Transceiver"))
|
if (strstr(joyname, "2.4GHz Transceiver"))
|
||||||
|
return true;
|
||||||
|
// COMPANY USB Device System Control
|
||||||
|
// COMPANY USB Device Consumer Control
|
||||||
|
if (strstr(joyname, "COMPANY USB"))
|
||||||
|
return true;
|
||||||
|
// i.e. Synaptics TM2438-005
|
||||||
|
if (strstr(joyname, "Synaptics "))
|
||||||
|
return true;
|
||||||
|
// i.e. ELAN Touchscreen
|
||||||
|
if (strstr(joyname, "ELAN "))
|
||||||
|
return true;
|
||||||
|
// i.e. Primax Electronics, Ltd HP Wireless Keyboard Mouse Kit Consumer Control
|
||||||
|
if (strstr(joyname, "Keyboard"))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -1195,7 +1221,11 @@ void resizeCB(GLFWwindow* window, int width, int height) {
|
||||||
* memory things don't work.
|
* memory things don't work.
|
||||||
*/
|
*/
|
||||||
/* redraw window */
|
/* redraw window */
|
||||||
if (RwInitialised && (gGameState == GS_PLAYING_GAME || gGameState == GS_ANIMVIEWER))
|
if (RwInitialised && (gGameState == GS_PLAYING_GAME
|
||||||
|
#ifndef MASTER
|
||||||
|
|| gGameState == GS_ANIMVIEWER
|
||||||
|
#endif
|
||||||
|
))
|
||||||
{
|
{
|
||||||
RsEventHandler((gGameState == GS_PLAYING_GAME ? rsIDLE : rsANIMVIEWER), (void*)TRUE);
|
RsEventHandler((gGameState == GS_PLAYING_GAME ? rsIDLE : rsANIMVIEWER), (void*)TRUE);
|
||||||
}
|
}
|
||||||
|
@ -1625,6 +1655,72 @@ main(int argc, char *argv[])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case GS_INIT_LOGO_MPEG:
|
||||||
|
{
|
||||||
|
//if (!startupDeactivate)
|
||||||
|
// PlayMovieInWindow(cmdShow, "movies\\Logo.mpg");
|
||||||
|
gGameState = GS_LOGO_MPEG;
|
||||||
|
TRACE("gGameState = GS_LOGO_MPEG;");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case GS_LOGO_MPEG:
|
||||||
|
{
|
||||||
|
// CPad::UpdatePads();
|
||||||
|
|
||||||
|
// if (startupDeactivate || ControlsManager.GetJoyButtonJustDown() != 0)
|
||||||
|
++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetLeftMouseJustDown())
|
||||||
|
// ++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetEnterJustDown())
|
||||||
|
// ++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetCharJustDown(' '))
|
||||||
|
// ++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetAltJustDown())
|
||||||
|
// ++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetTabJustDown())
|
||||||
|
// ++gGameState;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case GS_INIT_INTRO_MPEG:
|
||||||
|
{
|
||||||
|
//#ifndef NO_MOVIES
|
||||||
|
// CloseClip();
|
||||||
|
// CoUninitialize();
|
||||||
|
//#endif
|
||||||
|
//
|
||||||
|
// if (CMenuManager::OS_Language == LANG_FRENCH || CMenuManager::OS_Language == LANG_GERMAN)
|
||||||
|
// PlayMovieInWindow(cmdShow, "movies\\GTAtitlesGER.mpg");
|
||||||
|
// else
|
||||||
|
// PlayMovieInWindow(cmdShow, "movies\\GTAtitles.mpg");
|
||||||
|
|
||||||
|
gGameState = GS_INTRO_MPEG;
|
||||||
|
TRACE("gGameState = GS_INTRO_MPEG;");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case GS_INTRO_MPEG:
|
||||||
|
{
|
||||||
|
// CPad::UpdatePads();
|
||||||
|
//
|
||||||
|
// if (startupDeactivate || ControlsManager.GetJoyButtonJustDown() != 0)
|
||||||
|
++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetLeftMouseJustDown())
|
||||||
|
// ++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetEnterJustDown())
|
||||||
|
// ++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetCharJustDown(' '))
|
||||||
|
// ++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetAltJustDown())
|
||||||
|
// ++gGameState;
|
||||||
|
// else if (CPad::GetPad(0)->GetTabJustDown())
|
||||||
|
// ++gGameState;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case GS_INIT_ONCE:
|
case GS_INIT_ONCE:
|
||||||
{
|
{
|
||||||
//CoUninitialize();
|
//CoUninitialize();
|
||||||
|
@ -1833,8 +1929,10 @@ main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if ( gGameState == GS_PLAYING_GAME )
|
if ( gGameState == GS_PLAYING_GAME )
|
||||||
CGame::ShutDown();
|
CGame::ShutDown();
|
||||||
|
#ifndef MASTER
|
||||||
else if ( gGameState == GS_ANIMVIEWER )
|
else if ( gGameState == GS_ANIMVIEWER )
|
||||||
CAnimViewer::Shutdown();
|
CAnimViewer::Shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
CTimer::Stop();
|
CTimer::Stop();
|
||||||
|
|
||||||
|
@ -1858,8 +1956,10 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
if ( gGameState == GS_PLAYING_GAME )
|
if ( gGameState == GS_PLAYING_GAME )
|
||||||
CGame::ShutDown();
|
CGame::ShutDown();
|
||||||
|
#ifndef MASTER
|
||||||
else if ( gGameState == GS_ANIMVIEWER )
|
else if ( gGameState == GS_ANIMVIEWER )
|
||||||
CAnimViewer::Shutdown();
|
CAnimViewer::Shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
DMAudio.Terminate();
|
DMAudio.Terminate();
|
||||||
|
|
||||||
|
@ -1947,11 +2047,11 @@ void CapturePad(RwInt32 padID)
|
||||||
|
|
||||||
// Gamepad axes are guaranteed to return 0.0f if that particular gamepad doesn't have that axis.
|
// Gamepad axes are guaranteed to return 0.0f if that particular gamepad doesn't have that axis.
|
||||||
if ( glfwPad != -1 ) {
|
if ( glfwPad != -1 ) {
|
||||||
leftStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[0] : numAxes >= 0 ? axes[0] : 0.0f;
|
leftStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[0] : numAxes >= 1 ? axes[0] : 0.0f;
|
||||||
leftStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[1] : numAxes >= 1 ? axes[1] : 0.0f;
|
leftStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[1] : numAxes >= 2 ? axes[1] : 0.0f;
|
||||||
|
|
||||||
rightStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[2] : numAxes >= 2 ? axes[2] : 0.0f;
|
rightStickPos.x = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[2] : numAxes >= 3 ? axes[2] : 0.0f;
|
||||||
rightStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[3] : numAxes >= 3 ? axes[3] : 0.0f;
|
rightStickPos.y = ControlsManager.m_NewState.isGamepad ? gamepadState.axes[3] : numAxes >= 4 ? axes[3] : 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -1099,8 +1099,11 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
if ( wParam == VK_SHIFT )
|
if ( wParam == VK_SHIFT )
|
||||||
_InputTranslateShiftKeyUpDown(&ks);
|
_InputTranslateShiftKeyUpDown(&ks);
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
break;
|
||||||
|
#else
|
||||||
return 0L;
|
return 0L;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_KEYUP:
|
case WM_KEYUP:
|
||||||
|
@ -1113,7 +1116,11 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
if ( wParam == VK_SHIFT )
|
if ( wParam == VK_SHIFT )
|
||||||
_InputTranslateShiftKeyUpDown(&ks);
|
_InputTranslateShiftKeyUpDown(&ks);
|
||||||
|
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
break;
|
||||||
|
#else
|
||||||
return 0L;
|
return 0L;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_SYSKEYDOWN:
|
case WM_SYSKEYDOWN:
|
||||||
|
@ -1126,7 +1133,11 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
if ( wParam == VK_SHIFT )
|
if ( wParam == VK_SHIFT )
|
||||||
_InputTranslateShiftKeyUpDown(&ks);
|
_InputTranslateShiftKeyUpDown(&ks);
|
||||||
|
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
break;
|
||||||
|
#else
|
||||||
return 0L;
|
return 0L;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_SYSKEYUP:
|
case WM_SYSKEYUP:
|
||||||
|
@ -1139,7 +1150,11 @@ MainWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
if ( wParam == VK_SHIFT )
|
if ( wParam == VK_SHIFT )
|
||||||
_InputTranslateShiftKeyUpDown(&ks);
|
_InputTranslateShiftKeyUpDown(&ks);
|
||||||
|
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
break;
|
||||||
|
#else
|
||||||
return 0L;
|
return 0L;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
case WM_ACTIVATEAPP:
|
case WM_ACTIVATEAPP:
|
||||||
|
@ -2508,8 +2523,10 @@ WinMain(HINSTANCE instance,
|
||||||
{
|
{
|
||||||
if ( gGameState == GS_PLAYING_GAME )
|
if ( gGameState == GS_PLAYING_GAME )
|
||||||
CGame::ShutDown();
|
CGame::ShutDown();
|
||||||
|
#ifndef MASTER
|
||||||
else if ( gGameState == GS_ANIMVIEWER )
|
else if ( gGameState == GS_ANIMVIEWER )
|
||||||
CAnimViewer::Shutdown();
|
CAnimViewer::Shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
CTimer::Stop();
|
CTimer::Stop();
|
||||||
|
|
||||||
|
@ -2533,8 +2550,10 @@ WinMain(HINSTANCE instance,
|
||||||
|
|
||||||
if ( gGameState == GS_PLAYING_GAME )
|
if ( gGameState == GS_PLAYING_GAME )
|
||||||
CGame::ShutDown();
|
CGame::ShutDown();
|
||||||
|
#ifndef MASTER
|
||||||
else if ( gGameState == GS_ANIMVIEWER )
|
else if ( gGameState == GS_ANIMVIEWER )
|
||||||
CAnimViewer::Shutdown();
|
CAnimViewer::Shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
DMAudio.Terminate();
|
DMAudio.Terminate();
|
||||||
|
|
||||||
|
|
|
@ -1293,7 +1293,7 @@ CAutomobile::ProcessControl(void)
|
||||||
|
|
||||||
// Process front wheels off ground
|
// Process front wheels off ground
|
||||||
|
|
||||||
if(!IsRealHeli()){
|
if (!IsRealHeli()) {
|
||||||
if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] <= 0.0f){
|
if(m_aWheelTimer[CARWHEEL_FRONT_LEFT] <= 0.0f){
|
||||||
if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier) || acceleration == 0.0f)
|
if(mod_HandlingManager.HasRearWheelDrive(pHandling->nIdentifier) || acceleration == 0.0f)
|
||||||
m_aWheelSpeed[CARWHEEL_FRONT_LEFT] *= 0.95f;
|
m_aWheelSpeed[CARWHEEL_FRONT_LEFT] *= 0.95f;
|
||||||
|
@ -1384,6 +1384,9 @@ CAutomobile::ProcessControl(void)
|
||||||
playRotorSound = true;
|
playRotorSound = true;
|
||||||
}
|
}
|
||||||
}else if((GetModelIndex() == MI_DODO || CVehicle::bAllDodosCheat) &&
|
}else if((GetModelIndex() == MI_DODO || CVehicle::bAllDodosCheat) &&
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
!IsRealHeli() &&
|
||||||
|
#endif
|
||||||
m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){
|
m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){
|
||||||
#ifdef ALT_DODO_CHEAT
|
#ifdef ALT_DODO_CHEAT
|
||||||
if (bAltDodoCheat)
|
if (bAltDodoCheat)
|
||||||
|
@ -1397,25 +1400,32 @@ CAutomobile::ProcessControl(void)
|
||||||
}else if(GetModelIndex() == MI_RCBARON){
|
}else if(GetModelIndex() == MI_RCBARON){
|
||||||
FlyingControl(FLIGHT_MODEL_RCPLANE);
|
FlyingControl(FLIGHT_MODEL_RCPLANE);
|
||||||
}else if(IsRealHeli() || bAllCarCheat){
|
}else if(IsRealHeli() || bAllCarCheat){
|
||||||
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
|
if (bAllCarCheat)
|
||||||
|
FlyingControl(FLIGHT_MODEL_HELI);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
// Speed up rotor
|
// Speed up rotor
|
||||||
if(m_aWheelSpeed[1] < 0.22f && !bIsInWater){
|
if (m_aWheelSpeed[1] < 0.22f && !bIsInWater) {
|
||||||
if(GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
|
if (GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
|
||||||
m_aWheelSpeed[1] += 0.003f;
|
m_aWheelSpeed[1] += 0.003f;
|
||||||
else
|
else
|
||||||
m_aWheelSpeed[1] += 0.001f;
|
m_aWheelSpeed[1] += 0.001f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fly
|
// Fly
|
||||||
if(m_aWheelSpeed[1] > 0.15f){
|
if (m_aWheelSpeed[1] > 0.15f) {
|
||||||
if(GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
|
if (GetModelIndex() == MI_RCRAIDER || GetModelIndex() == MI_RCGOBLIN)
|
||||||
FlyingControl(FLIGHT_MODEL_RCHELI);
|
FlyingControl(FLIGHT_MODEL_RCHELI);
|
||||||
else if(m_nWheelsOnGround < 4 && !(GetModelIndex() == MI_SEASPAR && bTouchingWater) ||
|
else if (m_nWheelsOnGround < 4 && !(GetModelIndex() == MI_SEASPAR && bTouchingWater) ||
|
||||||
CPad::GetPad(0)->GetAccelerate() != 0 || CPad::GetPad(0)->GetCarGunUpDown() > 1.0f ||
|
CPad::GetPad(0)->GetAccelerate() != 0 || CPad::GetPad(0)->GetCarGunUpDown() > 1.0f ||
|
||||||
Abs(m_vecMoveSpeed.x) > 0.02f ||
|
Abs(m_vecMoveSpeed.x) > 0.02f ||
|
||||||
Abs(m_vecMoveSpeed.y) > 0.02f ||
|
Abs(m_vecMoveSpeed.y) > 0.02f ||
|
||||||
Abs(m_vecMoveSpeed.z) > 0.02f)
|
Abs(m_vecMoveSpeed.z) > 0.02f)
|
||||||
FlyingControl(FLIGHT_MODEL_HELI);
|
FlyingControl(FLIGHT_MODEL_HELI);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Blade collision
|
// Blade collision
|
||||||
if(m_aWheelSpeed[1] > 0.015f && m_aCarNodes[CAR_BONNET]){
|
if(m_aWheelSpeed[1] > 0.015f && m_aCarNodes[CAR_BONNET]){
|
||||||
|
@ -1486,7 +1496,7 @@ CAutomobile::ProcessControl(void)
|
||||||
CMatrix mat;
|
CMatrix mat;
|
||||||
mat.Attach(RwFrameGetMatrix(m_aCarNodes[CAR_BONNET]));
|
mat.Attach(RwFrameGetMatrix(m_aCarNodes[CAR_BONNET]));
|
||||||
CVector blade = mat.GetRight();
|
CVector blade = mat.GetRight();
|
||||||
blade = GetMatrix() * blade;
|
blade = Multiply3x3(blade, GetMatrix());
|
||||||
camDist /= Max(Sqrt(distSq), 0.01f);
|
camDist /= Max(Sqrt(distSq), 0.01f);
|
||||||
if(Abs(DotProduct(camDist, blade)) > 0.95f){
|
if(Abs(DotProduct(camDist, blade)) > 0.95f){
|
||||||
DMAudio.PlayOneShot(m_audioEntityId, SOUND_31, 0.0f);
|
DMAudio.PlayOneShot(m_audioEntityId, SOUND_31, 0.0f);
|
||||||
|
|
|
@ -168,3 +168,4 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CVector vecHunterGunPos;
|
extern CVector vecHunterGunPos;
|
||||||
|
extern bool bAllCarCheat;
|
|
@ -132,7 +132,11 @@ CBoat::ProcessControl(void)
|
||||||
if(bRenderScorched)
|
if(bRenderScorched)
|
||||||
m_fBuoyancy *= 0.99f;
|
m_fBuoyancy *= 0.99f;
|
||||||
|
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
if(FindPlayerPed() && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && GetModelIndex() == MI_PREDATOR){
|
||||||
|
#else
|
||||||
if(FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && GetModelIndex() == MI_PREDATOR){
|
if(FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && GetModelIndex() == MI_PREDATOR){
|
||||||
|
#endif
|
||||||
CVehicle *playerVeh = FindPlayerVehicle();
|
CVehicle *playerVeh = FindPlayerVehicle();
|
||||||
if(playerVeh && playerVeh->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT &&
|
if(playerVeh && playerVeh->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT &&
|
||||||
(AutoPilot.m_nCarMission == MISSION_RAMPLAYER_FARAWAY ||
|
(AutoPilot.m_nCarMission == MISSION_RAMPLAYER_FARAWAY ||
|
||||||
|
|
|
@ -32,7 +32,7 @@ void CCarGenerator::SwitchOff()
|
||||||
|
|
||||||
void CCarGenerator::SwitchOn()
|
void CCarGenerator::SwitchOn()
|
||||||
{
|
{
|
||||||
m_nUsesRemaining = 255;
|
m_nUsesRemaining = UINT16_MAX;
|
||||||
m_nTimer = CalcNextGen();
|
m_nTimer = CalcNextGen();
|
||||||
++CTheCarGenerators::CurrentActiveCount;
|
++CTheCarGenerators::CurrentActiveCount;
|
||||||
}
|
}
|
||||||
|
@ -143,10 +143,10 @@ void CCarGenerator::DoInternalProcessing()
|
||||||
m_nVehicleHandle = CPools::GetVehiclePool()->GetIndex(pVehicle);
|
m_nVehicleHandle = CPools::GetVehiclePool()->GetIndex(pVehicle);
|
||||||
/* I don't think this is a correct comparasion */
|
/* I don't think this is a correct comparasion */
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
if (m_nUsesRemaining != 0)
|
if (m_nUsesRemaining < UINT16_MAX)
|
||||||
--m_nUsesRemaining;
|
--m_nUsesRemaining;
|
||||||
#else
|
#else
|
||||||
if (m_nUsesRemaining < -1)
|
if (m_nUsesRemaining < ~0)
|
||||||
--m_nUsesRemaining;
|
--m_nUsesRemaining;
|
||||||
#endif
|
#endif
|
||||||
m_nTimer = CalcNextGen();
|
m_nTimer = CalcNextGen();
|
||||||
|
|
|
@ -48,8 +48,10 @@ CDamageManager::FuckCarCompletely(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
// Why set to no damage?
|
// Why set to no damage?
|
||||||
|
#ifndef FIX_BUGS
|
||||||
m_lightStatus = 0;
|
m_lightStatus = 0;
|
||||||
m_panelStatus = 0;
|
m_panelStatus = 0;
|
||||||
|
#endif
|
||||||
SetEngineStatus(250);
|
SetEngineStatus(250);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -432,7 +432,12 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
case FLIGHT_MODEL_RCHELI:
|
case FLIGHT_MODEL_RCHELI:
|
||||||
case FLIGHT_MODEL_HELI:
|
case FLIGHT_MODEL_HELI:
|
||||||
{
|
{
|
||||||
float rm = Pow(pFlyingHandling->fMoveRes, CTimer::GetTimeStep());
|
#ifdef RESTORE_ALLCARSHELI_CHEAT
|
||||||
|
tFlyingHandlingData* flyingHandling = bAllCarCheat && GetStatus() == STATUS_PLAYER && !IsRealHeli() ? mod_HandlingManager.GetFlyingPointer(HANDLING_MAVERICK) : pFlyingHandling;
|
||||||
|
#else
|
||||||
|
tFlyingHandlingData* flyingHandling = pFlyingHandling;
|
||||||
|
#endif
|
||||||
|
float rm = Pow(flyingHandling->fMoveRes, CTimer::GetTimeStep());
|
||||||
m_vecMoveSpeed *= rm;
|
m_vecMoveSpeed *= rm;
|
||||||
if (GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE)
|
if (GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE)
|
||||||
return;
|
return;
|
||||||
|
@ -441,11 +446,11 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
if(fThrust < 0.0f)
|
if(fThrust < 0.0f)
|
||||||
fThrust *= 2.0f;
|
fThrust *= 2.0f;
|
||||||
if(flightModel == FLIGHT_MODEL_RCHELI){
|
if(flightModel == FLIGHT_MODEL_RCHELI){
|
||||||
fThrust = pFlyingHandling->fThrust * fThrust + 0.45f;
|
fThrust = flyingHandling->fThrust * fThrust + 0.45f;
|
||||||
ApplyMoveForce(GRAVITY * CVector(0.0f, 0.0f, 0.5f) * m_fMass * CTimer::GetTimeStep());
|
ApplyMoveForce(GRAVITY * CVector(0.0f, 0.0f, 0.5f) * m_fMass * CTimer::GetTimeStep());
|
||||||
}else
|
}else
|
||||||
fThrust = pFlyingHandling->fThrust * fThrust + 0.95f;
|
fThrust = flyingHandling->fThrust * fThrust + 0.95f;
|
||||||
fThrust -= pFlyingHandling->fThrustFallOff * fUpSpeed;
|
fThrust -= flyingHandling->fThrustFallOff * fUpSpeed;
|
||||||
if(flightModel == FLIGHT_MODEL_RCHELI && GetPosition().z > 40.0f)
|
if(flightModel == FLIGHT_MODEL_RCHELI && GetPosition().z > 40.0f)
|
||||||
fThrust *= 10.0f/(GetPosition().z - 30.0f);
|
fThrust *= 10.0f/(GetPosition().z - 30.0f);
|
||||||
else if(GetPosition().z > 80.0f)
|
else if(GetPosition().z > 80.0f)
|
||||||
|
@ -453,20 +458,20 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
ApplyMoveForce(GRAVITY * GetUp() * fThrust * m_fMass * CTimer::GetTimeStep());
|
ApplyMoveForce(GRAVITY * GetUp() * fThrust * m_fMass * CTimer::GetTimeStep());
|
||||||
|
|
||||||
if (GetUp().z > 0.0f){
|
if (GetUp().z > 0.0f){
|
||||||
float upRight = clamp(GetRight().z, -pFlyingHandling->fFormLift, pFlyingHandling->fFormLift);
|
float upRight = clamp(GetRight().z, -flyingHandling->fFormLift, flyingHandling->fFormLift);
|
||||||
float upImpulseRight = -upRight * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
float upImpulseRight = -upRight * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
||||||
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
|
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
|
||||||
|
|
||||||
float upFwd = clamp(GetForward().z, -pFlyingHandling->fFormLift, pFlyingHandling->fFormLift);
|
float upFwd = clamp(GetForward().z, -flyingHandling->fFormLift, flyingHandling->fFormLift);
|
||||||
float upImpulseFwd = -upFwd * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
float upImpulseFwd = -upFwd * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
||||||
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
|
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
|
||||||
}else{
|
}else{
|
||||||
float upRight = GetRight().z < 0.0f ? -pFlyingHandling->fFormLift : pFlyingHandling->fFormLift;
|
float upRight = GetRight().z < 0.0f ? -flyingHandling->fFormLift : flyingHandling->fFormLift;
|
||||||
float upImpulseRight = -upRight * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
float upImpulseRight = -upRight * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
||||||
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
|
ApplyTurnForce(upImpulseRight * GetUp(), GetRight());
|
||||||
|
|
||||||
float upFwd = GetForward().z < 0.0f ? -pFlyingHandling->fFormLift : pFlyingHandling->fFormLift;
|
float upFwd = GetForward().z < 0.0f ? -flyingHandling->fFormLift : flyingHandling->fFormLift;
|
||||||
float upImpulseFwd = -upFwd * pFlyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
float upImpulseFwd = -upFwd * flyingHandling->fAttackLift * m_fTurnMass * CTimer::GetTimeStep();
|
||||||
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
|
ApplyTurnForce(upImpulseFwd * GetUp(), GetForward());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,25 +495,25 @@ CVehicle::FlyingControl(eFlightModel flightModel)
|
||||||
fPitch = -CPad::GetPad(0)->GetCarGunUpDown() / 128.0f;
|
fPitch = -CPad::GetPad(0)->GetCarGunUpDown() / 128.0f;
|
||||||
if (CPad::GetPad(0)->GetHorn()) {
|
if (CPad::GetPad(0)->GetHorn()) {
|
||||||
fYaw = 0.0f;
|
fYaw = 0.0f;
|
||||||
fPitch = clamp(pFlyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f);
|
fPitch = clamp(flyingHandling->fPitchStab * DotProduct(m_vecMoveSpeed, GetForward()), -200.0f, 1.3f);
|
||||||
fRoll = clamp(pFlyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f);
|
fRoll = clamp(flyingHandling->fRollStab * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f);
|
||||||
}
|
}
|
||||||
ApplyTurnForce(fPitch * GetUp() * pFlyingHandling->fPitch * m_fTurnMass * CTimer::GetTimeStep(), GetForward());
|
ApplyTurnForce(fPitch * GetUp() * flyingHandling->fPitch * m_fTurnMass * CTimer::GetTimeStep(), GetForward());
|
||||||
ApplyTurnForce(fRoll * GetUp() * pFlyingHandling->fRoll * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
|
ApplyTurnForce(fRoll * GetUp() * flyingHandling->fRoll * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
|
||||||
|
|
||||||
float fSideSpeed = -DotProduct(GetMoveSpeed(), GetRight());
|
float fSideSpeed = -DotProduct(GetMoveSpeed(), GetRight());
|
||||||
float fSideSlipAccel = pFlyingHandling->fSideSlip * fSideSpeed * Abs(fSideSpeed);
|
float fSideSlipAccel = flyingHandling->fSideSlip * fSideSpeed * Abs(fSideSpeed);
|
||||||
ApplyMoveForce(m_fMass * GetRight() * fSideSlipAccel * CTimer::GetTimeStep());
|
ApplyMoveForce(m_fMass * GetRight() * fSideSlipAccel * CTimer::GetTimeStep());
|
||||||
float fYawAccel = pFlyingHandling->fYawStab * fSideSpeed * Abs(fSideSpeed) + pFlyingHandling->fYaw * fYaw;
|
float fYawAccel = flyingHandling->fYawStab * fSideSpeed * Abs(fSideSpeed) + flyingHandling->fYaw * fYaw;
|
||||||
ApplyTurnForce(fYawAccel * GetRight() * m_fTurnMass * CTimer::GetTimeStep(), -GetForward());
|
ApplyTurnForce(fYawAccel * GetRight() * m_fTurnMass * CTimer::GetTimeStep(), -GetForward());
|
||||||
|
|
||||||
ApplyTurnForce(fYaw * GetForward() * pFlyingHandling->fYaw * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
|
ApplyTurnForce(fYaw * GetForward() * flyingHandling->fYaw * m_fTurnMass * CTimer::GetTimeStep(), GetRight());
|
||||||
|
|
||||||
float rX = Pow(pFlyingHandling->vecTurnRes.x, CTimer::GetTimeStep());
|
float rX = Pow(flyingHandling->vecTurnRes.x, CTimer::GetTimeStep());
|
||||||
float rY = Pow(pFlyingHandling->vecTurnRes.y, CTimer::GetTimeStep());
|
float rY = Pow(flyingHandling->vecTurnRes.y, CTimer::GetTimeStep());
|
||||||
float rZ = Pow(pFlyingHandling->vecTurnRes.z, CTimer::GetTimeStep());
|
float rZ = Pow(flyingHandling->vecTurnRes.z, CTimer::GetTimeStep());
|
||||||
CVector vecTurnSpeed = Multiply3x3(m_vecTurnSpeed, GetMatrix());
|
CVector vecTurnSpeed = Multiply3x3(m_vecTurnSpeed, GetMatrix());
|
||||||
float fResistanceMultiplier = Pow(1.0f / (pFlyingHandling->vecSpeedRes.z * SQR(vecTurnSpeed.z) + 1.0f) * rZ, CTimer::GetTimeStep());
|
float fResistanceMultiplier = Pow(1.0f / (flyingHandling->vecSpeedRes.z * SQR(vecTurnSpeed.z) + 1.0f) * rZ, CTimer::GetTimeStep());
|
||||||
float fResistance = vecTurnSpeed.z * fResistanceMultiplier - vecTurnSpeed.z;
|
float fResistance = vecTurnSpeed.z * fResistanceMultiplier - vecTurnSpeed.z;
|
||||||
vecTurnSpeed.x *= rX;
|
vecTurnSpeed.x *= rX;
|
||||||
vecTurnSpeed.y *= rY;
|
vecTurnSpeed.y *= rY;
|
||||||
|
|
|
@ -31,6 +31,16 @@ void
|
||||||
CExplosion::Initialise()
|
CExplosion::Initialise()
|
||||||
{
|
{
|
||||||
debug("Initialising CExplosion...\n");
|
debug("Initialising CExplosion...\n");
|
||||||
|
ClearAllExplosions();
|
||||||
|
AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1);
|
||||||
|
if (AudioHandle >= 0)
|
||||||
|
DMAudio.SetEntityStatus(AudioHandle, true);
|
||||||
|
debug("CExplosion ready\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CExplosion::ClearAllExplosions()
|
||||||
|
{
|
||||||
for (int i = 0; i < ARRAY_SIZE(gaExplosion); i++) {
|
for (int i = 0; i < ARRAY_SIZE(gaExplosion); i++) {
|
||||||
gaExplosion[i].m_ExplosionType = EXPLOSION_GRENADE;
|
gaExplosion[i].m_ExplosionType = EXPLOSION_GRENADE;
|
||||||
gaExplosion[i].m_vecPosition = CVector(0.0f, 0.0f, 0.0f);
|
gaExplosion[i].m_vecPosition = CVector(0.0f, 0.0f, 0.0f);
|
||||||
|
@ -44,10 +54,6 @@ CExplosion::Initialise()
|
||||||
gaExplosion[i].m_fStartTime = 0.0f;
|
gaExplosion[i].m_fStartTime = 0.0f;
|
||||||
gaExplosion[i].m_bIsBoat = false;
|
gaExplosion[i].m_bIsBoat = false;
|
||||||
}
|
}
|
||||||
AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1);
|
|
||||||
if (AudioHandle >= 0)
|
|
||||||
DMAudio.SetEntityStatus(AudioHandle, true);
|
|
||||||
debug("CExplosion ready\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -37,6 +37,7 @@ class CExplosion
|
||||||
float m_fZshift;
|
float m_fZshift;
|
||||||
public:
|
public:
|
||||||
static void Initialise();
|
static void Initialise();
|
||||||
|
static void ClearAllExplosions();
|
||||||
static void Shutdown();
|
static void Shutdown();
|
||||||
static int8 GetExplosionActiveCounter(uint8 id);
|
static int8 GetExplosionActiveCounter(uint8 id);
|
||||||
static void ResetExplosionActiveCounter(uint8 id);
|
static void ResetExplosionActiveCounter(uint8 id);
|
||||||
|
|
2
vendor/opusfile
vendored
2
vendor/opusfile
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 6452e838e68e8f4fc0b3599523c760ac6276ce89
|
Subproject commit f94a1764b0dcdd84ee8c13c040de9f4c1a67e4df
|
Loading…
Reference in a new issue