Another small tweak to image sending.

Implemented a few ll Functions, llSetObjectName llGetObjectName, llLoadURL (all currently untested).
afrisby
MW 2007-08-27 10:34:28 +00:00
parent 67d2571301
commit 4c3be4e91f
5 changed files with 20 additions and 5 deletions

View File

@ -230,7 +230,7 @@ namespace OpenSim.Framework.Communications.Caches
UsersSent.Add(sender.request.ImageInfo.FullID, 1); UsersSent.Add(sender.request.ImageInfo.FullID, 1);
} }
if (TimesTextureSent[sender.request.RequestUser.AgentId][sender.request.ImageInfo.FullID] < 1000) if (TimesTextureSent[sender.request.RequestUser.AgentId][sender.request.ImageInfo.FullID] < 1200)
{ {
bool finished = sender.SendTexture(); bool finished = sender.SendTexture();
if (finished) if (finished)
@ -699,6 +699,7 @@ namespace OpenSim.Framework.Communications.Caches
{ {
SendPacket(); SendPacket();
counter++; counter++;
if ((request.PacketCounter >= request.NumPackets) | counter > 100 | (request.NumPackets == 1)) if ((request.PacketCounter >= request.NumPackets) | counter > 100 | (request.NumPackets == 1))
{ {
return true; return true;

View File

@ -1099,6 +1099,14 @@ namespace OpenSim.Region.Environment.Scenes
#endregion #endregion
public void SendUrlToUser(LLUUID avatarID, string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, string url)
{
if (Avatars.ContainsKey(avatarID))
{
Avatars[avatarID].ControllingClient.SendLoadURL(objectname, objectID, ownerID, groupOwned, message, url);
}
}
#region Alert Methods #region Alert Methods
void SendPermissionAlert(LLUUID user, string reason) void SendPermissionAlert(LLUUID user, string reason)
@ -1106,6 +1114,7 @@ namespace OpenSim.Region.Environment.Scenes
SendAlertToUser(user, reason, false); SendAlertToUser(user, reason, false);
} }
public void SendGeneralAlert(string message) public void SendGeneralAlert(string message)
{ {
foreach (ScenePresence presence in this.Avatars.Values) foreach (ScenePresence presence in this.Avatars.Values)

View File

@ -7,7 +7,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
{ {
public interface IScriptHost public interface IScriptHost
{ {
string Name { get; } string Name { get; set;}
LLUUID UUID { get; } LLUUID UUID { get; }
LLVector3 AbsolutePosition { get; } LLVector3 AbsolutePosition { get; }
void SetText(string text, Axiom.Math.Vector3 color, double alpha); void SetText(string text, Axiom.Math.Vector3 color, double alpha);

View File

@ -12,6 +12,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
public string Name public string Name
{ {
get { return "Object"; } get { return "Object"; }
set { }
} }
public LLUUID UUID public LLUUID UUID

View File

@ -458,8 +458,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
public List<string> llListInsertList(List<string> dest, List<string> src, int start) public List<string> llListInsertList(List<string> dest, List<string> src, int start)
{ return new List<string>(); } { return new List<string>(); }
public int llListFindList(List<string> src, List<string> test) { return 0; } public int llListFindList(List<string> src, List<string> test) { return 0; }
public string llGetObjectName() { return ""; } public string llGetObjectName() { return m_host.Name; }
public void llSetObjectName(string name) { } public void llSetObjectName(string name) { m_host.Name = name; }
public string llGetDate() public string llGetDate()
{ {
@ -584,7 +584,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
public void llForceMouselook(int mouselook) { } public void llForceMouselook(int mouselook) { }
public double llGetObjectMass(string id) { return 0; } public double llGetObjectMass(string id) { return 0; }
public void llListReplaceList() { } public void llListReplaceList() { }
public void llLoadURL(string avatar_id, string message, string url) { } public void llLoadURL(string avatar_id, string message, string url)
{
LLUUID avatarId = new LLUUID(avatar_id);
m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, LLUUID.Zero, false, message, url);
}
public void llParcelMediaCommandList(List<string> commandList) { } public void llParcelMediaCommandList(List<string> commandList) { }
public void llParcelMediaQuery() { } public void llParcelMediaQuery() { }