Remove localID from script controls data. It won't transfer to another

region anyway
prebuild-update
Melanie 2010-07-11 13:09:11 +01:00
parent 1169bfeaf3
commit eaea89bbb7
3 changed files with 6 additions and 8 deletions

View File

@ -179,7 +179,7 @@ namespace OpenSim.Region.Framework.Scenes
public event ScriptChangedEvent OnScriptChangedEvent; public event ScriptChangedEvent OnScriptChangedEvent;
public delegate void ScriptChangedEvent(uint localID, uint change); public delegate void ScriptChangedEvent(uint localID, uint change);
public delegate void ScriptControlEvent(uint localID, UUID item, UUID avatarID, uint held, uint changed); public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed);
public event ScriptControlEvent OnScriptControlEvent; public event ScriptControlEvent OnScriptControlEvent;
public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
@ -1595,7 +1595,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
internal void TriggerControlEvent(uint p, UUID scriptUUID, UUID avatarID, uint held, uint _changed) internal void TriggerControlEvent(UUID scriptUUID, UUID avatarID, uint held, uint _changed)
{ {
ScriptControlEvent handlerScriptControlEvent = OnScriptControlEvent; ScriptControlEvent handlerScriptControlEvent = OnScriptControlEvent;
if (handlerScriptControlEvent != null) if (handlerScriptControlEvent != null)
@ -1604,7 +1604,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
try try
{ {
d(p, scriptUUID, avatarID, held, _changed); d(scriptUUID, avatarID, held, _changed);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -60,7 +60,6 @@ namespace OpenSim.Region.Framework.Scenes
struct ScriptControllers struct ScriptControllers
{ {
public UUID itemID; public UUID itemID;
public uint objID;
public ScriptControlled ignoreControls; public ScriptControlled ignoreControls;
public ScriptControlled eventControls; public ScriptControlled eventControls;
} }
@ -3468,7 +3467,6 @@ namespace OpenSim.Region.Framework.Scenes
obj.eventControls = ScriptControlled.CONTROL_ZERO; obj.eventControls = ScriptControlled.CONTROL_ZERO;
obj.itemID = Script_item_UUID; obj.itemID = Script_item_UUID;
obj.objID = Obj_localID;
if (pass_on == 0 && accept == 0) if (pass_on == 0 && accept == 0)
{ {
IgnoredControls |= (ScriptControlled)controls; IgnoredControls |= (ScriptControlled)controls;
@ -3611,7 +3609,7 @@ namespace OpenSim.Region.Framework.Scenes
if (localHeld != ScriptControlled.CONTROL_ZERO || localChange != ScriptControlled.CONTROL_ZERO) if (localHeld != ScriptControlled.CONTROL_ZERO || localChange != ScriptControlled.CONTROL_ZERO)
{ {
// only send if still pressed or just changed // only send if still pressed or just changed
m_scene.EventManager.TriggerControlEvent(scriptControlData.objID, scriptUUID, UUID, (uint)localHeld, (uint)localChange); m_scene.EventManager.TriggerControlEvent(scriptUUID, UUID, (uint)localHeld, (uint)localChange);
} }
} }
} }

View File

@ -356,9 +356,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
// timer: not handled here // timer: not handled here
// listen: not handled here // listen: not handled here
public void control(uint localID, UUID itemID, UUID agentID, uint held, uint change) public void control(UUID itemID, UUID agentID, uint held, uint change)
{ {
myScriptEngine.PostObjectEvent(localID, new EventParams( myScriptEngine.PostScriptEvent(itemID, new EventParams(
"control",new object[] { "control",new object[] {
new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLString(agentID.ToString()),
new LSL_Types.LSLInteger(held), new LSL_Types.LSLInteger(held),