mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
fix back llsensor*: let id be a invalid or empty key again
This commit is contained in:
@@ -1287,14 +1287,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
|
||||
public void llSensor(string name, string id, int type, double range, double arc)
|
||||
{
|
||||
if(UUID.TryParse(id, out UUID keyID))
|
||||
m_AsyncCommands.SensorRepeatPlugin.SenseOnce(m_host.LocalId, m_item.ItemID, name, keyID, type, range, arc, m_host);
|
||||
_ = UUID.TryParse(id, out UUID keyID);
|
||||
m_AsyncCommands.SensorRepeatPlugin.SenseOnce(m_host.LocalId, m_item.ItemID, name, keyID, type, range, arc, m_host);
|
||||
}
|
||||
|
||||
public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate)
|
||||
{
|
||||
if(UUID.TryParse(id, out UUID keyID))
|
||||
m_AsyncCommands.SensorRepeatPlugin.SetSenseRepeatEvent(m_host.LocalId, m_item.ItemID, name, keyID, type, range, arc, rate, m_host);
|
||||
_ = UUID.TryParse(id, out UUID keyID);
|
||||
m_AsyncCommands.SensorRepeatPlugin.SetSenseRepeatEvent(m_host.LocalId, m_item.ItemID, name, keyID, type, range, arc, rate, m_host);
|
||||
}
|
||||
|
||||
public void llSensorRemove()
|
||||
|
||||
@@ -326,7 +326,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
|
||||
// If this is an object sense by key try to get it directly
|
||||
// rather than getting a list to scan through
|
||||
if (!ts.keyID.IsZero())
|
||||
if (ts.keyID.IsNotZero())
|
||||
{
|
||||
m_CmdManager.m_ScriptEngine.World.Entities.TryGetValue(ts.keyID, out EntityBase e);
|
||||
if (e == null)
|
||||
@@ -624,7 +624,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
|
||||
// If this is an avatar sense by key try to get them directly
|
||||
// rather than getting a list to scan through
|
||||
if (!ts.keyID.IsZero())
|
||||
if (ts.keyID.IsNotZero())
|
||||
{
|
||||
// Try direct lookup by UUID
|
||||
if (!m_CmdManager.m_ScriptEngine.World.TryGetScenePresence(ts.keyID, out ScenePresence sp))
|
||||
|
||||
Reference in New Issue
Block a user