mirror of
https://github.com/GTAmodding/re3.git
synced 2024-12-26 06:25:41 +00:00
1.1 patch stuff
This commit is contained in:
parent
bcc3a8b6c7
commit
9e65eb34ec
13 changed files with 109 additions and 2 deletions
|
@ -2545,11 +2545,13 @@ CCam::Process_M16_1stPerson(const CVector &CameraTarget, float, float, float)
|
||||||
ResetStatics = false;
|
ResetStatics = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef GTA3_1_1_PATCH
|
||||||
((CPed*)CamTargetEntity)->m_pedIK.GetComponentPosition(&HeadPos, PED_HEAD);
|
((CPed*)CamTargetEntity)->m_pedIK.GetComponentPosition(&HeadPos, PED_HEAD);
|
||||||
Source = HeadPos;
|
Source = HeadPos;
|
||||||
Source.z += 0.1f;
|
Source.z += 0.1f;
|
||||||
Source.x -= 0.19f*Cos(m_fInitialPlayerOrientation);
|
Source.x -= 0.19f*Cos(m_fInitialPlayerOrientation);
|
||||||
Source.y -= 0.19f*Sin(m_fInitialPlayerOrientation);
|
Source.y -= 0.19f*Sin(m_fInitialPlayerOrientation);
|
||||||
|
#endif
|
||||||
|
|
||||||
// Look around
|
// Look around
|
||||||
bool UseMouse = false;
|
bool UseMouse = false;
|
||||||
|
@ -2578,6 +2580,17 @@ CCam::Process_M16_1stPerson(const CVector &CameraTarget, float, float, float)
|
||||||
if(Alpha > DEGTORAD(60.0f)) Alpha = DEGTORAD(60.0f);
|
if(Alpha > DEGTORAD(60.0f)) Alpha = DEGTORAD(60.0f);
|
||||||
if(Alpha < -DEGTORAD(89.5f)) Alpha = -DEGTORAD(89.5f);
|
if(Alpha < -DEGTORAD(89.5f)) Alpha = -DEGTORAD(89.5f);
|
||||||
|
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
HeadPos.x = 0.0f;
|
||||||
|
HeadPos.y = 0.0f;
|
||||||
|
HeadPos.z = 0.0f;
|
||||||
|
((CPed*)CamTargetEntity)->m_pedIK.GetComponentPosition(&HeadPos, PED_HEAD);
|
||||||
|
Source = HeadPos;
|
||||||
|
Source.z += 0.1f;
|
||||||
|
Source.x -= 0.19f * Cos(m_fInitialPlayerOrientation);
|
||||||
|
Source.y -= 0.19f * Sin(m_fInitialPlayerOrientation);
|
||||||
|
#endif
|
||||||
|
|
||||||
TargetCoors.x = 3.0f * Cos(Alpha) * Cos(Beta) + Source.x;
|
TargetCoors.x = 3.0f * Cos(Alpha) * Cos(Beta) + Source.x;
|
||||||
TargetCoors.y = 3.0f * Cos(Alpha) * Sin(Beta) + Source.y;
|
TargetCoors.y = 3.0f * Cos(Alpha) * Sin(Beta) + Source.y;
|
||||||
TargetCoors.z = 3.0f * Sin(Alpha) + Source.z;
|
TargetCoors.z = 3.0f * Sin(Alpha) + Source.z;
|
||||||
|
|
|
@ -71,11 +71,27 @@ bool bDidWeProcessAnyCinemaCam;
|
||||||
#define CTRLDOWN(key) ((KEYDOWN(rsLCTRL) || KEYDOWN(rsRCTRL)) && KEYDOWN((RsKeyCodes)key))
|
#define CTRLDOWN(key) ((KEYDOWN(rsLCTRL) || KEYDOWN(rsRCTRL)) && KEYDOWN((RsKeyCodes)key))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
CCamera::CCamera(void)
|
||||||
|
{
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
m_fMouseAccelHorzntl = 0.0025f;
|
||||||
|
m_fMouseAccelVertical = 0.003f;
|
||||||
|
#endif
|
||||||
|
Init();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CCamera::Init(void)
|
CCamera::Init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
float fMouseAccelHorzntl = m_fMouseAccelHorzntl;
|
||||||
|
float fMouseAccelVertical = m_fMouseAccelVertical;
|
||||||
|
#endif
|
||||||
memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh?
|
memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh?
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
m_fMouseAccelHorzntl = fMouseAccelHorzntl;
|
||||||
|
m_fMouseAccelVertical = fMouseAccelVertical;
|
||||||
|
#endif
|
||||||
m_pRwCamera = nil;
|
m_pRwCamera = nil;
|
||||||
m_1rstPersonRunCloseToAWall = false;
|
m_1rstPersonRunCloseToAWall = false;
|
||||||
m_fPositionAlongSpline = 0.0f;
|
m_fPositionAlongSpline = 0.0f;
|
||||||
|
@ -191,8 +207,10 @@ 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
|
||||||
m_fMouseAccelHorzntl = 0.0025f;
|
m_fMouseAccelHorzntl = 0.0025f;
|
||||||
m_fMouseAccelVertical = 0.003f;
|
m_fMouseAccelVertical = 0.003f;
|
||||||
|
#endif
|
||||||
m_f3rdPersonCHairMultX = 0.53f;
|
m_f3rdPersonCHairMultX = 0.53f;
|
||||||
m_f3rdPersonCHairMultY = 0.4f;
|
m_f3rdPersonCHairMultY = 0.4f;
|
||||||
}
|
}
|
||||||
|
|
|
@ -546,6 +546,7 @@ uint32 unknown; // some counter having to do with music
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// High level and misc
|
// High level and misc
|
||||||
|
CCamera(void);
|
||||||
void Init(void);
|
void Init(void);
|
||||||
void Process(void);
|
void Process(void);
|
||||||
void CamControl(void);
|
void CamControl(void);
|
||||||
|
|
|
@ -2954,8 +2954,10 @@ CMenuManager::LoadAllTextures()
|
||||||
CTxdStore::LoadTxd(frontendTxdSlot, "MODELS/FRONTEND.TXD");
|
CTxdStore::LoadTxd(frontendTxdSlot, "MODELS/FRONTEND.TXD");
|
||||||
CTxdStore::AddRef(frontendTxdSlot);
|
CTxdStore::AddRef(frontendTxdSlot);
|
||||||
CTxdStore::SetCurrentTxd(frontendTxdSlot);
|
CTxdStore::SetCurrentTxd(frontendTxdSlot);
|
||||||
|
#ifndef GTA3_1_1_PATCH
|
||||||
CStreaming::IHaveUsedStreamingMemory();
|
CStreaming::IHaveUsedStreamingMemory();
|
||||||
CTimer::Update();
|
CTimer::Update();
|
||||||
|
#endif
|
||||||
|
|
||||||
for (int i = 0; i < ARRAY_SIZE(FrontendFilenames); i++) {
|
for (int i = 0; i < ARRAY_SIZE(FrontendFilenames); i++) {
|
||||||
m_aFrontEndSprites[i].SetTexture(FrontendFilenames[i][0], FrontendFilenames[i][1]);
|
m_aFrontEndSprites[i].SetTexture(FrontendFilenames[i][0], FrontendFilenames[i][1]);
|
||||||
|
@ -2981,6 +2983,10 @@ CMenuManager::LoadAllTextures()
|
||||||
m_aMapSprites[i].SetTexture(MapFilenames[i][0], MapFilenames[i][1]);
|
m_aMapSprites[i].SetTexture(MapFilenames[i][0], MapFilenames[i][1]);
|
||||||
m_aMapSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
|
m_aMapSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
CStreaming::IHaveUsedStreamingMemory();
|
||||||
|
CTimer::Update();
|
||||||
#endif
|
#endif
|
||||||
m_bSpritesLoaded = true;
|
m_bSpritesLoaded = true;
|
||||||
CTxdStore::PopCurrentTxd();
|
CTxdStore::PopCurrentTxd();
|
||||||
|
@ -2993,7 +2999,11 @@ CMenuManager::LoadSettings()
|
||||||
int fileHandle = CFileMgr::OpenFile("gta3.set", "r");
|
int fileHandle = CFileMgr::OpenFile("gta3.set", "r");
|
||||||
|
|
||||||
int32 prevLang = m_PrefsLanguage;
|
int32 prevLang = m_PrefsLanguage;
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
CMBlur::BlurOn = (_dwOperatingSystemVersion != OS_WIN98);
|
||||||
|
#else
|
||||||
CMBlur::BlurOn = true;
|
CMBlur::BlurOn = true;
|
||||||
|
#endif
|
||||||
MousePointerStateHelper.bInvertVertically = true;
|
MousePointerStateHelper.bInvertVertically = true;
|
||||||
|
|
||||||
// 50 is silly
|
// 50 is silly
|
||||||
|
@ -4456,7 +4466,18 @@ CMenuManager::ProcessButtonPresses(void)
|
||||||
m_PrefsUseWideScreen = false;
|
m_PrefsUseWideScreen = false;
|
||||||
m_PrefsShowSubtitles = true;
|
m_PrefsShowSubtitles = true;
|
||||||
m_nDisplayVideoMode = m_nPrefsVideoMode;
|
m_nDisplayVideoMode = m_nPrefsVideoMode;
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
if (_dwOperatingSystemVersion == OS_WIN98) {
|
||||||
|
CMBlur::BlurOn = false;
|
||||||
|
CMBlur::MotionBlurClose();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
CMBlur::BlurOn = true;
|
||||||
|
CMBlur::MotionBlurOpen(Scene.camera);
|
||||||
|
}
|
||||||
|
#else
|
||||||
CMBlur::BlurOn = true;
|
CMBlur::BlurOn = true;
|
||||||
|
#endif
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
} else if ((m_nCurrScreen != MENUPAGE_SKIN_SELECT_OLD) && (m_nCurrScreen == MENUPAGE_CONTROLLER_PC)) {
|
} else if ((m_nCurrScreen != MENUPAGE_SKIN_SELECT_OLD) && (m_nCurrScreen == MENUPAGE_CONTROLLER_PC)) {
|
||||||
ControlsManager.MakeControllerActionsBlank();
|
ControlsManager.MakeControllerActionsBlank();
|
||||||
|
@ -4986,7 +5007,7 @@ CMenuManager::WaitForUserCD()
|
||||||
CSprite2d *splash;
|
CSprite2d *splash;
|
||||||
char *splashscreen = nil;
|
char *splashscreen = nil;
|
||||||
|
|
||||||
#ifndef RANDOMSPLASH
|
#if (!(defined RANDOMSPLASH) && !(defined GTA3_1_1_PATCH))
|
||||||
if (CGame::frenchGame || CGame::germanGame || !CGame::nastyGame)
|
if (CGame::frenchGame || CGame::germanGame || !CGame::nastyGame)
|
||||||
splashscreen = "mainsc2";
|
splashscreen = "mainsc2";
|
||||||
else
|
else
|
||||||
|
|
|
@ -644,3 +644,4 @@ public:
|
||||||
static_assert(sizeof(CMenuManager) == 0x564, "CMenuManager: error");
|
static_assert(sizeof(CMenuManager) == 0x564, "CMenuManager: error");
|
||||||
|
|
||||||
extern CMenuManager FrontEndMenuManager;
|
extern CMenuManager FrontEndMenuManager;
|
||||||
|
extern DWORD _dwOperatingSystemVersion;
|
|
@ -814,7 +814,11 @@ CPhysical::ApplyCollisionAlt(CEntity *B, CColPoint &colpoint, float &impulse, CV
|
||||||
normalSpeed = DotProduct(speed, colpoint.normal);
|
normalSpeed = DotProduct(speed, colpoint.normal);
|
||||||
if(normalSpeed < 0.0f){
|
if(normalSpeed < 0.0f){
|
||||||
float minspeed = 0.0104f * CTimer::GetTimeStep();
|
float minspeed = 0.0104f * CTimer::GetTimeStep();
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
if ((IsObject() || IsVehicle() && (GetUp().z < -0.3f || ((CVehicle*)this)->IsBike() && (m_status == STATUS_ABANDONED || m_status == STATUS_WRECKED))) &&
|
||||||
|
#else
|
||||||
if((IsObject() || IsVehicle() && GetUp().z < -0.3f) &&
|
if((IsObject() || IsVehicle() && GetUp().z < -0.3f) &&
|
||||||
|
#endif
|
||||||
!bHasContacted &&
|
!bHasContacted &&
|
||||||
Abs(m_vecMoveSpeed.x) < minspeed &&
|
Abs(m_vecMoveSpeed.x) < minspeed &&
|
||||||
Abs(m_vecMoveSpeed.y) < minspeed &&
|
Abs(m_vecMoveSpeed.y) < minspeed &&
|
||||||
|
|
|
@ -960,7 +960,9 @@ CVehicleModelInfo::DeleteVehicleColourTextures(void)
|
||||||
for(i = 0; i < 256; i++){
|
for(i = 0; i < 256; i++){
|
||||||
if(ms_colourTextureTable[i]){
|
if(ms_colourTextureTable[i]){
|
||||||
RwTextureDestroy(ms_colourTextureTable[i]);
|
RwTextureDestroy(ms_colourTextureTable[i]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
ms_colourTextureTable[i] = nil;
|
ms_colourTextureTable[i] = nil;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -668,11 +668,13 @@ CCopPed::ProcessControl(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bDuckAndCover) {
|
if (bDuckAndCover) {
|
||||||
|
#ifndef GTA3_1_1_PATCH
|
||||||
if (!bNotAllowedToDuck && Seek()) {
|
if (!bNotAllowedToDuck && Seek()) {
|
||||||
SetMoveState(PEDMOVE_STILL);
|
SetMoveState(PEDMOVE_STILL);
|
||||||
SetMoveAnim();
|
SetMoveAnim();
|
||||||
SetPointGunAt(m_pedInObjective);
|
SetPointGunAt(m_pedInObjective);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else if (Seek()) {
|
} else if (Seek()) {
|
||||||
CVehicle *playerVeh = FindPlayerVehicle();
|
CVehicle *playerVeh = FindPlayerVehicle();
|
||||||
if (!playerVeh && player && player->EnteringCar()) {
|
if (!playerVeh && player && player->EnteringCar()) {
|
||||||
|
|
|
@ -76,8 +76,14 @@ public:
|
||||||
if(type == EFFECT_LIGHT){
|
if(type == EFFECT_LIGHT){
|
||||||
if(light.corona)
|
if(light.corona)
|
||||||
RwTextureDestroy(light.corona);
|
RwTextureDestroy(light.corona);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
light.corona = nil;
|
||||||
|
#endif
|
||||||
if(light.shadow)
|
if(light.shadow)
|
||||||
RwTextureDestroy(light.shadow);
|
RwTextureDestroy(light.shadow);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
light.shadow = nil;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -44,10 +44,25 @@ void
|
||||||
CClouds::Shutdown(void)
|
CClouds::Shutdown(void)
|
||||||
{
|
{
|
||||||
RwTextureDestroy(gpCloudTex[0]);
|
RwTextureDestroy(gpCloudTex[0]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpCloudTex[0] = nil;
|
||||||
|
#endif
|
||||||
RwTextureDestroy(gpCloudTex[1]);
|
RwTextureDestroy(gpCloudTex[1]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpCloudTex[1] = nil;
|
||||||
|
#endif
|
||||||
RwTextureDestroy(gpCloudTex[2]);
|
RwTextureDestroy(gpCloudTex[2]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpCloudTex[2] = nil;
|
||||||
|
#endif
|
||||||
RwTextureDestroy(gpCloudTex[3]);
|
RwTextureDestroy(gpCloudTex[3]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpCloudTex[3] = nil;
|
||||||
|
#endif
|
||||||
RwTextureDestroy(gpCloudTex[4]);
|
RwTextureDestroy(gpCloudTex[4]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpCloudTex[4] = nil;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -414,7 +414,19 @@ void
|
||||||
CRubbish::Shutdown(void)
|
CRubbish::Shutdown(void)
|
||||||
{
|
{
|
||||||
RwTextureDestroy(gpRubbishTexture[0]);
|
RwTextureDestroy(gpRubbishTexture[0]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpRubbishTexture[0] = nil;
|
||||||
|
#endif
|
||||||
RwTextureDestroy(gpRubbishTexture[1]);
|
RwTextureDestroy(gpRubbishTexture[1]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpRubbishTexture[1] = nil;
|
||||||
|
#endif
|
||||||
RwTextureDestroy(gpRubbishTexture[2]);
|
RwTextureDestroy(gpRubbishTexture[2]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpRubbishTexture[2] = nil;
|
||||||
|
#endif
|
||||||
RwTextureDestroy(gpRubbishTexture[3]);
|
RwTextureDestroy(gpRubbishTexture[3]);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpRubbishTexture[3] = nil;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,17 @@ void
|
||||||
CSkidmarks::Shutdown(void)
|
CSkidmarks::Shutdown(void)
|
||||||
{
|
{
|
||||||
RwTextureDestroy(gpSkidTex);
|
RwTextureDestroy(gpSkidTex);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpSkidTex = nil;
|
||||||
|
#endif
|
||||||
RwTextureDestroy(gpSkidBloodTex);
|
RwTextureDestroy(gpSkidBloodTex);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpSkidBloodTex = nil;
|
||||||
|
#endif
|
||||||
RwTextureDestroy(gpSkidMudTex);
|
RwTextureDestroy(gpSkidMudTex);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpSkidMudTex = nil;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -46,6 +46,9 @@ void
|
||||||
CWeaponEffects::Shutdown(void)
|
CWeaponEffects::Shutdown(void)
|
||||||
{
|
{
|
||||||
RwTextureDestroy(gpCrossHairTex);
|
RwTextureDestroy(gpCrossHairTex);
|
||||||
|
#ifdef GTA3_1_1_PATCH
|
||||||
|
gpCrossHairTex = nil;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue