From 319ccf17c8cb20233e82ea0a49c4427aaefd7ac9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 21 May 2017 01:52:27 +0100 Subject: [PATCH] add a bit more protection for broken scripts like ingen-e3s-v1.33 --- OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs index 63bef7cdc6..2e6a7dbcb1 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs @@ -243,6 +243,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde internal void ProcessFloatVehicleParam(Vehicle pParam, float pValue) { float len; + if(float.IsNaN(pValue) || float.IsInfinity(pValue)) + return; switch (pParam) { @@ -374,6 +376,8 @@ namespace OpenSim.Region.PhysicsModule.ubOde internal void ProcessVectorVehicleParam(Vehicle pParam, Vector3 pValue) { float len; + if(!pValue.IsFinite()) + return; switch (pParam) {