let Xengine also have that detectedkey

0.9.1.0-post-fixes
UbitUmarov 2019-02-21 23:17:53 +00:00
parent bd27573130
commit 5d78f52f7b
2 changed files with 19 additions and 6 deletions

View File

@ -218,9 +218,22 @@ namespace OpenSim.Region.ScriptEngine.XEngine
public void changed(uint localID, uint change, object parameter) public void changed(uint localID, uint change, object parameter)
{ {
// Add to queue for all scripts in localID, Object pass change. // Add to queue for all scripts in localID, Object pass change.
if(parameter == null)
{
myScriptEngine.PostObjectEvent(localID, new EventParams( myScriptEngine.PostObjectEvent(localID, new EventParams(
"changed",new object[] { new LSL_Types.LSLInteger(change) }, "changed", new object[] { new LSL_Types.LSLInteger(change) },
new DetectParams[0])); new DetectParams[0]));
return;
}
if (parameter is UUID)
{
DetectParams det = new DetectParams();
det.Key = (UUID)parameter;
myScriptEngine.PostObjectEvent(localID, new EventParams(
"changed", new object[] { new LSL_Types.LSLInteger(change) },
new DetectParams[] { det }));
return;
}
} }
// state_entry: not processed here // state_entry: not processed here

View File

@ -182,21 +182,21 @@ namespace OpenSim.Region.ScriptEngine.Yengine
new DetectParams[] { det })); new DetectParams[] { det }));
} }
public void changed(uint localID, uint change, object data) public void changed(uint localID, uint change, object parameter)
{ {
int ch = (int)change; int ch = (int)change;
// Add to queue for all scripts in localID, Object pass change. // Add to queue for all scripts in localID, Object pass change.
if(data == null) if(parameter == null)
{ {
PostObjectEvent(localID, new EventParams( PostObjectEvent(localID, new EventParams(
"changed", new object[] { ch }, "changed", new object[] { ch },
zeroDetectParams)); zeroDetectParams));
return; return;
} }
if ( data is UUID) if ( parameter is UUID)
{ {
DetectParams det = new DetectParams(); DetectParams det = new DetectParams();
det.Key = (UUID)data; det.Key = (UUID)parameter;
PostObjectEvent(localID, new EventParams( PostObjectEvent(localID, new EventParams(
"changed", new object[] { ch }, "changed", new object[] { ch },
new DetectParams[] { det })); new DetectParams[] { det }));