diff options
author | nlin | 2009-04-04 13:13:14 +0000 |
---|---|---|
committer | nlin | 2009-04-04 13:13:14 +0000 |
commit | 449bebf16e424b8af5fc1768e880ae64c872773d (patch) | |
tree | ccdc1b4ac6817d44e82a99061b522888a15fb28a /OpenSim | |
parent | * Changed IPersistence interface so that passing the MRMBase is unessecary. (diff) | |
download | opensim-SC_OLD-449bebf16e424b8af5fc1768e880ae64c872773d.zip opensim-SC_OLD-449bebf16e424b8af5fc1768e880ae64c872773d.tar.gz opensim-SC_OLD-449bebf16e424b8af5fc1768e880ae64c872773d.tar.bz2 opensim-SC_OLD-449bebf16e424b8af5fc1768e880ae64c872773d.tar.xz |
Preliminary work to support ObjectSpin* packets when user invokes CTRL / SHIFT / MOUSE DRAG on a physical object
Addresses Mantis #3381
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 45 |
2 files changed, 45 insertions, 4 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 8d6ca7d..79fb763 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -156,6 +156,10 @@ namespace OpenSim.Framework | |||
156 | UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs | 156 | UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs |
157 | ); | 157 | ); |
158 | 158 | ||
159 | public delegate void SpinStart(UUID objectID, IClientAPI remoteClient); | ||
160 | public delegate void SpinUpdate(UUID objectID, Quaternion rotation, IClientAPI remoteClient); | ||
161 | public delegate void SpinStop(UUID objectID, IClientAPI remoteClient); | ||
162 | |||
159 | public delegate void ParcelAccessListRequest( | 163 | public delegate void ParcelAccessListRequest( |
160 | UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client); | 164 | UUID agentID, UUID sessionID, uint flags, int sequenceID, int landLocalID, IClientAPI remote_client); |
161 | 165 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e021849..5c86964 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -170,6 +170,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
170 | private GrabObject handlerGrabObject; //OnGrabObject; | 170 | private GrabObject handlerGrabObject; //OnGrabObject; |
171 | private MoveObject handlerGrabUpdate; //OnGrabUpdate; | 171 | private MoveObject handlerGrabUpdate; //OnGrabUpdate; |
172 | private ObjectSelect handlerDeGrabObject; //OnDeGrabObject; | 172 | private ObjectSelect handlerDeGrabObject; //OnDeGrabObject; |
173 | private SpinStart handlerSpinStart; //OnSpinStart; | ||
174 | private SpinUpdate handlerSpinUpdate; //OnSpinUpdate; | ||
175 | private SpinStop handlerSpinStop; //OnSpinStop; | ||
173 | private GenericCall7 handlerObjectDescription; | 176 | private GenericCall7 handlerObjectDescription; |
174 | private GenericCall7 handlerObjectName; | 177 | private GenericCall7 handlerObjectName; |
175 | private GenericCall7 handlerObjectClickAction; | 178 | private GenericCall7 handlerObjectClickAction; |
@@ -929,9 +932,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
929 | public event DelinkObjects OnDelinkObjects; | 932 | public event DelinkObjects OnDelinkObjects; |
930 | public event GrabObject OnGrabObject; | 933 | public event GrabObject OnGrabObject; |
931 | public event ObjectSelect OnDeGrabObject; | 934 | public event ObjectSelect OnDeGrabObject; |
935 | public event SpinStart OnSpinStart; | ||
936 | public event SpinStop OnSpinStop; | ||
932 | public event ObjectDuplicate OnObjectDuplicate; | 937 | public event ObjectDuplicate OnObjectDuplicate; |
933 | public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; | 938 | public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; |
934 | public event MoveObject OnGrabUpdate; | 939 | public event MoveObject OnGrabUpdate; |
940 | public event SpinUpdate OnSpinUpdate; | ||
935 | public event AddNewPrim OnAddPrim; | 941 | public event AddNewPrim OnAddPrim; |
936 | public event RequestGodlikePowers OnRequestGodlikePowers; | 942 | public event RequestGodlikePowers OnRequestGodlikePowers; |
937 | public event GodKickUser OnGodKickUser; | 943 | public event GodKickUser OnGodKickUser; |
@@ -5229,6 +5235,41 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5229 | handlerDeGrabObject(deGrab.ObjectData.LocalID, this); | 5235 | handlerDeGrabObject(deGrab.ObjectData.LocalID, this); |
5230 | } | 5236 | } |
5231 | break; | 5237 | break; |
5238 | case PacketType.ObjectSpinStart: | ||
5239 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStart packet"); | ||
5240 | ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack; | ||
5241 | |||
5242 | handlerSpinStart = OnSpinStart; | ||
5243 | if (handlerSpinStart != null) | ||
5244 | { | ||
5245 | handlerSpinStart(spinStart.ObjectData.ObjectID, this); | ||
5246 | } | ||
5247 | break; | ||
5248 | case PacketType.ObjectSpinUpdate: | ||
5249 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinUpdate packet"); | ||
5250 | ObjectSpinUpdatePacket spinUpdate = (ObjectSpinUpdatePacket)Pack; | ||
5251 | Vector3 axis; | ||
5252 | float angle; | ||
5253 | spinUpdate.ObjectData.Rotation.GetAxisAngle(out axis, out angle); | ||
5254 | //m_log.Warn("[CLIENT]: ObjectSpinUpdate packet rot axis:" + axis + " angle:" + angle); | ||
5255 | |||
5256 | handlerSpinUpdate = OnSpinUpdate; | ||
5257 | if (handlerSpinUpdate != null) | ||
5258 | { | ||
5259 | handlerSpinUpdate(spinUpdate.ObjectData.ObjectID, spinUpdate.ObjectData.Rotation, this); | ||
5260 | } | ||
5261 | break; | ||
5262 | case PacketType.ObjectSpinStop: | ||
5263 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); | ||
5264 | ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack; | ||
5265 | |||
5266 | handlerSpinStop = OnSpinStop; | ||
5267 | if (handlerSpinStop != null) | ||
5268 | { | ||
5269 | handlerSpinStop(spinStop.ObjectData.ObjectID, this); | ||
5270 | } | ||
5271 | break; | ||
5272 | |||
5232 | case PacketType.ObjectDescription: | 5273 | case PacketType.ObjectDescription: |
5233 | ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack; | 5274 | ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack; |
5234 | 5275 | ||
@@ -6866,10 +6907,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6866 | // TODO: handle this packet | 6907 | // TODO: handle this packet |
6867 | //m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); | 6908 | //m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); |
6868 | break; | 6909 | break; |
6869 | case PacketType.ObjectSpinStop: | ||
6870 | // TODO: handle this packet | ||
6871 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); | ||
6872 | break; | ||
6873 | 6910 | ||
6874 | case PacketType.InventoryDescendents: | 6911 | case PacketType.InventoryDescendents: |
6875 | // TODO: handle this packet | 6912 | // TODO: handle this packet |