Copyright notices and formatting cleanup.

0.6.0-stable
Jeff Ames 2008-07-06 14:02:22 +00:00
parent 34cac351cb
commit d470d30c09
22 changed files with 991 additions and 887 deletions

View File

@ -476,7 +476,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
} }
else else
{ {
lock(cntable) cntable.Add(cnonce, nck); lock (cntable) cntable.Add(cnonce, nck);
} }
} }

View File

@ -108,7 +108,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
/// </summary> /// </summary>
private void LoadHandlers() private void LoadHandlers()
{ {
lock(handlers) lock (handlers)
{ {
if (!handlersLoaded) if (!handlersLoaded)
{ {

View File

@ -238,7 +238,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
Rest.Log.DebugFormat("{0} Inventory catalog requested for {1} {2}", Rest.Log.DebugFormat("{0} Inventory catalog requested for {1} {2}",
MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName); MsgId, rdata.userProfile.FirstName, rdata.userProfile.SurName);
lock(rdata) lock (rdata)
{ {
if (!rdata.HaveInventory) if (!rdata.HaveInventory)
{ {
@ -1869,7 +1869,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
this.folders = folders; this.folders = folders;
this.items = items; this.items = items;
this.HaveInventory = true; this.HaveInventory = true;
lock(this) lock (this)
{ {
Monitor.Pulse(this); Monitor.Pulse(this);
} }

View File

@ -729,13 +729,13 @@ namespace OpenSim.Data.MySQL
public RegionSettings LoadRegionSettings(LLUUID regionUUID) public RegionSettings LoadRegionSettings(LLUUID regionUUID)
{ {
lock(m_dataSet) lock (m_dataSet)
{ {
CheckConnection(); CheckConnection();
DataTable regionsettings = m_regionSettingsTable; DataTable regionsettings = m_regionSettingsTable;
string searchExp = "regionUUID = '" + regionUUID.ToString() + "'"; string searchExp = "regionUUID = '" + regionUUID.ToString() + "'";
DataRow[] rawsettings = regionsettings.Select(searchExp); DataRow[] rawsettings = regionsettings.Select(searchExp);
if(rawsettings.Length == 0) if (rawsettings.Length == 0)
{ {
RegionSettings rs = new RegionSettings(); RegionSettings rs = new RegionSettings();
rs.RegionUUID = regionUUID; rs.RegionUUID = regionUUID;

View File

@ -1,4 +1,31 @@
using System; /*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using libsecondlife; using libsecondlife;

View File

@ -285,7 +285,7 @@ namespace OpenSim.Framework
{ {
get get
{ {
if(m_regionSettings == null) if (m_regionSettings == null)
{ {
m_regionSettings = new RegionSettings(); m_regionSettings = new RegionSettings();
} }

View File

@ -135,7 +135,7 @@ namespace OpenSim.Framework
public bool HandleIncomingConfiguration(string key, object value) public bool HandleIncomingConfiguration(string key, object value)
{ {
switch(key) switch (key)
{ {
case "region_flags": case "region_flags":
Simulator.RegionFlags flags = (Simulator.RegionFlags)(uint)value; Simulator.RegionFlags flags = (Simulator.RegionFlags)(uint)value;
@ -171,7 +171,7 @@ namespace OpenSim.Framework
break; break;
case "sim_access": case "sim_access":
int access = (int)value; int access = (int)value;
if(access <= 13) if (access <= 13)
m_Maturity = 0; m_Maturity = 0;
else else
m_Maturity = 1; m_Maturity = 1;
@ -236,266 +236,266 @@ namespace OpenSim.Framework
private LLUUID m_RegionUUID = LLUUID.Zero; private LLUUID m_RegionUUID = LLUUID.Zero;
public LLUUID RegionUUID public LLUUID RegionUUID
{ {
get { return m_RegionUUID; } get { return m_RegionUUID; }
set { m_RegionUUID = value; } set { m_RegionUUID = value; }
} }
private bool m_BlockTerraform = false; private bool m_BlockTerraform = false;
public bool BlockTerraform public bool BlockTerraform
{ {
get { return m_BlockTerraform; } get { return m_BlockTerraform; }
set { m_BlockTerraform = value; } set { m_BlockTerraform = value; }
} }
private bool m_BlockFly = false; private bool m_BlockFly = false;
public bool BlockFly public bool BlockFly
{ {
get { return m_BlockFly; } get { return m_BlockFly; }
set { m_BlockFly = value; } set { m_BlockFly = value; }
} }
private bool m_AllowDamage = false; private bool m_AllowDamage = false;
public bool AllowDamage public bool AllowDamage
{ {
get { return m_AllowDamage; } get { return m_AllowDamage; }
set { m_AllowDamage = value; } set { m_AllowDamage = value; }
} }
private bool m_RestrictPushing = false; private bool m_RestrictPushing = false;
public bool RestrictPushing public bool RestrictPushing
{ {
get { return m_RestrictPushing; } get { return m_RestrictPushing; }
set { m_RestrictPushing = value; } set { m_RestrictPushing = value; }
} }
private bool m_AllowLandResell = true; private bool m_AllowLandResell = true;
public bool AllowLandResell public bool AllowLandResell
{ {
get { return m_AllowLandResell; } get { return m_AllowLandResell; }
set { m_AllowLandResell = value; } set { m_AllowLandResell = value; }
} }
private bool m_AllowLandJoinDivide = true; private bool m_AllowLandJoinDivide = true;
public bool AllowLandJoinDivide public bool AllowLandJoinDivide
{ {
get { return m_AllowLandJoinDivide; } get { return m_AllowLandJoinDivide; }
set { m_AllowLandJoinDivide = value; } set { m_AllowLandJoinDivide = value; }
} }
private bool m_BlockShowInSearch = false; private bool m_BlockShowInSearch = false;
public bool BlockShowInSearch public bool BlockShowInSearch
{ {
get { return m_BlockShowInSearch; } get { return m_BlockShowInSearch; }
set { m_BlockShowInSearch = value; } set { m_BlockShowInSearch = value; }
} }
private int m_AgentLimit = 40; private int m_AgentLimit = 40;
public int AgentLimit public int AgentLimit
{ {
get { return m_AgentLimit; } get { return m_AgentLimit; }
set { m_AgentLimit = value; } set { m_AgentLimit = value; }
} }
private double m_ObjectBonus = 1.0; private double m_ObjectBonus = 1.0;
public double ObjectBonus public double ObjectBonus
{ {
get { return m_ObjectBonus; } get { return m_ObjectBonus; }
set { m_ObjectBonus = value; } set { m_ObjectBonus = value; }
} }
private int m_Maturity = 1; private int m_Maturity = 1;
public int Maturity public int Maturity
{ {
get { return m_Maturity; } get { return m_Maturity; }
set { m_Maturity = value; } set { m_Maturity = value; }
} }
private bool m_DisableScripts = false; private bool m_DisableScripts = false;
public bool DisableScripts public bool DisableScripts
{ {
get { return m_DisableScripts; } get { return m_DisableScripts; }
set { m_DisableScripts = value; } set { m_DisableScripts = value; }
} }
private bool m_DisableCollisions = false; private bool m_DisableCollisions = false;
public bool DisableCollisions public bool DisableCollisions
{ {
get { return m_DisableCollisions; } get { return m_DisableCollisions; }
set { m_DisableCollisions = value; } set { m_DisableCollisions = value; }
} }
private bool m_DisablePhysics = false; private bool m_DisablePhysics = false;
public bool DisablePhysics public bool DisablePhysics
{ {
get { return m_DisablePhysics; } get { return m_DisablePhysics; }
set { m_DisablePhysics = value; } set { m_DisablePhysics = value; }
} }
private LLUUID m_TerrainTexture1 = LLUUID.Zero; private LLUUID m_TerrainTexture1 = LLUUID.Zero;
public LLUUID TerrainTexture1 public LLUUID TerrainTexture1
{ {
get { return m_TerrainTexture1; } get { return m_TerrainTexture1; }
set { m_TerrainTexture1 = value; } set { m_TerrainTexture1 = value; }
} }
private LLUUID m_TerrainTexture2 = LLUUID.Zero; private LLUUID m_TerrainTexture2 = LLUUID.Zero;
public LLUUID TerrainTexture2 public LLUUID TerrainTexture2
{ {
get { return m_TerrainTexture2; } get { return m_TerrainTexture2; }
set { m_TerrainTexture2 = value; } set { m_TerrainTexture2 = value; }
} }
private LLUUID m_TerrainTexture3 = LLUUID.Zero; private LLUUID m_TerrainTexture3 = LLUUID.Zero;
public LLUUID TerrainTexture3 public LLUUID TerrainTexture3
{ {
get { return m_TerrainTexture3; } get { return m_TerrainTexture3; }
set { m_TerrainTexture3 = value; } set { m_TerrainTexture3 = value; }
} }
private LLUUID m_TerrainTexture4 = LLUUID.Zero; private LLUUID m_TerrainTexture4 = LLUUID.Zero;
public LLUUID TerrainTexture4 public LLUUID TerrainTexture4
{ {
get { return m_TerrainTexture4; } get { return m_TerrainTexture4; }
set { m_TerrainTexture4 = value; } set { m_TerrainTexture4 = value; }
} }
private double m_Elevation1NW = 10; private double m_Elevation1NW = 10;
public double Elevation1NW public double Elevation1NW
{ {
get { return m_Elevation1NW; } get { return m_Elevation1NW; }
set { m_Elevation1NW = value; } set { m_Elevation1NW = value; }
} }
private double m_Elevation2NW = 60; private double m_Elevation2NW = 60;
public double Elevation2NW public double Elevation2NW
{ {
get { return m_Elevation2NW; } get { return m_Elevation2NW; }
set { m_Elevation2NW = value; } set { m_Elevation2NW = value; }
} }
private double m_Elevation1NE = 10; private double m_Elevation1NE = 10;
public double Elevation1NE public double Elevation1NE
{ {
get { return m_Elevation1NE; } get { return m_Elevation1NE; }
set { m_Elevation1NE = value; } set { m_Elevation1NE = value; }
} }
private double m_Elevation2NE = 60; private double m_Elevation2NE = 60;
public double Elevation2NE public double Elevation2NE
{ {
get { return m_Elevation2NE; } get { return m_Elevation2NE; }
set { m_Elevation2NE = value; } set { m_Elevation2NE = value; }
} }
private double m_Elevation1SE = 10; private double m_Elevation1SE = 10;
public double Elevation1SE public double Elevation1SE
{ {
get { return m_Elevation1SE; } get { return m_Elevation1SE; }
set { m_Elevation1SE = value; } set { m_Elevation1SE = value; }
} }
private double m_Elevation2SE = 60; private double m_Elevation2SE = 60;
public double Elevation2SE public double Elevation2SE
{ {
get { return m_Elevation2SE; } get { return m_Elevation2SE; }
set { m_Elevation2SE = value; } set { m_Elevation2SE = value; }
} }
private double m_Elevation1SW = 10; private double m_Elevation1SW = 10;
public double Elevation1SW public double Elevation1SW
{ {
get { return m_Elevation1SW; } get { return m_Elevation1SW; }
set { m_Elevation1SW = value; } set { m_Elevation1SW = value; }
} }
private double m_Elevation2SW = 60; private double m_Elevation2SW = 60;
public double Elevation2SW public double Elevation2SW
{ {
get { return m_Elevation2SW; } get { return m_Elevation2SW; }
set { m_Elevation2SW = value; } set { m_Elevation2SW = value; }
} }
private double m_WaterHeight = 20; private double m_WaterHeight = 20;
public double WaterHeight public double WaterHeight
{ {
get { return m_WaterHeight; } get { return m_WaterHeight; }
set { m_WaterHeight = value; } set { m_WaterHeight = value; }
} }
private double m_TerrainRaiseLimit = 100; private double m_TerrainRaiseLimit = 100;
public double TerrainRaiseLimit public double TerrainRaiseLimit
{ {
get { return m_TerrainRaiseLimit; } get { return m_TerrainRaiseLimit; }
set { m_TerrainRaiseLimit = value; } set { m_TerrainRaiseLimit = value; }
} }
private double m_TerrainLowerLimit = 100; private double m_TerrainLowerLimit = 100;
public double TerrainLowerLimit public double TerrainLowerLimit
{ {
get { return m_TerrainLowerLimit; } get { return m_TerrainLowerLimit; }
set { m_TerrainLowerLimit = value; } set { m_TerrainLowerLimit = value; }
} }
private bool m_UseEstateSun = true; private bool m_UseEstateSun = true;
public bool UseEstateSun public bool UseEstateSun
{ {
get { return m_UseEstateSun; } get { return m_UseEstateSun; }
set { m_UseEstateSun = value; } set { m_UseEstateSun = value; }
} }
private bool m_FixedSun = false; private bool m_FixedSun = false;
public bool FixedSun public bool FixedSun
{ {
get { return m_FixedSun; } get { return m_FixedSun; }
set { m_FixedSun = value; } set { m_FixedSun = value; }
} }
private double m_SunPosition = 0.0; private double m_SunPosition = 0.0;
public double SunPosition public double SunPosition
{ {
get { return m_SunPosition; } get { return m_SunPosition; }
set { m_SunPosition = value; } set { m_SunPosition = value; }
} }
private LLUUID m_Covenant = LLUUID.Zero; private LLUUID m_Covenant = LLUUID.Zero;
public LLUUID Covenant public LLUUID Covenant
{ {
get { return m_Covenant; } get { return m_Covenant; }
set { m_Covenant = value; } set { m_Covenant = value; }
} }
} }
} }

View File

@ -116,7 +116,7 @@ namespace OpenSim.Framework.Servers
// we are either out of handlers or get back a // we are either out of handlers or get back a
// Handled or Detached // Handled or Detached
OSHttpHandlerResult rc = OSHttpHandlerResult.Unprocessed; OSHttpHandlerResult rc = OSHttpHandlerResult.Unprocessed;
foreach(OSHttpHandler h in handlers) foreach (OSHttpHandler h in handlers)
{ {
rc = h.Process(req); rc = h.Process(req);

View File

@ -31,18 +31,18 @@ using libsecondlife;
namespace OpenSim.Region.Environment.Interfaces namespace OpenSim.Region.Environment.Interfaces
{ {
public class Email public class Email
{ {
public string time; public string time;
public string sender; public string sender;
public string subject; public string subject;
public string message; public string message;
public int numLeft; public int numLeft;
} }
public interface IEmailModule : IRegionModule public interface IEmailModule : IRegionModule
{ {
void SendEmail(LLUUID objectID, string address, string subject, string body); void SendEmail(LLUUID objectID, string address, string subject, string body);
Email GetNextEmail(LLUUID objectID, string sender, string subject); Email GetNextEmail(LLUUID objectID, string sender, string subject);
} }
} }

View File

@ -33,6 +33,6 @@ namespace OpenSim.Region.Environment.Interfaces
{ {
public interface IScriptModule : IRegionModule public interface IScriptModule : IRegionModule
{ {
bool GetScriptRunning(LLUUID objectID, LLUUID itemID); bool GetScriptRunning(LLUUID objectID, LLUUID itemID);
} }
} }

View File

@ -1,3 +1,30 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System; using System;
using System.Reflection; using System.Reflection;
using System.Collections.Generic; using System.Collections.Generic;
@ -24,9 +51,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
// Scenes by Region Handle // Scenes by Region Handle
private Dictionary<ulong, Scene> m_Scenes = private Dictionary<ulong, Scene> m_Scenes =
new Dictionary<ulong, Scene>(); new Dictionary<ulong, Scene>();
private bool m_Enabled = false; private bool m_Enabled = false;
public void Initialise(Scene scene, IConfigSource config) public void Initialise(Scene scene, IConfigSource config)
{ {
@ -34,8 +61,8 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
IConfig startupConfig = m_Config.Configs["Startup"]; IConfig startupConfig = m_Config.Configs["Startup"];
m_Enabled = (startupConfig.GetString("emailmodule", m_Enabled = (startupConfig.GetString("emailmodule",
"DefaultEmailModule") == "DefaultEmailModule"); "DefaultEmailModule") == "DefaultEmailModule");
// It's a go! // It's a go!
if (m_Enabled) if (m_Enabled)
@ -79,12 +106,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
} }
public void SendEmail(LLUUID objectID, string address, string subject, string body) public void SendEmail(LLUUID objectID, string address, string subject, string body)
{ {
} }
public Email GetNextEmail(LLUUID objectID, string sender, string subject) public Email GetNextEmail(LLUUID objectID, string sender, string subject)
{ {
return null; return null;
} }
} }
} }

View File

@ -995,7 +995,7 @@ namespace OpenSim.Region.Environment.Scenes
else else
{ {
CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId); CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(avatarId);
if(profile == null || profile.RootFolder == null) if (profile == null || profile.RootFolder == null)
{ {
m_log.ErrorFormat( m_log.ErrorFormat(
"[PRIM INVENTORY]: " + "[PRIM INVENTORY]: " +
@ -1040,7 +1040,7 @@ namespace OpenSim.Region.Environment.Scenes
return; return;
} }
if(part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0) if (part.OwnerID != destPart.OwnerID && (part.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.AllowInventoryDrop) == 0)
{ {
// object cannot copy items to an object owned by a different owner // object cannot copy items to an object owned by a different owner
// unless llAllowInventoryDrop has been called // unless llAllowInventoryDrop has been called
@ -1049,7 +1049,7 @@ namespace OpenSim.Region.Environment.Scenes
} }
// must have both move and modify permission to put an item in an object // must have both move and modify permission to put an item in an object
if((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0 ) if ((part.OwnerMask & ((uint)PermissionMask.Move | (uint)PermissionMask.Modify)) == 0)
{ {
return; return;
} }
@ -1099,7 +1099,7 @@ namespace OpenSim.Region.Environment.Scenes
ScenePresence avatar; ScenePresence avatar;
if(TryGetAvatar(srcTaskItem.OwnerID, out avatar)) if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
{ {
destPart.GetProperties(avatar.ControllingClient); destPart.GetProperties(avatar.ControllingClient);
} }
@ -1108,7 +1108,7 @@ namespace OpenSim.Region.Environment.Scenes
public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items) public void MoveTaskInventoryItems(LLUUID destID, string category, SceneObjectPart host, List<LLUUID> items)
{ {
CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID); CachedUserInfo profile = CommsManager.UserProfileCacheService.GetUserDetails(destID);
if(profile == null || profile.RootFolder == null) if (profile == null || profile.RootFolder == null)
{ {
m_log.ErrorFormat( m_log.ErrorFormat(
"[PRIM INVENTORY]: " + "[PRIM INVENTORY]: " +
@ -1325,8 +1325,8 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="itemID"> </param> /// <param name="itemID"> </param>
/// <param name="localID"></param> /// <param name="localID"></param>
public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param) public void RezScript(LLUUID srcId, SceneObjectPart srcPart, LLUUID destId, int pin, int running, int start_param)
{ {
TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId); TaskInventoryItem srcTaskItem = srcPart.GetInventoryItem(srcId);
if (srcTaskItem == null) if (srcTaskItem == null)
{ {
@ -1348,29 +1348,29 @@ namespace OpenSim.Region.Environment.Scenes
destId); destId);
return; return;
} }
// Must own the object, and have modify rights // Must own the object, and have modify rights
if(srcPart.OwnerID != destPart.OwnerID) if (srcPart.OwnerID != destPart.OwnerID)
return; return;
if((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0) if ((destPart.OwnerMask & (uint)PermissionMask.Modify) == 0)
return; return;
if (destPart.ScriptAccessPin != pin) if (destPart.ScriptAccessPin != pin)
{ {
m_log.WarnFormat( m_log.WarnFormat(
"[PRIM INVENTORY]: " + "[PRIM INVENTORY]: " +
"Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}", "Script in object {0} : {1}, attempted to load script {2} : {3} into object {4} : {5} with invalid pin {6}",
srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin); srcPart.Name, srcId, srcTaskItem.Name, srcTaskItem.ItemID, destPart.Name, destId, pin);
// the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL - // the LSL Wiki says we are supposed to shout on the DEBUG_CHANNEL -
// "Object: Task Object trying to illegally load script onto task Other_Object!" // "Object: Task Object trying to illegally load script onto task Other_Object!"
// How do we shout from in here? // How do we shout from in here?
return; return;
} }
TaskInventoryItem destTaskItem = new TaskInventoryItem(); TaskInventoryItem destTaskItem = new TaskInventoryItem();
destTaskItem.ItemID = LLUUID.Random(); destTaskItem.ItemID = LLUUID.Random();
destTaskItem.CreatorID = srcTaskItem.CreatorID; destTaskItem.CreatorID = srcTaskItem.CreatorID;
destTaskItem.AssetID = srcTaskItem.AssetID; destTaskItem.AssetID = srcTaskItem.AssetID;
destTaskItem.GroupID = destPart.GroupID; destTaskItem.GroupID = destPart.GroupID;
@ -1405,25 +1405,25 @@ namespace OpenSim.Region.Environment.Scenes
destTaskItem.Name = srcTaskItem.Name; destTaskItem.Name = srcTaskItem.Name;
destTaskItem.InvType = srcTaskItem.InvType; destTaskItem.InvType = srcTaskItem.InvType;
destTaskItem.Type = srcTaskItem.Type; destTaskItem.Type = srcTaskItem.Type;
destPart.AddInventoryItemExclusive(destTaskItem); destPart.AddInventoryItemExclusive(destTaskItem);
if (running > 0) if (running > 0)
{ {
if (ExternalChecks.ExternalChecksCanRunScript(destTaskItem.AssetID, destPart.UUID, destPart.OwnerID)) if (ExternalChecks.ExternalChecksCanRunScript(destTaskItem.AssetID, destPart.UUID, destPart.OwnerID))
{ {
destPart.CreateScriptInstance(destTaskItem, 0, false); destPart.CreateScriptInstance(destTaskItem, 0, false);
} }
} }
ScenePresence avatar; ScenePresence avatar;
if(TryGetAvatar(srcTaskItem.OwnerID, out avatar)) if (TryGetAvatar(srcTaskItem.OwnerID, out avatar))
{ {
destPart.GetProperties(avatar.ControllingClient); destPart.GetProperties(avatar.ControllingClient);
} }
} }
/// <summary> /// <summary>
/// Called when an object is removed from the environment into inventory. /// Called when an object is removed from the environment into inventory.
/// </summary> /// </summary>
@ -1497,7 +1497,7 @@ namespace OpenSim.Region.Environment.Scenes
m_inventoryTicker.Elapsed += InventoryRunDeleteTimer; m_inventoryTicker.Elapsed += InventoryRunDeleteTimer;
} }
lock(m_inventoryDeletes) lock (m_inventoryDeletes)
{ {
DeleteToInventoryHolder dtis = new DeleteToInventoryHolder(); DeleteToInventoryHolder dtis = new DeleteToInventoryHolder();
dtis.DeRezPacket = DeRezPacket; dtis.DeRezPacket = DeRezPacket;
@ -2246,7 +2246,7 @@ namespace OpenSim.Region.Environment.Scenes
public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID) public void GetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID)
{ {
IScriptModule scriptModule = RequestModuleInterface<IScriptModule>(); IScriptModule scriptModule = RequestModuleInterface<IScriptModule>();
if(scriptModule == null) if (scriptModule == null)
return; return;
controllingClient.SendScriptRunningReply(objectID, itemID, controllingClient.SendScriptRunningReply(objectID, itemID,
@ -2256,10 +2256,10 @@ namespace OpenSim.Region.Environment.Scenes
public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running) public void SetScriptRunning(IClientAPI controllingClient, LLUUID objectID, LLUUID itemID, bool running)
{ {
SceneObjectPart part = GetSceneObjectPart(objectID); SceneObjectPart part = GetSceneObjectPart(objectID);
if(part == null) if (part == null)
return; return;
if(running) if (running)
EventManager.TriggerStartScript(part.LocalId, itemID); EventManager.TriggerStartScript(part.LocalId, itemID);
else else
EventManager.TriggerStopScript(part.LocalId, itemID); EventManager.TriggerStopScript(part.LocalId, itemID);

View File

@ -292,7 +292,7 @@ namespace OpenSim.Region.Environment.Scenes
public void AddInventoryItemExclusive(TaskInventoryItem item) public void AddInventoryItemExclusive(TaskInventoryItem item)
{ {
List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values); List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values);
foreach(TaskInventoryItem i in il) foreach (TaskInventoryItem i in il)
{ {
if (i.Name == item.Name) if (i.Name == item.Name)
{ {

View File

@ -1,5 +1,3 @@
#region Header
/* /*
* Copyright (c) Contributors, http://opensimulator.org/ * Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders. * See CONTRIBUTORS.TXT for a full list of copyright holders.
@ -27,8 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#endregion Header
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;

View File

@ -1093,8 +1093,8 @@ namespace OpenSim.Region.Environment.Scenes
); );
//look for prims with explicit sit targets that are available //look for prims with explicit sit targets that are available
foreach(SceneObjectPart part in partArray) { foreach (SceneObjectPart part in partArray)
{
// Is a sit target available? // Is a sit target available?
Vector3 avSitOffSet = part.GetSitTargetPosition(); Vector3 avSitOffSet = part.GetSitTargetPosition();
Quaternion avSitOrientation = part.GetSitTargetOrientation(); Quaternion avSitOrientation = part.GetSitTargetOrientation();

View File

@ -3211,7 +3211,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if(add != 0) if (add != 0)
m_host.ParentGroup.RootPart.AllowedDrop = true; m_host.ParentGroup.RootPart.AllowedDrop = true;
else else
m_host.ParentGroup.RootPart.AllowedDrop = false; m_host.ParentGroup.RootPart.AllowedDrop = false;
@ -4408,7 +4408,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{ {
if(inv.Value.Name == name) if (inv.Value.Name == name)
return inv.Key; return inv.Key;
} }
return LLUUID.Zero; return LLUUID.Zero;
@ -4419,7 +4419,7 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
LLUUID destID; LLUUID destID;
if(!LLUUID.TryParse(destination, out destID)) if (!LLUUID.TryParse(destination, out destID))
return; return;
List<LLUUID> itemList = new List<LLUUID>(); List<LLUUID> itemList = new List<LLUUID>();
@ -4427,19 +4427,19 @@ namespace OpenSim.Region.ScriptEngine.Common
foreach (Object item in inventory.Data) foreach (Object item in inventory.Data)
{ {
LLUUID itemID; LLUUID itemID;
if(LLUUID.TryParse(item.ToString(), out itemID)) if (LLUUID.TryParse(item.ToString(), out itemID))
{ {
itemList.Add(itemID); itemList.Add(itemID);
} }
else else
{ {
itemID = GetTaskInventoryItem(item.ToString()); itemID = GetTaskInventoryItem(item.ToString());
if(itemID != LLUUID.Zero) if (itemID != LLUUID.Zero)
itemList.Add(itemID); itemList.Add(itemID);
} }
} }
if(itemList.Count == 0) if (itemList.Count == 0)
return; return;
m_ScriptEngine.World.MoveTaskInventoryItems(destID, category, m_host, itemList); m_ScriptEngine.World.MoveTaskInventoryItems(destID, category, m_host, itemList);
@ -4686,7 +4686,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
m_host.ScriptAccessPin = pin; m_host.ScriptAccessPin = pin;
} }
public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param)
@ -4701,38 +4701,38 @@ namespace OpenSim.Region.ScriptEngine.Common
llSay(0, "Could not parse key " + target); llSay(0, "Could not parse key " + target);
return; return;
} }
// target must be a different prim than the one containing the script // target must be a different prim than the one containing the script
if (m_host.UUID == destId) if (m_host.UUID == destId)
{ {
return; return;
} }
// copy the first script found with this inventory name // copy the first script found with this inventory name
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{ {
if (inv.Value.Name == name) if (inv.Value.Name == name)
{ {
// make sure the object is a script // make sure the object is a script
if(10 == inv.Value.Type) if (10 == inv.Value.Type)
{ {
found = true; found = true;
srcId = inv.Key; srcId = inv.Key;
break; break;
} }
} }
} }
if (!found) if (!found)
{ {
llSay(0, "Could not find script " + name); llSay(0, "Could not find script " + name);
return; return;
} }
// the rest of the permission checks are done in RezScript, so check the pin there as well // the rest of the permission checks are done in RezScript, so check the pin there as well
World.RezScript(srcId, m_host, destId, pin, running, start_param); World.RezScript(srcId, m_host, destId, pin, running, start_param);
// this will cause the delay even if the script pin or permissions were wrong - seems ok // this will cause the delay even if the script pin or permissions were wrong - seems ok
System.Threading.Thread.Sleep(3000); System.Threading.Thread.Sleep(3000);
} }
// remote_data(integer type, key channel, key message_id, string sender, integer ival, string sval) // remote_data(integer type, key channel, key message_id, string sender, integer ival, string sval)
@ -5072,15 +5072,15 @@ namespace OpenSim.Region.ScriptEngine.Common
shapeBlock.ObjectLocalID = m_host.LocalId; shapeBlock.ObjectLocalID = m_host.LocalId;
shapeBlock.PathScaleX = 100; shapeBlock.PathScaleX = 100;
shapeBlock.PathScaleY = 150; shapeBlock.PathScaleY = 150;
if (type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_CYLINDER && if (type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_CYLINDER &&
type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_PLANE && type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_PLANE &&
type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE && type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE &&
type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_TORUS) type != (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_TORUS)
{ {
// default // default
type = (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE; type = (int)BuiltIn_Commands_BaseClass.PRIM_SCULPT_TYPE_SPHERE;
} }
// retain pathcurve // retain pathcurve
shapeBlock.PathCurve = m_host.Shape.PathCurve; shapeBlock.PathCurve = m_host.Shape.PathCurve;
@ -5157,7 +5157,7 @@ namespace OpenSim.Region.ScriptEngine.Common
SetRot(part, q); SetRot(part, q);
break; break;
case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE: case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE:
if (remain < 3) if (remain < 3)
return; return;
@ -5175,7 +5175,7 @@ namespace OpenSim.Region.ScriptEngine.Common
LSL_Types.Vector3 holesize; LSL_Types.Vector3 holesize;
LSL_Types.Vector3 profilecut; LSL_Types.Vector3 profilecut;
switch(code) switch (code)
{ {
case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX: case (int)BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX:
if (remain < 6) if (remain < 6)

View File

@ -1295,7 +1295,7 @@ namespace OpenSim.Region.ScriptEngine.Common
public override bool Equals(Object o) public override bool Equals(Object o)
{ {
if(!(o is LSLInteger)) if (!(o is LSLInteger))
return false; return false;
return value == ((LSLInteger)o).value; return value == ((LSLInteger)o).value;
} }
@ -1452,7 +1452,7 @@ namespace OpenSim.Region.ScriptEngine.Common
public override bool Equals(Object o) public override bool Equals(Object o)
{ {
if(!(o is LSLFloat)) if (!(o is LSLFloat))
return false; return false;
return value == ((LSLFloat)o).value; return value == ((LSLFloat)o).value;
} }

View File

@ -1,3 +1,30 @@
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the OpenSim Project nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;using Tools; using System;using Tools;
//%+STRING_CONSTANT+3 //%+STRING_CONSTANT+3
public class STRING_CONSTANT : TOKEN{ public class STRING_CONSTANT : TOKEN{

View File

@ -132,7 +132,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
int eventFlags = m_scriptEngine.m_ScriptManager.GetStateEventFlags(localID, itemID); int eventFlags = m_scriptEngine.m_ScriptManager.GetStateEventFlags(localID, itemID);
m_host.SetScriptEvents(itemID, eventFlags); m_host.SetScriptEvents(itemID, eventFlags);
m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
if(postOnRez) if (postOnRez)
{ {
m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(startParam) }); m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(startParam) });
} }

View File

@ -2044,7 +2044,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>();
if(emailModule == null) if (emailModule == null)
return; return;
emailModule.SendEmail(m_host.UUID, address, subject, message); emailModule.SendEmail(m_host.UUID, address, subject, message);
@ -2054,13 +2054,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>();
if(emailModule == null) if (emailModule == null)
return; return;
Email email; Email email;
email = emailModule.GetNextEmail(m_host.UUID, address, subject); email = emailModule.GetNextEmail(m_host.UUID, address, subject);
if(email == null) if (email == null)
return; return;
m_ScriptEngine.PostObjectEvent(m_host.LocalId, m_ScriptEngine.PostObjectEvent(m_host.LocalId,
@ -3163,7 +3163,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if(add != 0) if (add != 0)
m_host.ParentGroup.RootPart.AllowedDrop = true; m_host.ParentGroup.RootPart.AllowedDrop = true;
else else
m_host.ParentGroup.RootPart.AllowedDrop = false; m_host.ParentGroup.RootPart.AllowedDrop = false;
@ -4283,7 +4283,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
{ {
if(inv.Value.Name == name) if (inv.Value.Name == name)
return inv.Key; return inv.Key;
} }
return LLUUID.Zero; return LLUUID.Zero;
@ -4294,7 +4294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
LLUUID destID; LLUUID destID;
if(!LLUUID.TryParse(destination, out destID)) if (!LLUUID.TryParse(destination, out destID))
return; return;
List<LLUUID> itemList = new List<LLUUID>(); List<LLUUID> itemList = new List<LLUUID>();
@ -4302,19 +4302,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
foreach (Object item in inventory.Data) foreach (Object item in inventory.Data)
{ {
LLUUID itemID; LLUUID itemID;
if(LLUUID.TryParse(item.ToString(), out itemID)) if (LLUUID.TryParse(item.ToString(), out itemID))
{ {
itemList.Add(itemID); itemList.Add(itemID);
} }
else else
{ {
itemID = GetTaskInventoryItem(item.ToString()); itemID = GetTaskInventoryItem(item.ToString());
if(itemID != LLUUID.Zero) if (itemID != LLUUID.Zero)
itemList.Add(itemID); itemList.Add(itemID);
} }
} }
if(itemList.Count == 0) if (itemList.Count == 0)
return; return;
m_ScriptEngine.World.MoveTaskInventoryItems(destID, category, m_host, itemList); m_ScriptEngine.World.MoveTaskInventoryItems(destID, category, m_host, itemList);
@ -4985,7 +4985,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
LSL_Types.Vector3 holesize; LSL_Types.Vector3 holesize;
LSL_Types.Vector3 profilecut; LSL_Types.Vector3 profilecut;
switch(code) switch (code)
{ {
case (int)ScriptBaseClass.PRIM_TYPE_BOX: case (int)ScriptBaseClass.PRIM_TYPE_BOX:
if (remain < 6) if (remain < 6)

View File

@ -331,12 +331,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine
Object[] parms = new Object[] Object[] parms = new Object[]
{ localID, itemID, script, startParam, postOnRez}; { localID, itemID, script, startParam, postOnRez};
lock(m_CompileQueue) lock (m_CompileQueue)
{ {
m_CompileQueue.Enqueue(parms); m_CompileQueue.Enqueue(parms);
if(m_CurrentCompile == null) if (m_CurrentCompile == null)
{ {
if(m_firstStart) if (m_firstStart)
{ {
m_firstStart = false; m_firstStart = false;
m_CurrentCompile = m_ThreadPool.QueueWorkItem( m_CurrentCompile = m_ThreadPool.QueueWorkItem(
@ -355,9 +355,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
{ {
Thread.Sleep(30000); Thread.Sleep(30000);
lock(m_CompileQueue) lock (m_CompileQueue)
{ {
if(m_CompileQueue.Count > 0) if (m_CompileQueue.Count > 0)
{ {
m_CurrentCompile = m_ThreadPool.QueueWorkItem( m_CurrentCompile = m_ThreadPool.QueueWorkItem(
new WorkItemCallback( new WorkItemCallback(
@ -374,10 +374,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine
public Object DoOnRezScriptQueue(Object dummy) public Object DoOnRezScriptQueue(Object dummy)
{ {
Object o; Object o;
lock(m_CompileQueue) lock (m_CompileQueue)
{ {
o = m_CompileQueue.Dequeue(); o = m_CompileQueue.Dequeue();
if(o == null) if (o == null)
{ {
m_CurrentCompile = null; m_CurrentCompile = null;
return null; return null;
@ -386,9 +386,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
DoOnRezScript(o); DoOnRezScript(o);
lock(m_CompileQueue) lock (m_CompileQueue)
{ {
if(m_CompileQueue.Count > 0) if (m_CompileQueue.Count > 0)
{ {
m_CurrentCompile = m_ThreadPool.QueueWorkItem( m_CurrentCompile = m_ThreadPool.QueueWorkItem(
new WorkItemCallback( new WorkItemCallback(
@ -1056,7 +1056,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
{ {
m_RunEvents = false; m_RunEvents = false;
Start(); Start();
if(postOnRez) if (postOnRez)
PostEvent(new EventParams("on_rez", PostEvent(new EventParams("on_rez",
new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0]));
} }
@ -1078,7 +1078,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
Start(); Start();
PostEvent(new EventParams("state_entry", PostEvent(new EventParams("state_entry",
new Object[0], new DetectParams[0])); new Object[0], new DetectParams[0]));
if(postOnRez) if (postOnRez)
PostEvent(new EventParams("on_rez", PostEvent(new EventParams("on_rez",
new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0]));
@ -1090,7 +1090,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
Start(); Start();
PostEvent(new EventParams("state_entry", PostEvent(new EventParams("state_entry",
new Object[0], new DetectParams[0])); new Object[0], new DetectParams[0]));
if(postOnRez) if (postOnRez)
PostEvent(new EventParams("on_rez", PostEvent(new EventParams("on_rez",
new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0]));
} }
@ -1102,7 +1102,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
PostEvent(new EventParams("state_entry", PostEvent(new EventParams("state_entry",
new Object[0], new DetectParams[0])); new Object[0], new DetectParams[0]));
if(postOnRez) if (postOnRez)
PostEvent(new EventParams("on_rez", PostEvent(new EventParams("on_rez",
new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0]));
} }
@ -1215,7 +1215,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
// m_Engine.Log.DebugFormat("[XEngine] Posted event {2} in state {3} to {0}.{1}", // m_Engine.Log.DebugFormat("[XEngine] Posted event {2} in state {3} to {0}.{1}",
// m_PrimName, m_ScriptName, data.EventName, m_State); // m_PrimName, m_ScriptName, data.EventName, m_State);
if(!Running) if (!Running)
return; return;
lock (m_EventQueue) lock (m_EventQueue)
@ -1393,7 +1393,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
m_Script.ResetVars(); m_Script.ResetVars();
m_Engine.m_AsyncCommands.RemoveScript(m_LocalID, m_ItemID); m_Engine.m_AsyncCommands.RemoveScript(m_LocalID, m_ItemID);
if(m_CurrentEvent != "state_entry") if (m_CurrentEvent != "state_entry")
{ {
PostEvent(new EventParams("state_entry", PostEvent(new EventParams("state_entry",
new Object[0], new DetectParams[0])); new Object[0], new DetectParams[0]));