diff options
Diffstat (limited to 'src/rw')
-rw-r--r-- | src/rw/VisibilityPlugins.cpp | 2 |
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); |