From 740ce20d9df4327aaf9660613b9ce11a81d53c83 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 20 Feb 2008 20:07:12 +0000 Subject: * Found the land bug, yay --- .../Region/Environment/LandManagement/LandManager.cs | 2 +- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index 017fce8..4f6015a 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs @@ -576,7 +576,7 @@ namespace OpenSim.Region.Environment.LandManagement Land currentParcel = null; try { - getLandObject(start_x + x, start_y + y); + currentParcel = getLandObject(start_x + x, start_y + y); } catch (Exception) { diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 088d85a..f44c160 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -136,9 +136,13 @@ namespace OpenSim.Region.Physics.Manager // a race condition if the last subscriber unsubscribes // immediately after the null check and before the event is raised. RequestTerseUpdate handler = OnRequestTerseUpdate; + if (handler != null) { - handler(); + lock (handler) + { + handler(); + } } } @@ -150,17 +154,25 @@ namespace OpenSim.Region.Physics.Manager OutOfBounds handler = OnOutOfBounds; if (handler != null) { - handler(pos); + lock (handler) + { + handler(pos); + } } } public virtual void SendCollisionUpdate(EventArgs e) { CollisionUpdate handler = OnCollisionUpdate; + if (handler != null) - { - handler(e); + { + lock (handler) + { + handler(e); + } } + } -- cgit v1.1