Merge pull request #718 from Nick007J/miami

VC replays
This commit is contained in:
erorcun
2020-09-29 23:00:50 +03:00
committed by GitHub
12 changed files with 574 additions and 149 deletions
+1
View File
@@ -139,4 +139,5 @@ public:
static void LoadAnimFile(RwStream *stream, bool compress, char (*somename)[32] = nil);
static void CreateAnimAssocGroups(void);
static void RemoveLastAnimFile(void);
static CAnimBlendAssocGroup* GetAnimAssocGroups(void) { return ms_aAnimAssocGroups; }
};
+1
View File
@@ -300,5 +300,6 @@ private:
static bool IsThisGarageTypeSafehouse(eGarageType type) { return FindSafeHouseIndexForGarageType(type) >= 0; }
friend class cAudioManager;
friend class CReplay;
friend class CGarage;
};
+431 -120
View File
File diff suppressed because it is too large Load Diff
+108 -19
View File
File diff suppressed because it is too large Load Diff
+1 -5
View File
@@ -10098,11 +10098,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
model = CStreaming::ms_vehiclesLoaded[index];
if (model == -1)
continue;
// desperatly want to believe this was inlined :|
CBaseModelInfo* pInfo = CModelInfo::GetModelInfo(model);
script_assert(pInfo->GetModelType() == MITYPE_VEHICLE);
CVehicleModelInfo* pVehicleInfo = (CVehicleModelInfo*)pInfo;
if (pVehicleInfo->m_vehicleType != VEHICLE_TYPE_CAR) {
if (CModelInfo::IsCarModel(model) || CModelInfo::IsBikeModel(model)) {
switch (model) {
case MI_LANDSTAL:
case MI_LINERUN:
+4
View File
@@ -230,7 +230,11 @@ CEventList::ReportCrimeForEvent(eEventType type, size_t crimeId, bool copsDontCa
if(crime == CRIME_NONE)
return;
#ifdef FIX_BUGS
CVector playerPedCoors = FindPlayerCoors();
#else
CVector playerPedCoors = FindPlayerPed()->GetPosition();
#endif
CVector playerCoors = FindPlayerCoors();
if(CWanted::WorkOutPolicePresence(playerCoors, 14.0f) != 0 ||
+4
View File
@@ -1261,7 +1261,11 @@ void CParticle::Update()
{
if ( CTimer::GetFrameCounter() & 10 )
{
#ifdef FIX_BUGS
if ( FindPlayerPed() && FindPlayerPed()->GetWeapon()->m_eWeaponType == WEAPONTYPE_MINIGUN )
#else
if ( FindPlayerPed()->GetWeapon()->m_eWeaponType == WEAPONTYPE_MINIGUN )
#endif
{
AddParticle(PARTICLE_HEATHAZE, particle->m_vecPosition, CVector(0.0f, 0.0f, 0.0f));
}
+8
View File
@@ -2745,7 +2745,11 @@ CWaterLevel::RenderSeaBirds()
void
CWaterLevel::RenderShipsOnHorizon()
{
#ifdef FIX_BUGS
CVector cur_pos = FindPlayerCoors();
#else
CVector cur_pos = FindPlayerPed()->GetPosition();
#endif
static CVector prev_pos(0.0f, 0.0f, 0.0f);
static CVector prev_front(0.0f, 0.0f, 0.0f);
@@ -2847,7 +2851,11 @@ CWaterLevel::HandleSeaLifeForms()
void
CWaterLevel::HandleBeachToysStuff(void)
{
#ifdef FIX_BUGS
CVector cur_pos = FindPlayerCoors();
#else
CVector cur_pos = FindPlayerPed()->GetPosition();
#endif
static bool bBeachBallInit = true;
static CVector FirstBeachBallPos = cur_pos;
+4
View File
@@ -132,7 +132,11 @@ CBoat::ProcessControl(void)
if(bRenderScorched)
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){
#endif
CVehicle *playerVeh = FindPlayerVehicle();
if(playerVeh && playerVeh->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT &&
(AutoPilot.m_nCarMission == MISSION_RAMPLAYER_FARAWAY ||
+10 -4
View File
@@ -31,6 +31,16 @@ void
CExplosion::Initialise()
{
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++) {
gaExplosion[i].m_ExplosionType = EXPLOSION_GRENADE;
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_bIsBoat = false;
}
AudioHandle = DMAudio.CreateEntity(AUDIOTYPE_EXPLOSION, (void*)1);
if (AudioHandle >= 0)
DMAudio.SetEntityStatus(AudioHandle, true);
debug("CExplosion ready\n");
}
void
+1
View File
@@ -37,6 +37,7 @@ class CExplosion
float m_fZshift;
public:
static void Initialise();
static void ClearAllExplosions();
static void Shutdown();
static int8 GetExplosionActiveCounter(uint8 id);
static void ResetExplosionActiveCounter(uint8 id);