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/Environment/Scenes/SceneObjectPart.Inventory.cs | |
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 '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 15 |
1 files changed, 14 insertions, 1 deletions
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> |