From c92dfb0064143e03d1d75315c43840eeaf27e167 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sat, 22 Feb 2020 19:47:42 +0100 Subject: Fix police radio condition thx @Nick007J --- src/audio/AudioManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 89abee8d..ff7babc4 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -4676,7 +4676,7 @@ cAudioManager::ProcessMissionAudio() --nCheckPlayingDelay; } else if(GetMissionScriptPoliceAudioPlayingStatus() == 2 || - --m_sMissionAudio.field_24) { + m_sMissionAudio.field_24-- == 0) { m_sMissionAudio.m_bPlayStatus = 2; m_sMissionAudio.m_nSampleIndex = 3033; SampleManager.StopStreamedFile(1); -- cgit v1.2.3 From b2d062ef2dc5d117fa11a56d56a2ac8531c7a187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 23 Feb 2020 01:42:10 +0300 Subject: some fixes --- src/core/Pad.h | 2 +- src/vehicles/Automobile.cpp | 4 ++-- src/vehicles/DamageManager.cpp | 8 ++++---- src/vehicles/Door.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/core/Pad.h b/src/core/Pad.h index f4a07cae..09e6b39d 100644 --- a/src/core/Pad.h +++ b/src/core/Pad.h @@ -9,7 +9,7 @@ enum { PLAYERCONTROL_DISABLED_10 = 16, PLAYERCONTROL_DISABLED_20 = 32, // used on CPlayerInfo::MakePlayerSafe PLAYERCONTROL_DISABLED_40 = 64, // used on phone calls - PLAYERCONTROL_DISABLED_80 = 128, + PLAYERCONTROL_DISABLED_80 = 128,// used on cutscenes }; class CControllerState diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index a79f619c..64f756ad 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -2177,7 +2177,7 @@ CAutomobile::ProcessEntityCollision(CEntity *ent, CColPoint *colpoints) if(phys->bIsStatic){ phys->bIsStatic = false; phys->m_nStaticFrames = 0; - phys->ApplyMoveForce(m_vecMoveSpeed / speed); + phys->ApplyMoveForce(m_vecMoveSpeed / Sqrt(speed)); phys->AddToMovingList(); } } @@ -2318,7 +2318,7 @@ CAutomobile::ProcessControlInputs(uint8 pad) // Brake if player isn't in control // BUG: game always uses pad 0 here - if(CPad::GetPad(pad)->DisablePlayerControls){ + if(CPad::GetPad(pad)->ArePlayerControlsDisabled()){ m_fBrakePedal = 1.0f; bIsHandbrakeOn = true; m_fGasPedal = 0.0f; diff --git a/src/vehicles/DamageManager.cpp b/src/vehicles/DamageManager.cpp index 3a7bd9e9..9a697b6b 100644 --- a/src/vehicles/DamageManager.cpp +++ b/src/vehicles/DamageManager.cpp @@ -119,7 +119,7 @@ CDamageManager::GetComponentGroup(tComponent component, tComponentGroup *compone return true; }else if(component >= COMPONENT_DEFAULT){ *componentGroup = COMPGROUP_DEFAULT; - *subComp = component - COMPONENT_DEFAULT; + *subComp = COMPONENT_DEFAULT; return true; }else return false; @@ -141,7 +141,7 @@ bool CDamageManager::ProgressDoorDamage(uint8 door) { int status = GetDoorStatus(door); - if(status == 3) + if(status == PANEL_STATUS_MISSING) return false; SetDoorStatus(door, status+1); return true; @@ -163,7 +163,7 @@ bool CDamageManager::ProgressPanelDamage(uint8 panel) { int status = GetPanelStatus(panel); - if(status == 3) + if(status == DOOR_STATUS_MISSING) return false; SetPanelStatus(panel, status+1); return true; @@ -197,7 +197,7 @@ bool CDamageManager::ProgressWheelDamage(uint8 wheel) { int status = GetWheelStatus(wheel); - if(status == 3) + if(status == WHEEL_STATUS_MISSING) return false; SetWheelStatus(wheel, status+1); return true; diff --git a/src/vehicles/Door.cpp b/src/vehicles/Door.cpp index 2d47b3e9..c569be59 100644 --- a/src/vehicles/Door.cpp +++ b/src/vehicles/Door.cpp @@ -47,9 +47,9 @@ CDoor::Process(CVehicle *vehicle) case 2: // z-axis if(m_nDirn) - fSpeedDiff = -(vecSpeedDiff.x + vecSpeedDiff.y); + fSpeedDiff = -(vecSpeedDiff.y + vecSpeedDiff.x); else - fSpeedDiff = vecSpeedDiff.x + vecSpeedDiff.y; + fSpeedDiff = vecSpeedDiff.y - vecSpeedDiff.x; break; } fSpeedDiff = clamp(fSpeedDiff, -0.2f, 0.2f); -- cgit v1.2.3 From cbf396e6e94109ada4e2ec020cb50163ac05dc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 23 Feb 2020 18:32:28 +0300 Subject: script fixes --- src/control/Script.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/control/Script.cpp b/src/control/Script.cpp index f6db26ec..3d8807d8 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -8544,7 +8544,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) CTimer::Stop(); CGame::currLevel = (eLevelName)ScriptParams[0]; CStreaming::RemoveUnusedBigBuildings(CGame::currLevel); - CStreaming::RemoveIslandsNotUsed(CGame::currLevel); + CStreaming::RemoveUnusedBuildings(CGame::currLevel); CCollision::SortOutCollisionAfterLoad(); CStreaming::RequestIslands(CGame::currLevel); CStreaming::LoadAllRequestedModels(true); @@ -9013,7 +9013,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) } case COMMAND_SET_MUSIC_DOES_FADE: CollectParameters(&m_nIp, 1); - TheCamera.m_bMusicFading = (ScriptParams[0] == 0); + TheCamera.m_bIgnoreFadingStuffForMusic = (ScriptParams[0] == 0); return 0; case COMMAND_SET_INTRO_IS_PLAYING: CollectParameters(&m_nIp, 1); @@ -9162,7 +9162,7 @@ int8 CRunningScript::ProcessCommands1100To1199(int32 command) DMAudio.Service(); CPopulation::DealWithZoneChange(CCollision::ms_collisionInMemory, CGame::currLevel, false); CStreaming::RemoveUnusedBigBuildings(CGame::currLevel); - CStreaming::RemoveIslandsNotUsed(CGame::currLevel); + CStreaming::RemoveUnusedBuildings(CGame::currLevel); CCollision::SortOutCollisionAfterLoad(); CStreaming::RequestIslands(CGame::currLevel); CStreaming::RequestBigBuildings(CGame::currLevel); -- cgit v1.2.3