From b42d9e3e7c1caf6ad06ad81eb34cc27e09bd9bb9 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 26 Sep 2020 13:30:22 +0300 Subject: silentpatch fixes --- src/core/Camera.cpp | 8 ++++---- src/core/CdStream.cpp | 4 +++- src/core/Radar.cpp | 12 ++++++++++++ 3 files changed, 19 insertions(+), 5 deletions(-) (limited to 'src/core') diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index abe0833e..8f6fb3eb 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -74,7 +74,7 @@ bool bDidWeProcessAnyCinemaCam; CCamera::CCamera(void) { -#ifdef GTA3_1_1_PATCH +#if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS) m_fMouseAccelHorzntl = 0.0025f; m_fMouseAccelVertical = 0.003f; #endif @@ -88,7 +88,7 @@ CCamera::CCamera(float) void CCamera::Init(void) { -#ifdef GTA3_1_1_PATCH +#if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS) float fMouseAccelHorzntl = m_fMouseAccelHorzntl; float fMouseAccelVertical = m_fMouseAccelVertical; #endif @@ -104,7 +104,7 @@ CCamera::Init(void) memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh? #endif - #ifdef GTA3_1_1_PATCH + #if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS) m_fMouseAccelHorzntl = fMouseAccelHorzntl; m_fMouseAccelVertical = fMouseAccelVertical; #endif @@ -237,7 +237,7 @@ CCamera::Init(void) m_uiTransitionState = 0; m_uiTimeTransitionStart = 0; m_bLookingAtPlayer = true; -#ifndef GTA3_1_1_PATCH +#if !defined(GTA3_1_1_PATCH) && !defined(FIX_BUGS) m_fMouseAccelHorzntl = 0.0025f; m_fMouseAccelVertical = 0.003f; #endif diff --git a/src/core/CdStream.cpp b/src/core/CdStream.cpp index d9978040..c11fb72a 100644 --- a/src/core/CdStream.cpp +++ b/src/core/CdStream.cpp @@ -106,12 +106,14 @@ CdStreamInit(int32 numChannels) GetDiskFreeSpace(nil, &SectorsPerCluster, &BytesPerSector, &NumberOfFreeClusters, &TotalNumberOfClusters); _gdwCdStreamFlags = 0; - + +#ifndef FIX_BUGS // this just slows down streaming if ( BytesPerSector <= CDSTREAM_SECTOR_SIZE ) { _gdwCdStreamFlags |= FILE_FLAG_NO_BUFFERING; debug("Using no buffered loading for streaming\n"); } +#endif _gbCdStreamOverlapped = TRUE; diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 05002a3f..af28aae7 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -1100,6 +1100,10 @@ int CRadar::SetCoordBlip(eBlipType type, CVector pos, int32 color, eBlipDisplay if (!ms_RadarTrace[nextBlip].m_bInUse) break; } +#ifdef FIX_BUGS + if (nextBlip == NUMRADARBLIPS) + return -1; +#endif ms_RadarTrace[nextBlip].m_eBlipType = type; ms_RadarTrace[nextBlip].m_nColor = color; ms_RadarTrace[nextBlip].m_bDim = 1; @@ -1121,6 +1125,10 @@ int CRadar::SetEntityBlip(eBlipType type, int32 handle, int32 color, eBlipDispla if (!ms_RadarTrace[nextBlip].m_bInUse) break; } +#ifdef FIX_BUGS + if (nextBlip == NUMRADARBLIPS) + return -1; +#endif ms_RadarTrace[nextBlip].m_eBlipType = type; ms_RadarTrace[nextBlip].m_nColor = color; ms_RadarTrace[nextBlip].m_bDim = 1; @@ -1452,6 +1460,10 @@ CRadar::ToggleTargetMarker(float x, float y) if (!ms_RadarTrace[nextBlip].m_bInUse) break; } +#ifdef FIX_BUGS + if (nextBlip == NUMRADARBLIPS) + return; +#endif ms_RadarTrace[nextBlip].m_eBlipType = BLIP_COORD; ms_RadarTrace[nextBlip].m_nColor = 0x333333FF; ms_RadarTrace[nextBlip].m_bDim = 1; -- cgit v1.2.3 From 2eb2e9ac12e66d3520d88547037217b53997b1fb Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 26 Sep 2020 14:12:42 +0300 Subject: fixed tab --- src/core/Camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 8f6fb3eb..13d03213 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -104,7 +104,7 @@ CCamera::Init(void) memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh? #endif - #if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS) + #if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS) m_fMouseAccelHorzntl = fMouseAccelHorzntl; m_fMouseAccelVertical = fMouseAccelVertical; #endif -- cgit v1.2.3