direct post listen events on chat, bypassing intermediate storage and timed pooling. ( code still dirty)

This commit is contained in:
UbitUmarov
2022-06-21 02:18:38 +01:00
parent 86dc93ec3b
commit 16d5d7d7fc
6 changed files with 89 additions and 119 deletions

View File

@@ -71,6 +71,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
myScriptEngine.World.EventManager.OnScriptLandColliderStart += land_collision_start;
myScriptEngine.World.EventManager.OnScriptLandColliding += land_collision;
myScriptEngine.World.EventManager.OnScriptLandColliderEnd += land_collision_end;
myScriptEngine.World.EventManager.OnScriptListenEvent += script_listen;
IMoneyModule money = myScriptEngine.World.RequestModuleInterface<IMoneyModule>();
if (money != null)
{
@@ -236,6 +237,18 @@ namespace OpenSim.Region.ScriptEngine.XEngine
}
}
public void script_listen(UUID scriptID, int channel, string name, UUID id, string message)
{
object[] resobj = new object[]
{
new LSL_Types.LSLInteger(channel),
new LSL_Types.LSLString(name),
new LSL_Types.LSLString(id.ToString()),
new LSL_Types.LSLString(message)
};
myScriptEngine.PostScriptEvent(scriptID, new EventParams("listen", resobj, new DetectParams[0]));
}
// state_entry: not processed here
// state_exit: not processed here