summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2020-12-14 00:52:14 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2020-12-14 00:52:14 +0100
commitc0652b8203f24a82467c238bc25fbce937957121 (patch)
tree815f9bb17e5387d086aed2417b9aa2c45abb2f10
parentFix language initialization call order (diff)
parentsync vis-plugins with miami (diff)
downloadre3-c0652b8203f24a82467c238bc25fbce937957121.tar
re3-c0652b8203f24a82467c238bc25fbce937957121.tar.gz
re3-c0652b8203f24a82467c238bc25fbce937957121.tar.bz2
re3-c0652b8203f24a82467c238bc25fbce937957121.tar.lz
re3-c0652b8203f24a82467c238bc25fbce937957121.tar.xz
re3-c0652b8203f24a82467c238bc25fbce937957121.tar.zst
re3-c0652b8203f24a82467c238bc25fbce937957121.zip
-rw-r--r--src/control/Garages.cpp2
-rw-r--r--src/rw/VisibilityPlugins.cpp19
2 files changed, 14 insertions, 7 deletions
diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp
index ff11600b..07fc0612 100644
--- a/src/control/Garages.cpp
+++ b/src/control/Garages.cpp
@@ -179,10 +179,8 @@ void CGarages::Shutdown(void)
void CGarages::Update(void)
{
static int GarageToBeTidied = 0;
-#ifndef GTA_PS2
if (CReplay::IsPlayingBack())
return;
-#endif
bCamShouldBeOutisde = false;
TheCamera.pToGarageWeAreIn = nil;
TheCamera.pToGarageWeAreInForHackAvoidFirstPerson = nil;
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp
index b27d96c8..21e00725 100644
--- a/src/rw/VisibilityPlugins.cpp
+++ b/src/rw/VisibilityPlugins.cpp
@@ -203,6 +203,10 @@ CVisibilityPlugins::InsertAtomicIntoSortedList(RpAtomic *a, float dist)
return ret;
}
+// can't increase this yet unfortunately...
+// probably have to fix fading for this so material alpha isn't overwritten
+#define VEHICLE_LODDIST_MULTIPLIER (TheCamera.GenerationDistMultiplier)
+
void
CVisibilityPlugins::SetRenderWareCamera(RwCamera *camera)
{
@@ -215,11 +219,11 @@ CVisibilityPlugins::SetRenderWareCamera(RwCamera *camera)
else
ms_cullCompsDist = sq(TheCamera.LODDistMultiplier * 20.0f);
- ms_vehicleLod0Dist = sq(70.0f * TheCamera.GenerationDistMultiplier);
- ms_vehicleLod1Dist = sq(90.0f * TheCamera.GenerationDistMultiplier);
- ms_vehicleFadeDist = sq(100.0f * TheCamera.GenerationDistMultiplier);
- ms_bigVehicleLod0Dist = sq(60.0f * TheCamera.GenerationDistMultiplier);
- ms_bigVehicleLod1Dist = sq(150.0f * TheCamera.GenerationDistMultiplier);
+ ms_vehicleLod0Dist = sq(70.0f * VEHICLE_LODDIST_MULTIPLIER);
+ ms_vehicleLod1Dist = sq(90.0f * VEHICLE_LODDIST_MULTIPLIER);
+ ms_vehicleFadeDist = sq(100.0f * VEHICLE_LODDIST_MULTIPLIER);
+ ms_bigVehicleLod0Dist = sq(60.0f * VEHICLE_LODDIST_MULTIPLIER);
+ ms_bigVehicleLod1Dist = sq(150.0f * VEHICLE_LODDIST_MULTIPLIER);
ms_pedLod0Dist = sq(25.0f * TheCamera.LODDistMultiplier);
ms_pedLod1Dist = sq(60.0f * TheCamera.LODDistMultiplier);
ms_pedFadeDist = sq(70.0f * TheCamera.LODDistMultiplier);
@@ -311,7 +315,12 @@ CVisibilityPlugins::RenderWheelAtomicCB(RpAtomic *atomic)
m = RwFrameGetLTM(RpAtomicGetFrame(atomic));
RwV3dSub(&view, RwMatrixGetPos(m), ms_pCameraPosn);
len = RwV3dLength(&view);
+#ifdef FIX_BUGS
+ // from VC
+ lodatm = mi->GetAtomicFromDistance(len * TheCamera.LODDistMultiplier / VEHICLE_LODDIST_MULTIPLIER);
+#else
lodatm = mi->GetAtomicFromDistance(len);
+#endif
if(lodatm){
if(RpAtomicGetGeometry(lodatm) != RpAtomicGetGeometry(atomic))
RpAtomicSetGeometry(atomic, RpAtomicGetGeometry(lodatm), rpATOMICSAMEBOUNDINGSPHERE);