Half-working asset system, but avatar objectupdate stuff needs to be done by a non-Gareth
parent
07f715c3e6
commit
8f3c679c73
|
@ -98,6 +98,35 @@ namespace OpenSim
|
||||||
Transfer.TransferInfo.Params = reqPacket.TransferInfo.Params;
|
Transfer.TransferInfo.Params = reqPacket.TransferInfo.Params;
|
||||||
Transfer.TransferInfo.Size = (int)AssetResponse.ContentLength;
|
Transfer.TransferInfo.Size = (int)AssetResponse.ContentLength;
|
||||||
Transfer.TransferInfo.TransferID = reqPacket.TransferInfo.TransferID;
|
Transfer.TransferInfo.TransferID = reqPacket.TransferInfo.TransferID;
|
||||||
|
|
||||||
|
OutPacket(Transfer);
|
||||||
|
|
||||||
|
TransferPacketPacket TransferPacket = new TransferPacketPacket();
|
||||||
|
TransferPacket.TransferData.Packet = 0;
|
||||||
|
TransferPacket.TransferData.ChannelType = 2;
|
||||||
|
TransferPacket.TransferData.TransferID=reqPacket.TransferInfo.TransferID;
|
||||||
|
|
||||||
|
if(AssetResponse.ContentLength>1000) {
|
||||||
|
byte[] chunk = new byte[1000];
|
||||||
|
Array.Copy(idata,chunk,1000);
|
||||||
|
TransferPacket.TransferData.Data = chunk;
|
||||||
|
TransferPacket.TransferData.Status = 0;
|
||||||
|
OutPacket(TransferPacket);
|
||||||
|
|
||||||
|
TransferPacket = new TransferPacketPacket();
|
||||||
|
TransferPacket.TransferData.Packet = 1;
|
||||||
|
TransferPacket.TransferData.ChannelType = 2;
|
||||||
|
TransferPacket.TransferData.TransferID = reqPacket.TransferInfo.TransferID;
|
||||||
|
byte[] chunk1 = new byte[(idata.Length-1000)];
|
||||||
|
Array.Copy(idata, 1000, chunk1, 0, chunk1.Length);
|
||||||
|
TransferPacket.TransferData.Data = chunk1;
|
||||||
|
TransferPacket.TransferData.Status = 1;
|
||||||
|
OutPacket(TransferPacket);
|
||||||
|
} else {
|
||||||
|
TransferPacket.TransferData.Status = 1;
|
||||||
|
TransferPacket.TransferData.Data = idata;
|
||||||
|
OutPacket(TransferPacket);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ProcessInPacket(Packet Pack) {
|
public void ProcessInPacket(Packet Pack) {
|
||||||
|
@ -109,7 +138,11 @@ namespace OpenSim
|
||||||
case PacketType.RegionHandshakeReply:
|
case PacketType.RegionHandshakeReply:
|
||||||
OpenSim_Main.local_world.SendLayerData(this);
|
OpenSim_Main.local_world.SendLayerData(this);
|
||||||
break;
|
break;
|
||||||
|
case PacketType.AgentWearablesRequest:
|
||||||
|
ClientAvatar.SendInitialAppearance();
|
||||||
|
break;
|
||||||
case PacketType.TransferRequest:
|
case PacketType.TransferRequest:
|
||||||
|
Console.WriteLine("OpenSimClient.cs:ProcessInPacket() - Got transfer request");
|
||||||
// We put transfer requests into a big queue and then spawn a thread for each new one
|
// We put transfer requests into a big queue and then spawn a thread for each new one
|
||||||
TransferRequestPacket transfer = (TransferRequestPacket)Pack;
|
TransferRequestPacket transfer = (TransferRequestPacket)Pack;
|
||||||
AssetRequests.Enqueue(transfer);
|
AssetRequests.Enqueue(transfer);
|
||||||
|
|
|
@ -32,6 +32,31 @@ namespace OpenSim.world
|
||||||
ControllingClient.OutPacket(mov);
|
ControllingClient.OutPacket(mov);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SendInitialPosition() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SendInitialAppearance() {
|
||||||
|
AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket();
|
||||||
|
aw.AgentData.AgentID = this.ControllingClient.AgentID;
|
||||||
|
aw.AgentData.SerialNum = 0;
|
||||||
|
aw.AgentData.SessionID = ControllingClient.SessionID;
|
||||||
|
|
||||||
|
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
|
||||||
|
AgentWearablesUpdatePacket.WearableDataBlock awb = new AgentWearablesUpdatePacket.WearableDataBlock();
|
||||||
|
awb.WearableType = (byte)0;
|
||||||
|
awb.AssetID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
|
||||||
|
awb.ItemID = LLUUID.Random();
|
||||||
|
aw.WearableData[0] = awb;
|
||||||
|
|
||||||
|
for(int i=1; i<13; i++) {
|
||||||
|
awb = new AgentWearablesUpdatePacket.WearableDataBlock();
|
||||||
|
awb.WearableType = (byte)i;
|
||||||
|
awb.AssetID = new LLUUID("00000000-0000-0000-0000-000000000000");
|
||||||
|
awb.ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
|
||||||
|
aw.WearableData[i] = awb;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void SendRegionHandshake(World RegionInfo) {
|
public void SendRegionHandshake(World RegionInfo) {
|
||||||
Console.WriteLine("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet");
|
Console.WriteLine("Avatar.cs:SendRegionHandshake() - Creating empty RegionHandshake packet");
|
||||||
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
|
System.Text.Encoding _enc = System.Text.Encoding.ASCII;
|
||||||
|
|
Loading…
Reference in New Issue