mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
mantis 8740: rename osObjectTeleport as osTeleportObject, replaced the stop parameter by flags, add flags OSTPOBJ_STOPATTARRGET and OSTPOBJ_SETROT
This commit is contained in:
@@ -4632,17 +4632,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// <param name="objectUUID">the id of the linkset to teleport</param>
|
||||
/// <param name="targetPos">target position</param>
|
||||
/// <param name="rotation"> a rotation to apply</param>
|
||||
/// <param name="stop">if TRUE (!=0) stop at destination</param>
|
||||
/// <param name="flags">several flags/param>
|
||||
/// <remarks>
|
||||
/// only does teleport local to region
|
||||
/// object owner must have rights to run scripts on target location
|
||||
/// if object has scripts, owner must have rights to run scripts on target location
|
||||
/// object owner must have rights to enter ojects on target location
|
||||
/// target location parcel must have enought free prims capacity for the linkset prims
|
||||
/// all avatars siting on the object must have access to target location
|
||||
/// has a cool down time. retries before expire reset it
|
||||
/// fail conditions are silent ignored
|
||||
/// </remarks>
|
||||
public void osObjectTeleport(LSL_Key objectUUID, LSL_Vector targetPos, LSL_Rotation rotation, LSL_Integer stop)
|
||||
public void osTeleportObject(LSL_Key objectUUID, LSL_Vector targetPos, LSL_Rotation rotation, LSL_Integer flags)
|
||||
{
|
||||
CheckThreatLevel(ThreatLevel.Severe, "osTeleportAgent");
|
||||
m_host.AddScriptLPS(1);
|
||||
@@ -4660,7 +4660,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
UUID myid = m_host.ParentGroup.UUID;
|
||||
|
||||
sog.ObjectTeleport(myid, targetPos, rotation, stop != 0);
|
||||
sog.TeleportObject(myid, targetPos, rotation, flags);
|
||||
// a delay here may break vehicles
|
||||
}
|
||||
}
|
||||
|
||||
@@ -496,6 +496,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, vector centerOfMass);
|
||||
void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, vector centerOfMass,rotation lslrot);
|
||||
|
||||
void osObjectTeleport(LSL_Key objectUUID, vector targetPos, rotation targetrotation, LSL_Integer stop);
|
||||
void osTeleportObject(LSL_Key objectUUID, vector targetPos, rotation targetrotation, LSL_Integer flags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -853,5 +853,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
/// process message parameter as regex
|
||||
/// </summary>
|
||||
public const int OS_LISTEN_REGEX_MESSAGE = 0x2;
|
||||
|
||||
// for osTeleportObject
|
||||
public const int OSTPOBJ_NONE = 0x0;
|
||||
public const int OSTPOBJ_STOPATTARRGET = 0x1; // stops at destination
|
||||
public const int OSTPOBJ_STOPONFAIL = 0x2; // stops at jump point if tp fails
|
||||
public const int OSTPOBJ_SETROT = 0x4; // the rotation is the final rotation, otherwise is a added rotation
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1140,9 +1140,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_OSSL_Functions.osClearInertia();
|
||||
}
|
||||
|
||||
public void osObjectTeleport(LSL_Key objectUUID, vector targetPos, rotation targetrotation, LSL_Integer stop)
|
||||
public void osTeleportObject(LSL_Key objectUUID, vector targetPos, rotation targetrotation, LSL_Integer flags)
|
||||
{
|
||||
m_OSSL_Functions.osObjectTeleport(objectUUID, targetPos, targetrotation, stop);
|
||||
m_OSSL_Functions.osTeleportObject(objectUUID, targetPos, targetrotation, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user