diff options
author | Teravus Ovares | 2008-02-07 01:52:39 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-07 01:52:39 +0000 |
commit | 1b8e89751a40ba7bcb1e068f60d4d5228d31f4ce (patch) | |
tree | eff527670ee99e08712ad2f171a05c0340912a1d /OpenSim/Region | |
parent | make a couple more changes to get us back very close to old color scheme (diff) | |
download | opensim-SC-1b8e89751a40ba7bcb1e068f60d4d5228d31f4ce.zip opensim-SC-1b8e89751a40ba7bcb1e068f60d4d5228d31f4ce.tar.gz opensim-SC-1b8e89751a40ba7bcb1e068f60d4d5228d31f4ce.tar.bz2 opensim-SC-1b8e89751a40ba7bcb1e068f60d4d5228d31f4ce.tar.xz |
* Added the Scripted objectflag if there is a script running in a prim. Remove the flag if you delete all of the scripts in the object.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 7 |
3 files changed, 21 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 4f32774..6b891fd 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1003,6 +1003,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1003 | { | 1003 | { |
1004 | AddEntityFromStorage(group); | 1004 | AddEntityFromStorage(group); |
1005 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); | 1005 | SceneObjectPart rootPart = group.GetChildPart(group.UUID); |
1006 | rootPart.ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; | ||
1006 | rootPart.TrimPermissions(); | 1007 | rootPart.TrimPermissions(); |
1007 | 1008 | ||
1008 | group.ApplyPhysics(m_physicalPrim); | 1009 | group.ApplyPhysics(m_physicalPrim); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index e74b8ed..94bf10e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -151,12 +151,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
151 | // "[PRIMINVENTORY]: " + | 151 | // "[PRIMINVENTORY]: " + |
152 | // "Starting script {0}, {1} in prim {2}, {3}", | 152 | // "Starting script {0}, {1} in prim {2}, {3}", |
153 | // item.Name, item.ItemID, Name, UUID)); | 153 | // item.Name, item.ItemID, Name, UUID)); |
154 | AddFlag(LLObject.ObjectFlags.Scripted); | ||
155 | |||
154 | if (!((m_parentGroup.Scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts)) | 156 | if (!((m_parentGroup.Scene.RegionInfo.EstateSettings.regionFlags & Simulator.RegionFlags.SkipScripts) == Simulator.RegionFlags.SkipScripts)) |
155 | { | 157 | { |
156 | AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false); | 158 | AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false); |
157 | 159 | ||
158 | if (rezAsset != null) | 160 | if (rezAsset != null) |
159 | { | 161 | { |
162 | |||
160 | string script = Helpers.FieldToUTF8String(rezAsset.Data); | 163 | string script = Helpers.FieldToUTF8String(rezAsset.Data); |
161 | m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script); | 164 | m_parentGroup.Scene.EventManager.TriggerRezScript(LocalID, item.ItemID, script); |
162 | m_parentGroup.AddActiveScriptCount(1); | 165 | m_parentGroup.AddActiveScriptCount(1); |
@@ -169,6 +172,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
169 | item.Name, item.ItemID, item.AssetID)); | 172 | item.Name, item.ItemID, item.AssetID)); |
170 | } | 173 | } |
171 | } | 174 | } |
175 | ScheduleFullUpdate(); | ||
172 | } | 176 | } |
173 | 177 | ||
174 | /// <summary> | 178 | /// <summary> |
@@ -202,10 +206,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
202 | /// <param name="itemId"></param> | 206 | /// <param name="itemId"></param> |
203 | public void StopScript(LLUUID itemId) | 207 | public void StopScript(LLUUID itemId) |
204 | { | 208 | { |
209 | |||
210 | |||
205 | if (m_taskInventory.ContainsKey(itemId)) | 211 | if (m_taskInventory.ContainsKey(itemId)) |
206 | { | 212 | { |
213 | |||
207 | m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId); | 214 | m_parentGroup.Scene.EventManager.TriggerRemoveScript(LocalID, itemId); |
208 | m_parentGroup.AddActiveScriptCount(-1); | 215 | m_parentGroup.AddActiveScriptCount(-1); |
216 | |||
217 | |||
218 | |||
219 | |||
220 | |||
209 | } | 221 | } |
210 | else | 222 | else |
211 | { | 223 | { |
@@ -213,7 +225,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
213 | "[PRIMINVENTORY]: " + | 225 | "[PRIMINVENTORY]: " + |
214 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", | 226 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", |
215 | itemId, Name, UUID)); | 227 | itemId, Name, UUID)); |
216 | } | 228 | } |
229 | |||
217 | } | 230 | } |
218 | 231 | ||
219 | /// <summary> | 232 | /// <summary> |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 4456fce..0a9d21a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -670,6 +670,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
670 | LLObject.ObjectFlags.AllowInventoryDrop | | 670 | LLObject.ObjectFlags.AllowInventoryDrop | |
671 | LLObject.ObjectFlags.CreateSelected; | 671 | LLObject.ObjectFlags.CreateSelected; |
672 | 672 | ||
673 | |||
673 | TrimPermissions(); | 674 | TrimPermissions(); |
674 | 675 | ||
675 | ScheduleFullUpdate(); | 676 | ScheduleFullUpdate(); |
@@ -707,7 +708,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
707 | OffsetPosition = position; | 708 | OffsetPosition = position; |
708 | RotationOffset = rotation; | 709 | RotationOffset = rotation; |
709 | ObjectFlags = flags; | 710 | ObjectFlags = flags; |
710 | 711 | ||
712 | // Since we don't store script state, this is only a 'temporary' objectflag now | ||
713 | // If the object is scripted, the script will get loaded and this will be set again | ||
714 | ObjectFlags &= ~(uint)LLObject.ObjectFlags.Scripted; | ||
715 | |||
711 | TrimPermissions(); | 716 | TrimPermissions(); |
712 | // ApplyPhysics(); | 717 | // ApplyPhysics(); |
713 | 718 | ||