mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
merge
This commit is contained in:
@@ -3534,32 +3534,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s))
|
||||
return;
|
||||
|
||||
float dist = (float)llVecDist(llGetPos(), pos);
|
||||
|
||||
if (dist > m_ScriptDistanceFactor * 10.0f)
|
||||
return;
|
||||
|
||||
TaskInventoryItem item = m_host.Inventory.GetInventoryItem(inventory);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
Error("llRez(AtRoot/Object)", "Can't find object '" + inventory + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.InvType != (int)InventoryType.Object)
|
||||
{
|
||||
Error("llRez(AtRoot/Object)", "Can't create requested object; object is missing from database");
|
||||
return;
|
||||
}
|
||||
|
||||
Util.FireAndForget(x =>
|
||||
{
|
||||
if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s))
|
||||
return;
|
||||
|
||||
float dist = (float)llVecDist(llGetPos(), pos);
|
||||
|
||||
if (dist > m_ScriptDistanceFactor * 10.0f)
|
||||
return;
|
||||
|
||||
TaskInventoryItem item = m_host.Inventory.GetInventoryItem(inventory);
|
||||
|
||||
if (item == null)
|
||||
{
|
||||
Error("llRez(AtRoot/Object)", "Can't find object '" + inventory + "'");
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.InvType != (int)InventoryType.Object)
|
||||
{
|
||||
Error("llRez(AtRoot/Object)", "Can't create requested object; object is missing from database");
|
||||
return;
|
||||
}
|
||||
|
||||
List<SceneObjectGroup> new_groups = World.RezObject(m_host, item, pos, rot, vel, param, atRoot);
|
||||
Quaternion wrot = rot;
|
||||
wrot.Normalize();
|
||||
List<SceneObjectGroup> new_groups = World.RezObject(m_host, item, pos, wrot, vel, param, atRoot);
|
||||
|
||||
// If either of these are null, then there was an unknown error.
|
||||
if (new_groups == null)
|
||||
@@ -3596,9 +3598,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
}
|
||||
// Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
|
||||
}
|
||||
|
||||
}
|
||||
}, null, "LSL_Api.doObjectRez");
|
||||
|
||||
//ScriptSleep((int)((groupmass * velmag) / 10));
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -123,6 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
|
||||
bool blend, int disp, int timer, int alpha, int face);
|
||||
string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer);
|
||||
string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, int timer, int face);
|
||||
string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
|
||||
int timer, int alpha);
|
||||
string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
|
||||
@@ -143,8 +144,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void osSetParcelSIPAddress(string SIPAddress);
|
||||
|
||||
// Avatar Info Commands
|
||||
string osGetAgentIP(string agent);
|
||||
LSL_List osGetAgents();
|
||||
string osGetAgentIP(string agent);
|
||||
|
||||
// Teleport commands
|
||||
void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
||||
@@ -222,10 +223,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
string osDrawLine(string drawList, int endX, int endY);
|
||||
string osDrawText(string drawList, string text);
|
||||
string osDrawEllipse(string drawList, int width, int height);
|
||||
string osDrawFilledEllipse(string drawList, int width, int height);
|
||||
string osDrawRectangle(string drawList, int width, int height);
|
||||
string osDrawFilledRectangle(string drawList, int width, int height);
|
||||
string osDrawPolygon(string drawList, LSL_List x, LSL_List y);
|
||||
string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y);
|
||||
string osDrawResetTransform(string drawList);
|
||||
string osDrawRotationTransform(string drawList, LSL_Float x);
|
||||
string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y);
|
||||
string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y);
|
||||
string osSetFontName(string drawList, string fontName);
|
||||
string osSetFontSize(string drawList, int fontSize);
|
||||
string osSetPenSize(string drawList, int penSize);
|
||||
@@ -389,6 +395,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb);
|
||||
|
||||
LSL_List osGetAvatarList();
|
||||
LSL_List osGetNPCList();
|
||||
|
||||
LSL_String osUnixTimeToTimestamp(long time);
|
||||
|
||||
|
||||
@@ -697,7 +697,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
public const int PARCEL_DETAILS_GROUP = 3;
|
||||
public const int PARCEL_DETAILS_AREA = 4;
|
||||
public const int PARCEL_DETAILS_ID = 5;
|
||||
public const int PARCEL_DETAILS_SEE_AVATARS = 6; // not implemented
|
||||
public const int PARCEL_DETAILS_SEE_AVATARS = 6;
|
||||
public const int PARCEL_DETAILS_ANY_AVATAR_SOUNDS = 7;
|
||||
public const int PARCEL_DETAILS_GROUP_SOUNDS = 8;
|
||||
|
||||
//osSetParcelDetails
|
||||
public const int PARCEL_DETAILS_CLAIMDATE = 10;
|
||||
|
||||
@@ -153,6 +153,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer);
|
||||
}
|
||||
|
||||
public string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams,
|
||||
int timer, int face)
|
||||
{
|
||||
return m_OSSL_Functions.osSetDynamicTextureDataFace(dynamicID, contentType, data, extraParams, timer, face);
|
||||
}
|
||||
|
||||
public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
|
||||
int timer, int alpha)
|
||||
{
|
||||
@@ -271,17 +277,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_OSSL_Functions.osTeleportOwner(position, lookat);
|
||||
}
|
||||
|
||||
// Avatar info functions
|
||||
public string osGetAgentIP(string agent)
|
||||
{
|
||||
return m_OSSL_Functions.osGetAgentIP(agent);
|
||||
}
|
||||
|
||||
public LSL_List osGetAgents()
|
||||
{
|
||||
return m_OSSL_Functions.osGetAgents();
|
||||
}
|
||||
|
||||
public string osGetAgentIP(string agent)
|
||||
{
|
||||
return m_OSSL_Functions.osGetAgentIP(agent);
|
||||
}
|
||||
|
||||
// Animation Functions
|
||||
|
||||
public void osAvatarPlayAnimation(string avatar, string animation)
|
||||
@@ -355,6 +360,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osDrawEllipse(drawList, width, height);
|
||||
}
|
||||
|
||||
public string osDrawFilledEllipse(string drawList, int width, int height)
|
||||
{
|
||||
return m_OSSL_Functions.osDrawFilledEllipse(drawList, width, height);
|
||||
}
|
||||
|
||||
public string osDrawRectangle(string drawList, int width, int height)
|
||||
{
|
||||
return m_OSSL_Functions.osDrawRectangle(drawList, width, height);
|
||||
@@ -375,6 +385,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y);
|
||||
}
|
||||
|
||||
public string osDrawResetTransform(string drawList)
|
||||
{
|
||||
return m_OSSL_Functions.osDrawResetTransform(drawList);
|
||||
}
|
||||
|
||||
public string osDrawRotationTransform(string drawList, LSL_Float x)
|
||||
{
|
||||
return m_OSSL_Functions.osDrawRotationTransform(drawList, x);
|
||||
}
|
||||
|
||||
public string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y)
|
||||
{
|
||||
return m_OSSL_Functions.osDrawScaleTransform(drawList, x, y);
|
||||
}
|
||||
|
||||
public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y)
|
||||
{
|
||||
return m_OSSL_Functions.osDrawTranslationTransform(drawList, x, y);
|
||||
}
|
||||
|
||||
public string osSetFontSize(string drawList, int fontSize)
|
||||
{
|
||||
return m_OSSL_Functions.osSetFontSize(drawList, fontSize);
|
||||
@@ -399,6 +429,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
return m_OSSL_Functions.osSetPenColor(drawList, color);
|
||||
}
|
||||
|
||||
// Deprecated
|
||||
public string osSetPenColour(string drawList, string colour)
|
||||
{
|
||||
@@ -1010,6 +1041,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osGetAvatarList();
|
||||
}
|
||||
|
||||
public LSL_List osGetNPCList()
|
||||
{
|
||||
return m_OSSL_Functions.osGetNPCList();
|
||||
}
|
||||
|
||||
public LSL_String osUnixTimeToTimestamp(long time)
|
||||
{
|
||||
return m_OSSL_Functions.osUnixTimeToTimestamp(time);
|
||||
|
||||
@@ -39,7 +39,6 @@ using OMV_Quaternion = OpenMetaverse.Quaternion;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.Shared
|
||||
{
|
||||
[Serializable]
|
||||
public partial class LSL_Types
|
||||
{
|
||||
// Types are kept is separate .dll to avoid having to add whatever .dll it is in it to script AppDomain
|
||||
@@ -526,7 +525,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class list
|
||||
public class list: MarshalByRefObject
|
||||
{
|
||||
private object[] m_data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user