Preliminary work to support ObjectSpin* packets when user invokes CTRL / SHIFT / MOUSE DRAG on a physical object

Addresses Mantis #3381
0.6.5-rc1
nlin 2009-04-04 13:13:14 +00:00
parent 23193ab538
commit 449bebf16e
2 changed files with 45 additions and 4 deletions

View File

@ -156,6 +156,10 @@ namespace OpenSim.Framework
UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs
);
public delegate void SpinStart(UUID objectID, IClientAPI remoteClient);
public delegate void SpinUpdate(UUID objectID, Quaternion rotation, IClientAPI remoteClient);
public delegate void SpinStop(UUID objectID, IClientAPI remoteClient);
public delegate void ParcelAccessListRequest(
UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client);

View File

@ -170,6 +170,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private GrabObject handlerGrabObject; //OnGrabObject;
private MoveObject handlerGrabUpdate; //OnGrabUpdate;
private ObjectSelect handlerDeGrabObject; //OnDeGrabObject;
private SpinStart handlerSpinStart; //OnSpinStart;
private SpinUpdate handlerSpinUpdate; //OnSpinUpdate;
private SpinStop handlerSpinStop; //OnSpinStop;
private GenericCall7 handlerObjectDescription;
private GenericCall7 handlerObjectName;
private GenericCall7 handlerObjectClickAction;
@ -929,9 +932,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public event DelinkObjects OnDelinkObjects;
public event GrabObject OnGrabObject;
public event ObjectSelect OnDeGrabObject;
public event SpinStart OnSpinStart;
public event SpinStop OnSpinStop;
public event ObjectDuplicate OnObjectDuplicate;
public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
public event MoveObject OnGrabUpdate;
public event SpinUpdate OnSpinUpdate;
public event AddNewPrim OnAddPrim;
public event RequestGodlikePowers OnRequestGodlikePowers;
public event GodKickUser OnGodKickUser;
@ -5229,6 +5235,41 @@ namespace OpenSim.Region.ClientStack.LindenUDP
handlerDeGrabObject(deGrab.ObjectData.LocalID, this);
}
break;
case PacketType.ObjectSpinStart:
//m_log.Warn("[CLIENT]: unhandled ObjectSpinStart packet");
ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack;
handlerSpinStart = OnSpinStart;
if (handlerSpinStart != null)
{
handlerSpinStart(spinStart.ObjectData.ObjectID, this);
}
break;
case PacketType.ObjectSpinUpdate:
//m_log.Warn("[CLIENT]: unhandled ObjectSpinUpdate packet");
ObjectSpinUpdatePacket spinUpdate = (ObjectSpinUpdatePacket)Pack;
Vector3 axis;
float angle;
spinUpdate.ObjectData.Rotation.GetAxisAngle(out axis, out angle);
//m_log.Warn("[CLIENT]: ObjectSpinUpdate packet rot axis:" + axis + " angle:" + angle);
handlerSpinUpdate = OnSpinUpdate;
if (handlerSpinUpdate != null)
{
handlerSpinUpdate(spinUpdate.ObjectData.ObjectID, spinUpdate.ObjectData.Rotation, this);
}
break;
case PacketType.ObjectSpinStop:
//m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet");
ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack;
handlerSpinStop = OnSpinStop;
if (handlerSpinStop != null)
{
handlerSpinStop(spinStop.ObjectData.ObjectID, this);
}
break;
case PacketType.ObjectDescription:
ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack;
@ -6866,10 +6907,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
// TODO: handle this packet
//m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet");
break;
case PacketType.ObjectSpinStop:
// TODO: handle this packet
//m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet");
break;
case PacketType.InventoryDescendents:
// TODO: handle this packet