From c937bdbfea8f522d14d7a41f24372bddf5bdafcc Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sun, 18 Jul 2021 00:03:57 +0300 Subject: [PATCH 1/8] render -> renderer (original name) --- .vscode/settings.json | 2 +- codewarrior/reVC.mcp.xml | 6 +++--- premake5.lua | 4 ++-- src/{render => renderer}/2dEffect.h | 0 src/{render => renderer}/Antennas.cpp | 0 src/{render => renderer}/Antennas.h | 0 src/{render => renderer}/Clouds.cpp | 0 src/{render => renderer}/Clouds.h | 0 src/{render => renderer}/Console.cpp | 0 src/{render => renderer}/Console.h | 0 src/{render => renderer}/Coronas.cpp | 0 src/{render => renderer}/Coronas.h | 0 src/{render => renderer}/Credits.cpp | 0 src/{render => renderer}/Credits.h | 0 src/{render => renderer}/CutsceneShadow.cpp | 0 src/{render => renderer}/CutsceneShadow.h | 0 src/{render => renderer}/Draw.cpp | 0 src/{render => renderer}/Draw.h | 0 src/{render => renderer}/Fluff.cpp | 0 src/{render => renderer}/Fluff.h | 0 src/{render => renderer}/Font.cpp | 0 src/{render => renderer}/Font.h | 0 src/{render => renderer}/Glass.cpp | 0 src/{render => renderer}/Glass.h | 0 src/{render => renderer}/Hud.cpp | 0 src/{render => renderer}/Hud.h | 0 src/{render => renderer}/Instance.cpp | 0 src/{render => renderer}/Instance.h | 0 src/{render => renderer}/Lines.cpp | 0 src/{render => renderer}/Lines.h | 0 src/{render => renderer}/MBlur.cpp | 0 src/{render => renderer}/MBlur.h | 0 src/{render => renderer}/Occlusion.cpp | 0 src/{render => renderer}/Occlusion.h | 0 src/{render => renderer}/Particle.cpp | 0 src/{render => renderer}/Particle.h | 0 src/{render => renderer}/ParticleMgr.cpp | 0 src/{render => renderer}/ParticleMgr.h | 0 src/{render => renderer}/ParticleType.h | 0 src/{render => renderer}/PlayerSkin.cpp | 0 src/{render => renderer}/PlayerSkin.h | 0 src/{render => renderer}/PointLights.cpp | 0 src/{render => renderer}/PointLights.h | 0 src/{render => renderer}/RenderBuffer.cpp | 0 src/{render => renderer}/RenderBuffer.h | 0 src/{render => renderer}/Renderer.cpp | 0 src/{render => renderer}/Renderer.h | 0 src/{render => renderer}/Rubbish.cpp | 0 src/{render => renderer}/Rubbish.h | 0 src/{render => renderer}/ShadowCamera.cpp | 0 src/{render => renderer}/ShadowCamera.h | 0 src/{render => renderer}/Shadows.cpp | 0 src/{render => renderer}/Shadows.h | 0 src/{render => renderer}/Skidmarks.cpp | 0 src/{render => renderer}/Skidmarks.h | 0 src/{render => renderer}/SpecialFX.cpp | 0 src/{render => renderer}/SpecialFX.h | 0 src/{render => renderer}/Sprite.cpp | 0 src/{render => renderer}/Sprite.h | 0 src/{render => renderer}/Sprite2d.cpp | 0 src/{render => renderer}/Sprite2d.h | 0 src/{render => renderer}/TexList.cpp | 0 src/{render => renderer}/TexList.h | 0 src/{render => renderer}/Timecycle.cpp | 0 src/{render => renderer}/Timecycle.h | 0 src/{render => renderer}/VarConsole.cpp | 0 src/{render => renderer}/VarConsole.h | 0 src/{render => renderer}/WaterCannon.cpp | 0 src/{render => renderer}/WaterCannon.h | 0 src/{render => renderer}/WaterCreatures.cpp | 0 src/{render => renderer}/WaterCreatures.h | 0 src/{render => renderer}/WaterLevel.cpp | 0 src/{render => renderer}/WaterLevel.h | 0 src/{render => renderer}/Weather.cpp | 0 src/{render => renderer}/Weather.h | 0 src/{render => renderer}/WindModifiers.cpp | 0 src/{render => renderer}/WindModifiers.h | 0 77 files changed, 6 insertions(+), 6 deletions(-) rename src/{render => renderer}/2dEffect.h (100%) rename src/{render => renderer}/Antennas.cpp (100%) rename src/{render => renderer}/Antennas.h (100%) rename src/{render => renderer}/Clouds.cpp (100%) rename src/{render => renderer}/Clouds.h (100%) rename src/{render => renderer}/Console.cpp (100%) rename src/{render => renderer}/Console.h (100%) rename src/{render => renderer}/Coronas.cpp (100%) rename src/{render => renderer}/Coronas.h (100%) rename src/{render => renderer}/Credits.cpp (100%) rename src/{render => renderer}/Credits.h (100%) rename src/{render => renderer}/CutsceneShadow.cpp (100%) rename src/{render => renderer}/CutsceneShadow.h (100%) rename src/{render => renderer}/Draw.cpp (100%) rename src/{render => renderer}/Draw.h (100%) rename src/{render => renderer}/Fluff.cpp (100%) rename src/{render => renderer}/Fluff.h (100%) rename src/{render => renderer}/Font.cpp (100%) rename src/{render => renderer}/Font.h (100%) rename src/{render => renderer}/Glass.cpp (100%) rename src/{render => renderer}/Glass.h (100%) rename src/{render => renderer}/Hud.cpp (100%) rename src/{render => renderer}/Hud.h (100%) rename src/{render => renderer}/Instance.cpp (100%) rename src/{render => renderer}/Instance.h (100%) rename src/{render => renderer}/Lines.cpp (100%) rename src/{render => renderer}/Lines.h (100%) rename src/{render => renderer}/MBlur.cpp (100%) rename src/{render => renderer}/MBlur.h (100%) rename src/{render => renderer}/Occlusion.cpp (100%) rename src/{render => renderer}/Occlusion.h (100%) rename src/{render => renderer}/Particle.cpp (100%) rename src/{render => renderer}/Particle.h (100%) rename src/{render => renderer}/ParticleMgr.cpp (100%) rename src/{render => renderer}/ParticleMgr.h (100%) rename src/{render => renderer}/ParticleType.h (100%) rename src/{render => renderer}/PlayerSkin.cpp (100%) rename src/{render => renderer}/PlayerSkin.h (100%) rename src/{render => renderer}/PointLights.cpp (100%) rename src/{render => renderer}/PointLights.h (100%) rename src/{render => renderer}/RenderBuffer.cpp (100%) rename src/{render => renderer}/RenderBuffer.h (100%) rename src/{render => renderer}/Renderer.cpp (100%) rename src/{render => renderer}/Renderer.h (100%) rename src/{render => renderer}/Rubbish.cpp (100%) rename src/{render => renderer}/Rubbish.h (100%) rename src/{render => renderer}/ShadowCamera.cpp (100%) rename src/{render => renderer}/ShadowCamera.h (100%) rename src/{render => renderer}/Shadows.cpp (100%) rename src/{render => renderer}/Shadows.h (100%) rename src/{render => renderer}/Skidmarks.cpp (100%) rename src/{render => renderer}/Skidmarks.h (100%) rename src/{render => renderer}/SpecialFX.cpp (100%) rename src/{render => renderer}/SpecialFX.h (100%) rename src/{render => renderer}/Sprite.cpp (100%) rename src/{render => renderer}/Sprite.h (100%) rename src/{render => renderer}/Sprite2d.cpp (100%) rename src/{render => renderer}/Sprite2d.h (100%) rename src/{render => renderer}/TexList.cpp (100%) rename src/{render => renderer}/TexList.h (100%) rename src/{render => renderer}/Timecycle.cpp (100%) rename src/{render => renderer}/Timecycle.h (100%) rename src/{render => renderer}/VarConsole.cpp (100%) rename src/{render => renderer}/VarConsole.h (100%) rename src/{render => renderer}/WaterCannon.cpp (100%) rename src/{render => renderer}/WaterCannon.h (100%) rename src/{render => renderer}/WaterCreatures.cpp (100%) rename src/{render => renderer}/WaterCreatures.h (100%) rename src/{render => renderer}/WaterLevel.cpp (100%) rename src/{render => renderer}/WaterLevel.h (100%) rename src/{render => renderer}/Weather.cpp (100%) rename src/{render => renderer}/Weather.h (100%) rename src/{render => renderer}/WindModifiers.cpp (100%) rename src/{render => renderer}/WindModifiers.h (100%) diff --git a/.vscode/settings.json b/.vscode/settings.json index 10cb5627..fee80960 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,7 +13,7 @@ "src/modelinfo", "src/objects", "src/peds", - "src/render", + "src/renderer", "src/rw", "src/save", "src/skel", diff --git a/codewarrior/reVC.mcp.xml b/codewarrior/reVC.mcp.xml index 92638894..750fb675 100644 --- a/codewarrior/reVC.mcp.xml +++ b/codewarrior/reVC.mcp.xml @@ -187,7 +187,7 @@ SearchPath - Path..\src\render + Path..\src\renderer PathFormatWindows PathRootProject @@ -6712,7 +6712,7 @@ SearchPath - Path..\src\render + Path..\src\renderer PathFormatWindows PathRootProject @@ -14909,7 +14909,7 @@ Windows - render + renderer Debug Name diff --git a/premake5.lua b/premake5.lua index f1287011..4223b395 100644 --- a/premake5.lua +++ b/premake5.lua @@ -264,7 +264,7 @@ project "reVC" files { addSrcFiles("src/modelinfo") } files { addSrcFiles("src/objects") } files { addSrcFiles("src/peds") } - files { addSrcFiles("src/render") } + files { addSrcFiles("src/renderer") } files { addSrcFiles("src/rw") } files { addSrcFiles("src/save") } files { addSrcFiles("src/skel") } @@ -293,7 +293,7 @@ project "reVC" includedirs { "src/modelinfo" } includedirs { "src/objects" } includedirs { "src/peds" } - includedirs { "src/render" } + includedirs { "src/renderer" } includedirs { "src/rw" } includedirs { "src/save/" } includedirs { "src/skel/" } diff --git a/src/render/2dEffect.h b/src/renderer/2dEffect.h similarity index 100% rename from src/render/2dEffect.h rename to src/renderer/2dEffect.h diff --git a/src/render/Antennas.cpp b/src/renderer/Antennas.cpp similarity index 100% rename from src/render/Antennas.cpp rename to src/renderer/Antennas.cpp diff --git a/src/render/Antennas.h b/src/renderer/Antennas.h similarity index 100% rename from src/render/Antennas.h rename to src/renderer/Antennas.h diff --git a/src/render/Clouds.cpp b/src/renderer/Clouds.cpp similarity index 100% rename from src/render/Clouds.cpp rename to src/renderer/Clouds.cpp diff --git a/src/render/Clouds.h b/src/renderer/Clouds.h similarity index 100% rename from src/render/Clouds.h rename to src/renderer/Clouds.h diff --git a/src/render/Console.cpp b/src/renderer/Console.cpp similarity index 100% rename from src/render/Console.cpp rename to src/renderer/Console.cpp diff --git a/src/render/Console.h b/src/renderer/Console.h similarity index 100% rename from src/render/Console.h rename to src/renderer/Console.h diff --git a/src/render/Coronas.cpp b/src/renderer/Coronas.cpp similarity index 100% rename from src/render/Coronas.cpp rename to src/renderer/Coronas.cpp diff --git a/src/render/Coronas.h b/src/renderer/Coronas.h similarity index 100% rename from src/render/Coronas.h rename to src/renderer/Coronas.h diff --git a/src/render/Credits.cpp b/src/renderer/Credits.cpp similarity index 100% rename from src/render/Credits.cpp rename to src/renderer/Credits.cpp diff --git a/src/render/Credits.h b/src/renderer/Credits.h similarity index 100% rename from src/render/Credits.h rename to src/renderer/Credits.h diff --git a/src/render/CutsceneShadow.cpp b/src/renderer/CutsceneShadow.cpp similarity index 100% rename from src/render/CutsceneShadow.cpp rename to src/renderer/CutsceneShadow.cpp diff --git a/src/render/CutsceneShadow.h b/src/renderer/CutsceneShadow.h similarity index 100% rename from src/render/CutsceneShadow.h rename to src/renderer/CutsceneShadow.h diff --git a/src/render/Draw.cpp b/src/renderer/Draw.cpp similarity index 100% rename from src/render/Draw.cpp rename to src/renderer/Draw.cpp diff --git a/src/render/Draw.h b/src/renderer/Draw.h similarity index 100% rename from src/render/Draw.h rename to src/renderer/Draw.h diff --git a/src/render/Fluff.cpp b/src/renderer/Fluff.cpp similarity index 100% rename from src/render/Fluff.cpp rename to src/renderer/Fluff.cpp diff --git a/src/render/Fluff.h b/src/renderer/Fluff.h similarity index 100% rename from src/render/Fluff.h rename to src/renderer/Fluff.h diff --git a/src/render/Font.cpp b/src/renderer/Font.cpp similarity index 100% rename from src/render/Font.cpp rename to src/renderer/Font.cpp diff --git a/src/render/Font.h b/src/renderer/Font.h similarity index 100% rename from src/render/Font.h rename to src/renderer/Font.h diff --git a/src/render/Glass.cpp b/src/renderer/Glass.cpp similarity index 100% rename from src/render/Glass.cpp rename to src/renderer/Glass.cpp diff --git a/src/render/Glass.h b/src/renderer/Glass.h similarity index 100% rename from src/render/Glass.h rename to src/renderer/Glass.h diff --git a/src/render/Hud.cpp b/src/renderer/Hud.cpp similarity index 100% rename from src/render/Hud.cpp rename to src/renderer/Hud.cpp diff --git a/src/render/Hud.h b/src/renderer/Hud.h similarity index 100% rename from src/render/Hud.h rename to src/renderer/Hud.h diff --git a/src/render/Instance.cpp b/src/renderer/Instance.cpp similarity index 100% rename from src/render/Instance.cpp rename to src/renderer/Instance.cpp diff --git a/src/render/Instance.h b/src/renderer/Instance.h similarity index 100% rename from src/render/Instance.h rename to src/renderer/Instance.h diff --git a/src/render/Lines.cpp b/src/renderer/Lines.cpp similarity index 100% rename from src/render/Lines.cpp rename to src/renderer/Lines.cpp diff --git a/src/render/Lines.h b/src/renderer/Lines.h similarity index 100% rename from src/render/Lines.h rename to src/renderer/Lines.h diff --git a/src/render/MBlur.cpp b/src/renderer/MBlur.cpp similarity index 100% rename from src/render/MBlur.cpp rename to src/renderer/MBlur.cpp diff --git a/src/render/MBlur.h b/src/renderer/MBlur.h similarity index 100% rename from src/render/MBlur.h rename to src/renderer/MBlur.h diff --git a/src/render/Occlusion.cpp b/src/renderer/Occlusion.cpp similarity index 100% rename from src/render/Occlusion.cpp rename to src/renderer/Occlusion.cpp diff --git a/src/render/Occlusion.h b/src/renderer/Occlusion.h similarity index 100% rename from src/render/Occlusion.h rename to src/renderer/Occlusion.h diff --git a/src/render/Particle.cpp b/src/renderer/Particle.cpp similarity index 100% rename from src/render/Particle.cpp rename to src/renderer/Particle.cpp diff --git a/src/render/Particle.h b/src/renderer/Particle.h similarity index 100% rename from src/render/Particle.h rename to src/renderer/Particle.h diff --git a/src/render/ParticleMgr.cpp b/src/renderer/ParticleMgr.cpp similarity index 100% rename from src/render/ParticleMgr.cpp rename to src/renderer/ParticleMgr.cpp diff --git a/src/render/ParticleMgr.h b/src/renderer/ParticleMgr.h similarity index 100% rename from src/render/ParticleMgr.h rename to src/renderer/ParticleMgr.h diff --git a/src/render/ParticleType.h b/src/renderer/ParticleType.h similarity index 100% rename from src/render/ParticleType.h rename to src/renderer/ParticleType.h diff --git a/src/render/PlayerSkin.cpp b/src/renderer/PlayerSkin.cpp similarity index 100% rename from src/render/PlayerSkin.cpp rename to src/renderer/PlayerSkin.cpp diff --git a/src/render/PlayerSkin.h b/src/renderer/PlayerSkin.h similarity index 100% rename from src/render/PlayerSkin.h rename to src/renderer/PlayerSkin.h diff --git a/src/render/PointLights.cpp b/src/renderer/PointLights.cpp similarity index 100% rename from src/render/PointLights.cpp rename to src/renderer/PointLights.cpp diff --git a/src/render/PointLights.h b/src/renderer/PointLights.h similarity index 100% rename from src/render/PointLights.h rename to src/renderer/PointLights.h diff --git a/src/render/RenderBuffer.cpp b/src/renderer/RenderBuffer.cpp similarity index 100% rename from src/render/RenderBuffer.cpp rename to src/renderer/RenderBuffer.cpp diff --git a/src/render/RenderBuffer.h b/src/renderer/RenderBuffer.h similarity index 100% rename from src/render/RenderBuffer.h rename to src/renderer/RenderBuffer.h diff --git a/src/render/Renderer.cpp b/src/renderer/Renderer.cpp similarity index 100% rename from src/render/Renderer.cpp rename to src/renderer/Renderer.cpp diff --git a/src/render/Renderer.h b/src/renderer/Renderer.h similarity index 100% rename from src/render/Renderer.h rename to src/renderer/Renderer.h diff --git a/src/render/Rubbish.cpp b/src/renderer/Rubbish.cpp similarity index 100% rename from src/render/Rubbish.cpp rename to src/renderer/Rubbish.cpp diff --git a/src/render/Rubbish.h b/src/renderer/Rubbish.h similarity index 100% rename from src/render/Rubbish.h rename to src/renderer/Rubbish.h diff --git a/src/render/ShadowCamera.cpp b/src/renderer/ShadowCamera.cpp similarity index 100% rename from src/render/ShadowCamera.cpp rename to src/renderer/ShadowCamera.cpp diff --git a/src/render/ShadowCamera.h b/src/renderer/ShadowCamera.h similarity index 100% rename from src/render/ShadowCamera.h rename to src/renderer/ShadowCamera.h diff --git a/src/render/Shadows.cpp b/src/renderer/Shadows.cpp similarity index 100% rename from src/render/Shadows.cpp rename to src/renderer/Shadows.cpp diff --git a/src/render/Shadows.h b/src/renderer/Shadows.h similarity index 100% rename from src/render/Shadows.h rename to src/renderer/Shadows.h diff --git a/src/render/Skidmarks.cpp b/src/renderer/Skidmarks.cpp similarity index 100% rename from src/render/Skidmarks.cpp rename to src/renderer/Skidmarks.cpp diff --git a/src/render/Skidmarks.h b/src/renderer/Skidmarks.h similarity index 100% rename from src/render/Skidmarks.h rename to src/renderer/Skidmarks.h diff --git a/src/render/SpecialFX.cpp b/src/renderer/SpecialFX.cpp similarity index 100% rename from src/render/SpecialFX.cpp rename to src/renderer/SpecialFX.cpp diff --git a/src/render/SpecialFX.h b/src/renderer/SpecialFX.h similarity index 100% rename from src/render/SpecialFX.h rename to src/renderer/SpecialFX.h diff --git a/src/render/Sprite.cpp b/src/renderer/Sprite.cpp similarity index 100% rename from src/render/Sprite.cpp rename to src/renderer/Sprite.cpp diff --git a/src/render/Sprite.h b/src/renderer/Sprite.h similarity index 100% rename from src/render/Sprite.h rename to src/renderer/Sprite.h diff --git a/src/render/Sprite2d.cpp b/src/renderer/Sprite2d.cpp similarity index 100% rename from src/render/Sprite2d.cpp rename to src/renderer/Sprite2d.cpp diff --git a/src/render/Sprite2d.h b/src/renderer/Sprite2d.h similarity index 100% rename from src/render/Sprite2d.h rename to src/renderer/Sprite2d.h diff --git a/src/render/TexList.cpp b/src/renderer/TexList.cpp similarity index 100% rename from src/render/TexList.cpp rename to src/renderer/TexList.cpp diff --git a/src/render/TexList.h b/src/renderer/TexList.h similarity index 100% rename from src/render/TexList.h rename to src/renderer/TexList.h diff --git a/src/render/Timecycle.cpp b/src/renderer/Timecycle.cpp similarity index 100% rename from src/render/Timecycle.cpp rename to src/renderer/Timecycle.cpp diff --git a/src/render/Timecycle.h b/src/renderer/Timecycle.h similarity index 100% rename from src/render/Timecycle.h rename to src/renderer/Timecycle.h diff --git a/src/render/VarConsole.cpp b/src/renderer/VarConsole.cpp similarity index 100% rename from src/render/VarConsole.cpp rename to src/renderer/VarConsole.cpp diff --git a/src/render/VarConsole.h b/src/renderer/VarConsole.h similarity index 100% rename from src/render/VarConsole.h rename to src/renderer/VarConsole.h diff --git a/src/render/WaterCannon.cpp b/src/renderer/WaterCannon.cpp similarity index 100% rename from src/render/WaterCannon.cpp rename to src/renderer/WaterCannon.cpp diff --git a/src/render/WaterCannon.h b/src/renderer/WaterCannon.h similarity index 100% rename from src/render/WaterCannon.h rename to src/renderer/WaterCannon.h diff --git a/src/render/WaterCreatures.cpp b/src/renderer/WaterCreatures.cpp similarity index 100% rename from src/render/WaterCreatures.cpp rename to src/renderer/WaterCreatures.cpp diff --git a/src/render/WaterCreatures.h b/src/renderer/WaterCreatures.h similarity index 100% rename from src/render/WaterCreatures.h rename to src/renderer/WaterCreatures.h diff --git a/src/render/WaterLevel.cpp b/src/renderer/WaterLevel.cpp similarity index 100% rename from src/render/WaterLevel.cpp rename to src/renderer/WaterLevel.cpp diff --git a/src/render/WaterLevel.h b/src/renderer/WaterLevel.h similarity index 100% rename from src/render/WaterLevel.h rename to src/renderer/WaterLevel.h diff --git a/src/render/Weather.cpp b/src/renderer/Weather.cpp similarity index 100% rename from src/render/Weather.cpp rename to src/renderer/Weather.cpp diff --git a/src/render/Weather.h b/src/renderer/Weather.h similarity index 100% rename from src/render/Weather.h rename to src/renderer/Weather.h diff --git a/src/render/WindModifiers.cpp b/src/renderer/WindModifiers.cpp similarity index 100% rename from src/render/WindModifiers.cpp rename to src/renderer/WindModifiers.cpp diff --git a/src/render/WindModifiers.h b/src/renderer/WindModifiers.h similarity index 100% rename from src/render/WindModifiers.h rename to src/renderer/WindModifiers.h From 76558e9313c481c39f40b2c73c4a3f68bf560d4e Mon Sep 17 00:00:00 2001 From: withmorten Date: Mon, 19 Jul 2021 23:39:56 +0200 Subject: [PATCH 2/8] fix garbage data written in garage save block --- src/control/Garages.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index d7394902..34ed11eb 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -2259,6 +2259,9 @@ void CGarages::Save(uint8 * buf, uint32 * size) //INITSAVEBUF *size = 7876; // for some reason it's not actual size again //*size = (6 * sizeof(uint32) + TOTAL_COLLECTCARS_GARAGES * sizeof(*CarTypesCollected) + sizeof(uint32) + TOTAL_HIDEOUT_GARAGES * NUM_GARAGE_STORED_CARS * sizeof(CStoredCar) + NUM_GARAGES * sizeof(CGarage)); +#if !defined THIS_IS_STUPID && defined COMPATIBLE_SAVES + memset(buf + 7340, 0, *size - 7340); // garbage data is written otherwise +#endif CloseHideOutGaragesBeforeSave(); WriteSaveBuf(buf, NumGarages); WriteSaveBuf(buf, (uint32)BombsAreFree); From a1444b992f47ef058d0f270716d9b00791e80862 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 22 Jul 2021 07:01:04 +0300 Subject: [PATCH 3/8] Fix Predator shooting sound --- src/audio/AudioLogic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 5ee5ddd1..6c53eb10 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -2955,7 +2955,7 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams& params) CPed *pPed = params.m_pVehicle->pDriver; if(!pPed) break; - if(!pPed->HasWeaponSlot(WEAPONSLOT_SUBMACHINEGUN)) { + if(!pPed->HasWeaponSlot(WEAPONSLOT_SUBMACHINEGUN) || (params.m_pVehicle->GetModelIndex() == MI_PREDATOR && !pPed->IsPedDoingDriveByShooting())) { sampleIndex = SFX_UZI_LEFT; frequency = SampleManager.GetSampleBaseFrequency(sampleIndex); frequency += RandomDisplacement(frequency / 32); From bbbe9b2632018ded5f455dfb12c3775907c70fc1 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 22 Jul 2021 07:06:54 +0300 Subject: [PATCH 4/8] Fix enum use --- src/weapons/Weapon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index 36303c2c..d4cb1cbe 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -3182,7 +3182,7 @@ bool CPed::IsPedDoingDriveByShooting(void) { #ifdef FIX_BUGS - if (FindPlayerPed() == this && CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType)->m_nWeaponSlot == 5) { + if (FindPlayerPed() == this && CWeaponInfo::GetWeaponInfo(GetWeapon()->m_eWeaponType)->m_nWeaponSlot == WEAPONSLOT_SUBMACHINEGUN) { #else if (FindPlayerPed() == this && GetWeapon()->m_eWeaponType == WEAPONTYPE_UZI) { #endif From 953e4fc4ff96e9e2c180f74b36e3b591c979b1e2 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 22 Jul 2021 20:07:51 +0300 Subject: [PATCH 5/8] Fix falling damage --- src/peds/Ped.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index cad10d8a..b52d054c 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -3009,7 +3009,7 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints) lowerSpeedLimit *= 1.5f; } CAnimBlendAssociation *fallAnim = RpAnimBlendClumpGetAssociation(GetClump(), ANIM_STD_FALL); - if (!bWasStanding && speed > upperSpeedLimit && (!bPushedAlongByCar || m_vecMoveSpeed.z < lowerSpeedLimit) + if (!bWasStanding && ((speed > upperSpeedLimit && !bPushedAlongByCar) || (m_vecMoveSpeed.z < lowerSpeedLimit)) && m_pCollidingEntity != collidingEnt) { float damage = 100.0f * Max(speed - 0.25f, 0.0f); From 5e34b1efcf4443124beece5ec97082da776df074 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 22 Jul 2021 07:26:19 +0300 Subject: [PATCH 6/8] Possible fix of RemoveAndAdd crash --- src/peds/Ped.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index b52d054c..002cbe3b 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -2362,12 +2362,12 @@ CPed::ProcessControl(void) } else { obstacleForFlyingOtherDirZ = 501.0f; } - uint8 flyDir = 0; + int16 flyDir = 0; float feetZ = GetPosition().z - FEET_OFFSET; #ifdef FIX_BUGS - if (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f) + if (obstacleForFlyingZ > feetZ && obstacleForFlyingZ < 500.0f) flyDir = 1; - else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingZ < 500.0f) + else if (obstacleForFlyingOtherDirZ > feetZ && obstacleForFlyingOtherDirZ < 501.0f) flyDir = 2; #else if ((obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ < 500.0f) || (obstacleForFlyingZ > feetZ && obstacleForFlyingOtherDirZ > feetZ)) @@ -2376,8 +2376,8 @@ CPed::ProcessControl(void) flyDir = 2; #endif - if (flyDir != 0 && !bHeadStuckInCollision) { - SetPosition((flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point)); + if (flyDir > 0 && !bHeadStuckInCollision) { + GetMatrix().SetTranslateOnly(flyDir == 2 ? obstacleForFlyingOtherDir.point : obstacleForFlying.point); GetMatrix().GetPosition().z += FEET_OFFSET; GetMatrix().UpdateRW(); SetLanding(); From aec797671e7ae079556d7629dafa159b1431364d Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 22 Jul 2021 22:15:27 +0300 Subject: [PATCH 7/8] Fix aiming with minigun and flamethrower with PC controls --- src/control/Script5.cpp | 2 +- src/peds/PedFight.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/control/Script5.cpp b/src/control/Script5.cpp index 25b29256..f65724c2 100644 --- a/src/control/Script5.cpp +++ b/src/control/Script5.cpp @@ -1913,7 +1913,7 @@ bool CRunningScript::CheckDamagedWeaponType(int32 actual, int32 type) if (type == WEAPONTYPE_ANYMELEE) { if (actual <= WEAPONTYPE_CHAINSAW) return true; - if (actual - WEAPONTYPE_GRENADE <= WEAPONTYPE_MINIGUN) + if (actual >= WEAPONTYPE_GRENADE && actual <= WEAPONTYPE_UNIDENTIFIED) return false; return false; } diff --git a/src/peds/PedFight.cpp b/src/peds/PedFight.cpp index 8e377c81..20df6553 100644 --- a/src/peds/PedFight.cpp +++ b/src/peds/PedFight.cpp @@ -352,6 +352,14 @@ CPed::SetAttack(CEntity *victim) SetAimFlag(m_fRotationCur); } } +#ifdef FIX_BUGS + // fix aiming for flamethrower and minigun while using PC controls + else if (curWeapon->m_AnimToPlay == ASSOCGRP_FLAMETHROWER && TheCamera.Cams[0].Using3rdPersonMouseCam() && this == FindPlayerPed()) + { + SetAimFlag(m_fRotationCur); + ((CPlayerPed*)this)->m_fFPSMoveHeading = TheCamera.Find3rdPersonQuickAimPitch(); + } +#endif if (m_nPedState == PED_ATTACK) { bIsAttacking = true; return; From bf757fc96014c07d288786da00e09d426190f9e4 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 24 Jul 2021 00:59:19 +0300 Subject: [PATCH 8/8] Fix CPlayerInfo distance types --- src/core/PlayerInfo.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/PlayerInfo.h b/src/core/PlayerInfo.h index a24185f0..fc12267d 100644 --- a/src/core/PlayerInfo.h +++ b/src/core/PlayerInfo.h @@ -54,7 +54,7 @@ public: int32 m_nUpsideDownCounter; int32 field_EC; int32 m_nTimeCarSpentOnTwoWheels; - int32 m_nDistanceCarTravelledOnTwoWheels; + float m_nDistanceCarTravelledOnTwoWheels; int32 m_nTimeNotFullyOnGround; int32 m_nTimeSpentOnWheelie; float m_nDistanceTravelledOnWheelie; @@ -62,11 +62,11 @@ public: float m_nDistanceTravelledOnStoppie; int32 m_nCancelWheelStuntTimer; int32 m_nLastTimeCarSpentOnTwoWheels; - int32 m_nLastDistanceCarTravelledOnTwoWheels; + float m_nLastDistanceCarTravelledOnTwoWheels; int32 m_nLastTimeSpentOnWheelie; - int32 m_nLastDistanceTravelledOnWheelie; + float m_nLastDistanceTravelledOnWheelie; int32 m_nLastTimeSpentOnStoppie; - int32 m_nLastDistanceTravelledOnStoppie; + float m_nLastDistanceTravelledOnStoppie; int16 m_nTrafficMultiplier; int16 field_12A; float m_fRoadDensity;