summaryrefslogtreecommitdiffstats
path: root/src/renderer
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-09-01 16:09:12 +0200
committerSergeanur <s.anureev@yandex.ua>2021-09-01 16:09:12 +0200
commit29383a6a11b33ec14ecb07d6e17c26f8c101fffd (patch)
tree647a1eed053448162388c092edafe152263f781f /src/renderer
parentMerge pull request #1327 from Nick007J/lcs (diff)
parentAudio: add separate buffer for player comments like on PS2 to fix overflow, add ped comments debug to debug menu (diff)
downloadre3-29383a6a11b33ec14ecb07d6e17c26f8c101fffd.tar
re3-29383a6a11b33ec14ecb07d6e17c26f8c101fffd.tar.gz
re3-29383a6a11b33ec14ecb07d6e17c26f8c101fffd.tar.bz2
re3-29383a6a11b33ec14ecb07d6e17c26f8c101fffd.tar.lz
re3-29383a6a11b33ec14ecb07d6e17c26f8c101fffd.tar.xz
re3-29383a6a11b33ec14ecb07d6e17c26f8c101fffd.tar.zst
re3-29383a6a11b33ec14ecb07d6e17c26f8c101fffd.zip
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/Shadows.cpp101
1 files changed, 48 insertions, 53 deletions
diff --git a/src/renderer/Shadows.cpp b/src/renderer/Shadows.cpp
index f8c98470..840b9a37 100644
--- a/src/renderer/Shadows.cpp
+++ b/src/renderer/Shadows.cpp
@@ -536,61 +536,56 @@ CShadows::StoreShadowForVehicle(CVehicle *pCar, VEH_SHD_TYPE type)
float size = 1.0f;
- if ( pCar->GetModelIndex() == MI_HUNTER )
+ switch ( pCar->GetModelIndex() )
{
- fVehicleWidth *= 3.0f;
- fVehicleHeight *= 1.4f;
- size *= 0.5f;
- }
- else if ( pCar->GetModelIndex() == MI_ANGEL )
- {
- fVehicleHeight = fVehicleHeight * 1.5f;
- size = 0.03f;
- }
- else if ( pCar->GetModelIndex() == MI_SEASPAR )
- {
- fVehicleWidth *= 3.0f;
- fVehicleHeight *= 1.4f;
- size *= 0.5f;
- }
- else if ( pCar->GetModelIndex() == MI_PIZZABOY || pCar->GetModelIndex() == MI_PCJ600 || pCar->GetModelIndex() == MI_FAGGIO )
- {
- fVehicleHeight *= 1.2f;
- size = 0.05f;
- }
- else if ( pCar->GetModelIndex() == MI_FREEWAY )
- {
- fVehicleHeight *= 1.5f;
- size = 0.03f;
- }
- else if ( pCar->GetModelIndex() == MI_RCRAIDER )
- {
- fVehicleHeight *= 1.5f;
- fVehicleWidth *= 2.0f;
- size = 0.2f;
- }
- else if ( pCar->GetModelIndex() == MI_SANCHEZ )
- {
- fVehicleHeight *= 1.5f;
- size = 0.03f;
- }
- else if ( pCar->GetModelIndex() == MI_SPARROW || pCar->GetModelIndex() == MI_MAVERICK || pCar->GetModelIndex() == MI_VCNMAV || pCar->GetModelIndex() == MI_POLMAV )
- {
- fVehicleWidth *= 3.0f;
- fVehicleHeight *= 1.4f;
- size *= 0.5f;
- }
- else if ( pCar->GetModelIndex() == MI_RCGOBLIN )
- {
- fVehicleHeight *= 1.5f;
- fVehicleWidth *= 2.0f;
- size = 0.2f;
- }
- else if ( pCar->GetModelIndex() == MI_DODO )
- {
- fVehicleHeight *= 0.9f;
- fVehicleWidth *= 0.4f;
+ case MI_PIZZABOY:
+ case MI_PCJ600:
+ case MI_FAGGIO:
+ {
+ fVehicleHeight *= 1.2f;
+ size = 0.05f;
+ break;
+ }
+
+ case MI_ANGEL:
+ case MI_FREEWAY:
+ case MI_SANCHEZ:
+ {
+ fVehicleHeight *= 1.5f;
+ size *= 0.03f;
+ break;
+ }
+
+ case MI_HUNTER:
+ case MI_SEASPAR:
+ case MI_SPARROW:
+ case MI_MAVERICK:
+ case MI_VCNMAV:
+ case MI_POLMAV:
+ {
+ fVehicleWidth *= 3.0f;
+ fVehicleHeight *= 1.4f;
+ size *= 0.5f;
+ break;
+ }
+
+ case MI_RCGOBLIN:
+ case MI_RCRAIDER:
+ {
+ fVehicleHeight *= 1.5f;
+ fVehicleWidth *= 2.0f;
+ size *= 0.2f;
+ break;
+ }
+
+ case MI_DODO:
+ {
+ fVehicleHeight *= 0.9f;
+ fVehicleWidth *= 0.4f;
+ break;
+ }
}
+
CarPos.x -= pCar->GetForward().x * (((fVehicleHeight/2) - pCar->GetColModel()->boundingBox.max.y)*size);
CarPos.y -= pCar->GetForward().y * (((fVehicleHeight/2) - pCar->GetColModel()->boundingBox.max.y)*size);