silentpatch fixes

This commit is contained in:
Nikolay Korolev 2020-09-26 13:30:22 +03:00
parent eefb0c817f
commit b42d9e3e7c
8 changed files with 47 additions and 7 deletions

View File

@ -1886,7 +1886,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;

View File

@ -74,7 +74,7 @@ bool bDidWeProcessAnyCinemaCam;
CCamera::CCamera(void) CCamera::CCamera(void)
{ {
#ifdef GTA3_1_1_PATCH #if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS)
m_fMouseAccelHorzntl = 0.0025f; m_fMouseAccelHorzntl = 0.0025f;
m_fMouseAccelVertical = 0.003f; m_fMouseAccelVertical = 0.003f;
#endif #endif
@ -88,7 +88,7 @@ CCamera::CCamera(float)
void void
CCamera::Init(void) CCamera::Init(void)
{ {
#ifdef GTA3_1_1_PATCH #if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS)
float fMouseAccelHorzntl = m_fMouseAccelHorzntl; float fMouseAccelHorzntl = m_fMouseAccelHorzntl;
float fMouseAccelVertical = m_fMouseAccelVertical; float fMouseAccelVertical = m_fMouseAccelVertical;
#endif #endif
@ -104,7 +104,7 @@ CCamera::Init(void)
memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh? memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh?
#endif #endif
#ifdef GTA3_1_1_PATCH #if defined(GTA3_1_1_PATCH) || defined(FIX_BUGS)
m_fMouseAccelHorzntl = fMouseAccelHorzntl; m_fMouseAccelHorzntl = fMouseAccelHorzntl;
m_fMouseAccelVertical = fMouseAccelVertical; m_fMouseAccelVertical = fMouseAccelVertical;
#endif #endif
@ -237,7 +237,7 @@ CCamera::Init(void)
m_uiTransitionState = 0; m_uiTransitionState = 0;
m_uiTimeTransitionStart = 0; m_uiTimeTransitionStart = 0;
m_bLookingAtPlayer = true; m_bLookingAtPlayer = true;
#ifndef GTA3_1_1_PATCH #if !defined(GTA3_1_1_PATCH) && !defined(FIX_BUGS)
m_fMouseAccelHorzntl = 0.0025f; m_fMouseAccelHorzntl = 0.0025f;
m_fMouseAccelVertical = 0.003f; m_fMouseAccelVertical = 0.003f;
#endif #endif

View File

@ -106,12 +106,14 @@ CdStreamInit(int32 numChannels)
GetDiskFreeSpace(nil, &SectorsPerCluster, &BytesPerSector, &NumberOfFreeClusters, &TotalNumberOfClusters); GetDiskFreeSpace(nil, &SectorsPerCluster, &BytesPerSector, &NumberOfFreeClusters, &TotalNumberOfClusters);
_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;

View File

@ -1100,6 +1100,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 = 1; 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) 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 = 1; ms_RadarTrace[nextBlip].m_bDim = 1;
@ -1452,6 +1460,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;

View File

@ -1095,8 +1095,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:
@ -1109,7 +1112,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:
@ -1122,7 +1129,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:
@ -1135,7 +1146,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:

View File

@ -42,8 +42,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);
} }

View File

@ -1608,6 +1608,9 @@ CWeapon::FireM16_1stPerson(CEntity *shooter)
if ( shooter == FindPlayerPed() ) if ( shooter == FindPlayerPed() )
{ {
#ifdef FIX_BUGS
CStats::InstantHitsFiredByPlayer++;
#endif
CPad::GetPad(0)->StartShake_Distance(240, 128, FindPlayerPed()->GetPosition().x, FindPlayerPed()->GetPosition().y, FindPlayerPed()->GetPosition().z); CPad::GetPad(0)->StartShake_Distance(240, 128, FindPlayerPed()->GetPosition().x, FindPlayerPed()->GetPosition().y, FindPlayerPed()->GetPosition().z);
if ( m_eWeaponType == WEAPONTYPE_M16 ) if ( m_eWeaponType == WEAPONTYPE_M16 )

2
vendor/opusfile vendored

@ -1 +1 @@
Subproject commit 6452e838e68e8f4fc0b3599523c760ac6276ce89 Subproject commit f94a1764b0dcdd84ee8c13c040de9f4c1a67e4df