Clean up some of the nonsensical use of ScriptSleep

inside our LSL-C# wrapper subroutines.
0.6.0-stable
Charles Krinke 2008-09-07 04:00:44 +00:00
parent b9acf3ac5e
commit 94195c4927
1 changed files with 1 additions and 56 deletions

View File

@ -1488,7 +1488,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
SetTexture(m_host, texture, face); SetTexture(m_host, texture, face);
// ScriptSleep(200);
} }
private void SetTexture(SceneObjectPart part, string texture, int face) private void SetTexture(SceneObjectPart part, string texture, int face)
@ -1533,7 +1532,6 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
ScaleTexture(m_host, u, v, face); ScaleTexture(m_host, u, v, face);
// ScriptSleep(200);
} }
private void ScaleTexture(SceneObjectPart part, double u, double v, int face) private void ScaleTexture(SceneObjectPart part, double u, double v, int face)
@ -1569,7 +1567,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
OffsetTexture(m_host, u, v, face); OffsetTexture(m_host, u, v, face);
// ScriptSleep(200);
} }
private void OffsetTexture(SceneObjectPart part, double u, double v, int face) private void OffsetTexture(SceneObjectPart part, double u, double v, int face)
@ -1605,7 +1602,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
RotateTexture(m_host, rotation, face); RotateTexture(m_host, rotation, face);
// ScriptSleep(200);
} }
private void RotateTexture(SceneObjectPart part, double rotation, int face) private void RotateTexture(SceneObjectPart part, double rotation, int face)
@ -1657,10 +1653,7 @@ namespace OpenSim.Region.ScriptEngine.Common
public void llSetPos(LSL_Types.Vector3 pos) public void llSetPos(LSL_Types.Vector3 pos)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
SetPos(m_host, pos); SetPos(m_host, pos);
ScriptSleep(200);
} }
private void SetPos(SceneObjectPart part, LSL_Types.Vector3 targetPos) private void SetPos(SceneObjectPart part, LSL_Types.Vector3 targetPos)
@ -1710,10 +1703,7 @@ namespace OpenSim.Region.ScriptEngine.Common
public void llSetRot(LSL_Types.Quaternion rot) public void llSetRot(LSL_Types.Quaternion rot)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
SetRot(m_host, rot); SetRot(m_host, rot);
ScriptSleep(200);
} }
private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot) private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot)
@ -1992,7 +1982,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
m_host.PreloadSound(sound); m_host.PreloadSound(sound);
// ScriptSleep(1000);
} }
/// <summary> /// <summary>
@ -2276,28 +2265,24 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
Deprecated("llMakeExplosion"); Deprecated("llMakeExplosion");
// ScriptSleep(100);
} }
public void llMakeFountain() public void llMakeFountain()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
Deprecated("llMakeFountain"); Deprecated("llMakeFountain");
// ScriptSleep(100);
} }
public void llMakeSmoke() public void llMakeSmoke()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
Deprecated("llMakeSmoke"); Deprecated("llMakeSmoke");
// ScriptSleep(100);
} }
public void llMakeFire() public void llMakeFire()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
Deprecated("llMakeFire"); Deprecated("llMakeFire");
// ScriptSleep(100);
} }
public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param) public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param)
@ -2354,7 +2339,6 @@ namespace OpenSim.Region.ScriptEngine.Common
found = true; found = true;
// Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
ScriptSleep((int)((groupmass * velmag) / 10)); ScriptSleep((int)((groupmass * velmag) / 10));
// ScriptSleep(100);
break; break;
} }
} }
@ -2537,7 +2521,6 @@ namespace OpenSim.Region.ScriptEngine.Common
return; return;
emailModule.SendEmail(m_host.UUID, address, subject, message); emailModule.SendEmail(m_host.UUID, address, subject, message);
// ScriptSleep(20000);
} }
public void llGetNextEmail(string address, string subject) public void llGetNextEmail(string address, string subject)
@ -2979,7 +2962,7 @@ namespace OpenSim.Region.ScriptEngine.Common
parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected); parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
parentPrim.GetProperties(client); parentPrim.GetProperties(client);
ScriptSleep(1000); ScriptSleep(500);
} }
public void llBreakLink(int linknum) public void llBreakLink(int linknum)
@ -3141,7 +3124,6 @@ namespace OpenSim.Region.ScriptEngine.Common
// destination is an object // destination is an object
World.MoveTaskInventoryItem(destId, m_host, objId); World.MoveTaskInventoryItem(destId, m_host, objId);
} }
// ScriptSleep(3000);
} }
public void llRemoveInventory(string name) public void llRemoveInventory(string name)
@ -3180,7 +3162,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llRequestAgentData"); NotImplemented("llRequestAgentData");
// ScriptSleep(100);
return String.Empty; return String.Empty;
} }
@ -3214,12 +3195,9 @@ namespace OpenSim.Region.ScriptEngine.Common
m_Dataserver.DataserverReply(i.ToString(), m_Dataserver.DataserverReply(i.ToString(),
reply); reply);
}, false); }, false);
// ScriptSleep(1000);
return tid.ToString(); return tid.ToString();
} }
} }
// ScriptSleep(1000);
return String.Empty; return String.Empty;
} }
@ -4439,7 +4417,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
m_host.AdjustSoundGain(volume); m_host.AdjustSoundGain(volume);
// ScriptSleep(100);
} }
public void llSetSoundQueueing(int queue) public void llSetSoundQueueing(int queue)
@ -5043,7 +5020,6 @@ namespace OpenSim.Region.ScriptEngine.Common
land.ParcelAccessList.Add(entry); land.ParcelAccessList.Add(entry);
} }
} }
// ScriptSleep(100);
} }
public void llSetTouchText(string text) public void llSetTouchText(string text)
@ -5131,7 +5107,6 @@ namespace OpenSim.Region.ScriptEngine.Common
buts[i] = buttons.Data[i].ToString(); buts[i] = buttons.Data[i].ToString();
} }
World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
// ScriptSleep(1000);
} }
public void llVolumeDetect(int detect) public void llVolumeDetect(int detect)
@ -5206,7 +5181,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
Deprecated("llRemoteLoadScript"); Deprecated("llRemoteLoadScript");
// ScriptSleep(3000);
} }
public void llSetRemoteScriptAccessPin(int pin) public void llSetRemoteScriptAccessPin(int pin)
@ -5257,8 +5231,6 @@ namespace OpenSim.Region.ScriptEngine.Common
// 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
ScriptSleep(3000);
} }
public void llOpenRemoteDataChannel() public void llOpenRemoteDataChannel()
@ -5271,14 +5243,12 @@ namespace OpenSim.Region.ScriptEngine.Common
object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) };
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj);
} }
// ScriptSleep(1000);
} }
public string llSendRemoteData(string channel, string dest, int idata, string sdata) public string llSendRemoteData(string channel, string dest, int idata, string sdata)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
// ScriptSleep(3000);
return (xmlrpcMod.SendRemoteData(m_localID, m_itemID, channel, dest, idata, sdata)).ToString(); return (xmlrpcMod.SendRemoteData(m_localID, m_itemID, channel, dest, idata, sdata)).ToString();
} }
@ -5287,7 +5257,6 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata);
// ScriptSleep(3000);
} }
public void llCloseRemoteDataChannel(string channel) public void llCloseRemoteDataChannel(string channel)
@ -5295,7 +5264,6 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
xmlrpcMod.CloseXMLRPCChannel(channel); xmlrpcMod.CloseXMLRPCChannel(channel);
// ScriptSleep(1000);
} }
public string llMD5String(string src, int nonce) public string llMD5String(string src, int nonce)
@ -5989,7 +5957,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
Deprecated("llXorBase64Strings"); Deprecated("llXorBase64Strings");
// ScriptSleep(300);
} }
public void llRemoteDataSetRegion() public void llRemoteDataSetRegion()
@ -6038,7 +6005,6 @@ namespace OpenSim.Region.ScriptEngine.Common
return; return;
} }
World.SetLandMusicURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url); World.SetLandMusicURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url);
// ScriptSleep(2000);
} }
public void osSetParcelMediaURL(string url) public void osSetParcelMediaURL(string url)
@ -6710,7 +6676,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
// ScriptSleep(200);
} }
// <summary> // <summary>
@ -7031,7 +6996,6 @@ namespace OpenSim.Region.ScriptEngine.Common
case 5: // DATA_SIM_POS case 5: // DATA_SIM_POS
if (info == null) if (info == null)
{ {
// ScriptSleep(1000);
return UUID.Zero.ToString(); return UUID.Zero.ToString();
} }
reply = new LSL_Types.Vector3( reply = new LSL_Types.Vector3(
@ -7048,7 +7012,6 @@ namespace OpenSim.Region.ScriptEngine.Common
case 7: // DATA_SIM_RATING case 7: // DATA_SIM_RATING
if (info == null) if (info == null)
{ {
// ScriptSleep(1000);
return UUID.Zero.ToString(); return UUID.Zero.ToString();
} }
int access = info.RegionSettings.Maturity; int access = info.RegionSettings.Maturity;
@ -7063,7 +7026,6 @@ namespace OpenSim.Region.ScriptEngine.Common
reply = m_ScriptEngine.World.GetSimulatorVersion(); reply = m_ScriptEngine.World.GetSimulatorVersion();
break; break;
default: default:
// ScriptSleep(1000);
return UUID.Zero.ToString(); // Raise no event return UUID.Zero.ToString(); // Raise no event
} }
UUID rq = UUID.Random(); UUID rq = UUID.Random();
@ -7074,7 +7036,6 @@ namespace OpenSim.Region.ScriptEngine.Common
m_ScriptEngine.m_ASYNCLSLCommandManager. m_ScriptEngine.m_ASYNCLSLCommandManager.
m_Dataserver.DataserverReply(rq.ToString(), reply); m_Dataserver.DataserverReply(rq.ToString(), reply);
// ScriptSleep(1000);
return tid.ToString(); return tid.ToString();
} }
catch(Exception e) catch(Exception e)
@ -7189,7 +7150,6 @@ namespace OpenSim.Region.ScriptEngine.Common
UUID avatarId = new UUID(avatar_id); UUID avatarId = new UUID(avatar_id);
m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message,
url); url);
// ScriptSleep(10000);
} }
public void llParcelMediaCommandList(LSL_Types.list commandList) public void llParcelMediaCommandList(LSL_Types.list commandList)
@ -7313,7 +7273,6 @@ namespace OpenSim.Region.ScriptEngine.Common
} }
} }
// ScriptSleep(2000);
return list; return list;
} }
@ -7322,7 +7281,6 @@ namespace OpenSim.Region.ScriptEngine.Common
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
Int64 tmp = 0; Int64 tmp = 0;
Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp);
// ScriptSleep(1000);
return Convert.ToInt32(tmp); return Convert.ToInt32(tmp);
} }
@ -7391,14 +7349,12 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llSetPrimURL"); NotImplemented("llSetPrimURL");
// ScriptSleep(2000);
} }
public void llRefreshPrimURL() public void llRefreshPrimURL()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llRefreshPrimURL"); NotImplemented("llRefreshPrimURL");
// ScriptSleep(20000);
} }
public string llEscapeURL(string url) public string llEscapeURL(string url)
@ -7431,7 +7387,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llMapDestination"); NotImplemented("llMapDestination");
// ScriptSleep(1000);
} }
public void llAddToLandBanList(string avatar, double hours) public void llAddToLandBanList(string avatar, double hours)
@ -7450,7 +7405,6 @@ namespace OpenSim.Region.ScriptEngine.Common
land.ParcelAccessList.Add(entry); land.ParcelAccessList.Add(entry);
} }
} }
// ScriptSleep(100);
} }
public void llRemoveFromLandPassList(string avatar) public void llRemoveFromLandPassList(string avatar)
@ -7472,7 +7426,6 @@ namespace OpenSim.Region.ScriptEngine.Common
} }
} }
} }
// ScriptSleep(100);
} }
public void llRemoveFromLandBanList(string avatar) public void llRemoveFromLandBanList(string avatar)
@ -7494,7 +7447,6 @@ namespace OpenSim.Region.ScriptEngine.Common
} }
} }
} }
// ScriptSleep(100);
} }
public void llSetCameraParams(LSL_Types.list rules) public void llSetCameraParams(LSL_Types.list rules)
@ -7702,7 +7654,6 @@ namespace OpenSim.Region.ScriptEngine.Common
} }
} }
} }
// ScriptSleep(100);
} }
public void llResetLandPassList() public void llResetLandPassList()
@ -7719,7 +7670,6 @@ namespace OpenSim.Region.ScriptEngine.Common
} }
} }
} }
// ScriptSleep(100);
} }
public LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) public LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide)
@ -7798,7 +7748,6 @@ namespace OpenSim.Region.ScriptEngine.Common
ret.Add(d.Value); ret.Add(d.Value);
} }
} }
// ScriptSleep(2000);
return ret; return ret;
} }
@ -7895,7 +7844,6 @@ namespace OpenSim.Region.ScriptEngine.Common
return; return;
SetTexture(part, texture, face); SetTexture(part, texture, face);
// ScriptSleep(200);
} }
public string llStringTrim(string src, int type) public string llStringTrim(string src, int type)
@ -8039,7 +7987,6 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
return 0; return 0;
} }
// ScriptSleep(100);
} }
public string llGetNotecardLine(string name, int line) public string llGetNotecardLine(string name, int line)
@ -8057,12 +8004,10 @@ namespace OpenSim.Region.ScriptEngine.Common
(line >= 0) && (line >= 0) &&
(line < notecardLines.Length)) (line < notecardLines.Length))
{ {
// ScriptSleep(100);
return notecardLines[line]; return notecardLines[line];
} }
else else
{ {
// ScriptSleep(100);
return String.Empty; return String.Empty;
} }
} }