mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 02:54:14 +01:00
Make cars and peds to not despawn when you look away
This commit is contained in:
parent
6a94299eac
commit
f73dfa12e6
@ -731,6 +731,7 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
|
|||||||
}
|
}
|
||||||
float distanceToPlayer = (pVehicle->GetPosition() - vecPlayerPos).Magnitude2D();
|
float distanceToPlayer = (pVehicle->GetPosition() - vecPlayerPos).Magnitude2D();
|
||||||
float threshold = 50.0f;
|
float threshold = 50.0f;
|
||||||
|
#ifndef EXTENDED_OFFSCREEN_DESPAWN_RANGE
|
||||||
if (pVehicle->GetIsOnScreen() ||
|
if (pVehicle->GetIsOnScreen() ||
|
||||||
TheCamera.Cams[TheCamera.ActiveCam].LookingLeft ||
|
TheCamera.Cams[TheCamera.ActiveCam].LookingLeft ||
|
||||||
TheCamera.Cams[TheCamera.ActiveCam].LookingRight ||
|
TheCamera.Cams[TheCamera.ActiveCam].LookingRight ||
|
||||||
@ -741,7 +742,9 @@ CCarCtrl::PossiblyRemoveVehicle(CVehicle* pVehicle)
|
|||||||
pVehicle->GetModelIndex() == MI_FIRETRUCK ||
|
pVehicle->GetModelIndex() == MI_FIRETRUCK ||
|
||||||
pVehicle->bIsLawEnforcer ||
|
pVehicle->bIsLawEnforcer ||
|
||||||
pVehicle->bIsCarParkVehicle
|
pVehicle->bIsCarParkVehicle
|
||||||
){
|
)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
threshold = 130.0f * TheCamera.GenerationDistMultiplier;
|
threshold = 130.0f * TheCamera.GenerationDistMultiplier;
|
||||||
}
|
}
|
||||||
if (pVehicle->bExtendedRange)
|
if (pVehicle->bExtendedRange)
|
||||||
|
@ -265,6 +265,9 @@ enum Config {
|
|||||||
|
|
||||||
#define NO_MOVIES // add option to disable intro videos
|
#define NO_MOVIES // add option to disable intro videos
|
||||||
|
|
||||||
|
#define EXTENDED_OFFSCREEN_DESPAWN_RANGE // Use onscreen despawn range for offscreen peds and vehicles to avoid them despawning in the distance when you look
|
||||||
|
// away
|
||||||
|
|
||||||
#if defined(__LP64__) || defined(_WIN64)
|
#if defined(__LP64__) || defined(_WIN64)
|
||||||
#define FIX_BUGS_64 // Must have fixes to be able to run 64 bit build
|
#define FIX_BUGS_64 // Must have fixes to be able to run 64 bit build
|
||||||
#endif
|
#endif
|
||||||
@ -450,6 +453,7 @@ enum Config {
|
|||||||
#undef PS2_ALPHA_TEST
|
#undef PS2_ALPHA_TEST
|
||||||
#undef NO_ISLAND_LOADING
|
#undef NO_ISLAND_LOADING
|
||||||
#undef PS2_AUDIO_CHANNELS
|
#undef PS2_AUDIO_CHANNELS
|
||||||
|
#undef EXTENDED_OFFSCREEN_DESPAWN_RANGE
|
||||||
#define PC_PARTICLE
|
#define PC_PARTICLE
|
||||||
#define VC_PED_PORTS // To not process collisions always. But should be tested if that's really beneficial
|
#define VC_PED_PORTS // To not process collisions always. But should be tested if that's really beneficial
|
||||||
#define VC_RAIN_NERF // Reduces number of rain particles
|
#define VC_RAIN_NERF // Reduces number of rain particles
|
||||||
|
@ -1126,13 +1126,16 @@ CPopulation::ManagePopulation(void)
|
|||||||
bool pedIsFarAway = false;
|
bool pedIsFarAway = false;
|
||||||
if (PedCreationDistMultiplier() * (PED_REMOVE_DIST_SPECIAL * TheCamera.GenerationDistMultiplier) < dist
|
if (PedCreationDistMultiplier() * (PED_REMOVE_DIST_SPECIAL * TheCamera.GenerationDistMultiplier) < dist
|
||||||
|| (!ped->bCullExtraFarAway && PedCreationDistMultiplier() * PED_REMOVE_DIST * TheCamera.GenerationDistMultiplier < dist)
|
|| (!ped->bCullExtraFarAway && PedCreationDistMultiplier() * PED_REMOVE_DIST * TheCamera.GenerationDistMultiplier < dist)
|
||||||
|
#ifndef EXTENDED_OFFSCREEN_DESPAWN_RANGE
|
||||||
|| (PedCreationDistMultiplier() * (MIN_CREATION_DIST + CREATION_RANGE) * OFFSCREEN_CREATION_MULT < dist
|
|| (PedCreationDistMultiplier() * (MIN_CREATION_DIST + CREATION_RANGE) * OFFSCREEN_CREATION_MULT < dist
|
||||||
&& !ped->GetIsOnScreen()
|
&& !ped->GetIsOnScreen()
|
||||||
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER
|
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER
|
||||||
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER_RUNABOUT
|
&& TheCamera.Cams[TheCamera.ActiveCam].Mode != CCam::MODE_SNIPER_RUNABOUT
|
||||||
&& !TheCamera.Cams[TheCamera.ActiveCam].LookingLeft
|
&& !TheCamera.Cams[TheCamera.ActiveCam].LookingLeft
|
||||||
&& !TheCamera.Cams[TheCamera.ActiveCam].LookingRight
|
&& !TheCamera.Cams[TheCamera.ActiveCam].LookingRight
|
||||||
&& !TheCamera.Cams[TheCamera.ActiveCam].LookingBehind))
|
&& !TheCamera.Cams[TheCamera.ActiveCam].LookingBehind)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
pedIsFarAway = true;
|
pedIsFarAway = true;
|
||||||
|
|
||||||
if (!pedIsFarAway)
|
if (!pedIsFarAway)
|
||||||
|
Loading…
Reference in New Issue
Block a user