From 2194b744734bc21f9d9285d18d47164eef4baffa Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 22 Apr 2007 18:48:45 +0000 Subject: Needs testing. 1. Fixed Update Lock (should now compile) 2. Added support for rescaling a primitive without it jerking to the side. --- OpenSim.RegionServer/world/Primitive.cs | 7 +++++++ OpenSim.RegionServer/world/World.cs | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim.RegionServer/world') diff --git a/OpenSim.RegionServer/world/Primitive.cs b/OpenSim.RegionServer/world/Primitive.cs index 8ff66f9..6fb5d72 100644 --- a/OpenSim.RegionServer/world/Primitive.cs +++ b/OpenSim.RegionServer/world/Primitive.cs @@ -52,7 +52,14 @@ namespace OpenSim.world { set { + LLVector3 offset = (value - primData.Scale); + offset.X /= 2; + offset.Y /= 2; + offset.Z /= 2; + + this.primData.Position += offset; this.primData.Scale = value; + this.dirtyFlag = true; } get diff --git a/OpenSim.RegionServer/world/World.cs b/OpenSim.RegionServer/world/World.cs index 0291467..b0392a6 100644 --- a/OpenSim.RegionServer/world/World.cs +++ b/OpenSim.RegionServer/world/World.cs @@ -41,7 +41,7 @@ namespace OpenSim.world private string m_regionName; private InventoryCache _inventoryCache; private AssetCache _assetCache; - private int updateLock; + private Object updateLock; /// /// Creates a new World class, and a region to go with it. @@ -53,7 +53,7 @@ namespace OpenSim.world { try { - updateLock = 0; + updateLock = null; m_clientThreads = clientThreads; m_regionHandle = regionHandle; m_regionName = regionName; -- cgit v1.1