summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2020-07-29 11:17:53 +0200
committerFire-Head <Fire-Head@users.noreply.github.com>2020-07-29 11:17:53 +0200
commit1803dcc873df329282adab46e1d42baa4b6ee45b (patch)
treed78ac699caa9124338701a5e413b70379204c8a3 /src/vehicles
parentNULL->nil (diff)
downloadre3-1803dcc873df329282adab46e1d42baa4b6ee45b.tar
re3-1803dcc873df329282adab46e1d42baa4b6ee45b.tar.gz
re3-1803dcc873df329282adab46e1d42baa4b6ee45b.tar.bz2
re3-1803dcc873df329282adab46e1d42baa4b6ee45b.tar.lz
re3-1803dcc873df329282adab46e1d42baa4b6ee45b.tar.xz
re3-1803dcc873df329282adab46e1d42baa4b6ee45b.tar.zst
re3-1803dcc873df329282adab46e1d42baa4b6ee45b.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Automobile.cpp8
-rw-r--r--src/vehicles/Bike.cpp2
-rw-r--r--src/vehicles/Heli.cpp3
3 files changed, 9 insertions, 4 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 925bc884..b643e336 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -2505,8 +2505,12 @@ CAutomobile::PreRender(void)
// end of lights
}
-//TODO(MIAMI): StoreShadowForVehicle once we have it
- CShadows::StoreShadowForCar(this);
+ if (IsRealHeli())
+ CShadows::StoreShadowForVehicle(this, VEH_SHD_TYPE_HELI);
+ else if ( GetModelIndex() == MI_RCBARON)
+ CShadows::StoreShadowForVehicle(this, VEH_SHD_TYPE_RCPLANE);
+ else
+ CShadows::StoreShadowForVehicle(this, VEH_SHD_TYPE_CAR);
DoSunGlare();
diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp
index 6f52c33f..169bde73 100644
--- a/src/vehicles/Bike.cpp
+++ b/src/vehicles/Bike.cpp
@@ -1546,7 +1546,7 @@ CBike::PreRender(void)
}
AddDamagedVehicleParticles();
-//TODO(MIAMI): StoreShadowForVehicle once we have it
+ CShadows::StoreShadowForVehicle(this, VEH_SHD_TYPE_BIKE);
CMatrix mat;
CVector pos;
diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp
index 1e0a8c27..36681c15 100644
--- a/src/vehicles/Heli.cpp
+++ b/src/vehicles/Heli.cpp
@@ -560,6 +560,7 @@ CHeli::PreRender(void)
{
float radius = (GetPosition().z - FindPlayerCoors().z - 10.0f - 1.0f) * 0.3f + 10.0f;
HeliDustGenerate(this, radius, FindPlayerCoors().z, Max(16.0f - 4.0f*CTimer::GetTimeStep(), 2.0f));
+ CShadows::StoreShadowForVehicle(this, VEH_SHD_TYPE_HELI);
}
void
@@ -595,7 +596,7 @@ CHeli::PreRenderAlways(void)
CShadows::StoreShadowToBeRendered(SHADOWTYPE_ADDITIVE, gpShadowExplosionTex, &shadowPos,
6.0f, 0.0f, 0.0f, -6.0f,
80*m_fSearchLightIntensity, 80*m_fSearchLightIntensity, 80*m_fSearchLightIntensity, 80*m_fSearchLightIntensity,
- 50.0f, true, 1.0f);
+ 50.0f, true, 1.0f, NULL, false);
CVector front = GetMatrix() * CVector(0.0f, 7.0f, 0.0f);
CVector toPlayer = FindPlayerCoors() - front;