summaryrefslogtreecommitdiffstats
path: root/src/rw
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-16 12:31:23 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-16 12:31:23 +0200
commit4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e (patch)
treec792ebb3effbb2d45c05185c294f34fe17c97a0b /src/rw
parentmore attractor fixes (diff)
downloadre3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.gz
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.bz2
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.lz
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.xz
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.tar.zst
re3-4defd8b75c80341ecccbfe2a0d3a6baf34c4f02e.zip
Diffstat (limited to 'src/rw')
-rw-r--r--src/rw/VisibilityPlugins.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp
index 5a94e8f6..3b68c981 100644
--- a/src/rw/VisibilityPlugins.cpp
+++ b/src/rw/VisibilityPlugins.cpp
@@ -139,6 +139,8 @@ static float PitchToCamera;
void
CVisibilityPlugins::SetupVehicleVariables(RpClump *vehicle)
{
+ if (vehicle->object.type != rpCLUMP)
+ return;
DistToCameraSq = GetDistanceSquaredFromCamera(RpClumpGetFrame(vehicle));
RwV3d distToCam;
RwV3dSub(&distToCam, ms_pCameraPosn, &RwFrameGetMatrix(RpClumpGetFrame(vehicle))->pos);