0.1-prestable
parent
020fe9a214
commit
8c5b51b7c0
|
@ -92,7 +92,7 @@ namespace OpenSim
|
||||||
asset.FullID = assetID;
|
asset.FullID = assetID;
|
||||||
// Console.WriteLine("skin asset id is " + assetID.ToStringHyphenated());
|
// Console.WriteLine("skin asset id is " + assetID.ToStringHyphenated());
|
||||||
asset.Type = pack.AssetBlock.Type;
|
asset.Type = pack.AssetBlock.Type;
|
||||||
asset.InvType = asset.Type ;
|
asset.InvType = asset.Type;
|
||||||
asset.Name = "NewClothing" + Util.RandomClass.Next(1, 1000).ToString("000");
|
asset.Name = "NewClothing" + Util.RandomClass.Next(1, 1000).ToString("000");
|
||||||
asset.Data = pack.AssetBlock.AssetData;
|
asset.Data = pack.AssetBlock.AssetData;
|
||||||
|
|
||||||
|
@ -136,8 +136,8 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
byte[] newArray = new byte[xferPacket.DataPacket.Data.Length-4];
|
byte[] newArray = new byte[xferPacket.DataPacket.Data.Length - 4];
|
||||||
Array.Copy(xferPacket.DataPacket.Data, 4, newArray, 0, xferPacket.DataPacket.Data.Length-4);
|
Array.Copy(xferPacket.DataPacket.Data, 4, newArray, 0, xferPacket.DataPacket.Data.Length - 4);
|
||||||
trans.Asset.Data = newArray;
|
trans.Asset.Data = newArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ namespace OpenSim
|
||||||
public AssetBase AddUploadToAssetCache(LLUUID transactionID)
|
public AssetBase AddUploadToAssetCache(LLUUID transactionID)
|
||||||
{
|
{
|
||||||
AssetBase asset = null;
|
AssetBase asset = null;
|
||||||
if(this.transactions.ContainsKey(transactionID))
|
if (this.transactions.ContainsKey(transactionID))
|
||||||
{
|
{
|
||||||
AssetTransaction trans = this.transactions[transactionID];
|
AssetTransaction trans = this.transactions[transactionID];
|
||||||
if (trans.UploadComplete)
|
if (trans.UploadComplete)
|
||||||
|
@ -193,7 +193,7 @@ namespace OpenSim
|
||||||
|
|
||||||
public void CreateInventoryItem(CreateInventoryItemPacket packet)
|
public void CreateInventoryItem(CreateInventoryItemPacket packet)
|
||||||
{
|
{
|
||||||
if(this.transactions.ContainsKey(packet.InventoryBlock.TransactionID))
|
if (this.transactions.ContainsKey(packet.InventoryBlock.TransactionID))
|
||||||
{
|
{
|
||||||
AssetTransaction trans = this.transactions[packet.InventoryBlock.TransactionID];
|
AssetTransaction trans = this.transactions[packet.InventoryBlock.TransactionID];
|
||||||
trans.Asset.Description = Helpers.FieldToString(packet.InventoryBlock.Description);
|
trans.Asset.Description = Helpers.FieldToString(packet.InventoryBlock.Description);
|
||||||
|
@ -204,7 +204,7 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
//already complete so we can add it to the inventory
|
//already complete so we can add it to the inventory
|
||||||
//m_assetCache.AddAsset(trans.Asset);
|
//m_assetCache.AddAsset(trans.Asset);
|
||||||
Console.WriteLine( "Item created is " +m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated());
|
Console.WriteLine("Item created is " + m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -214,9 +214,7 @@ namespace OpenSim
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
private class AssetTransaction
|
||||||
|
|
||||||
public class AssetTransaction
|
|
||||||
{
|
{
|
||||||
public uint XferID;
|
public uint XferID;
|
||||||
public AssetBase Asset;
|
public AssetBase Asset;
|
||||||
|
@ -230,4 +228,5 @@ namespace OpenSim
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -426,6 +426,8 @@ namespace OpenSim
|
||||||
break;
|
break;
|
||||||
case PacketType.ModifyLand:
|
case PacketType.ModifyLand:
|
||||||
ModifyLandPacket modify = (ModifyLandPacket)Pack;
|
ModifyLandPacket modify = (ModifyLandPacket)Pack;
|
||||||
|
//Console.WriteLine("terraform: number of parcel data blocks" + modify.ParcelData.Length);
|
||||||
|
|
||||||
switch (modify.ModifyBlock.Action)
|
switch (modify.ModifyBlock.Action)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -433,11 +435,14 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
int mody = (int) modify.ParcelData[0].North;
|
int mody = (int) modify.ParcelData[0].North;
|
||||||
int modx = (int) modify.ParcelData[0].West;
|
int modx = (int) modify.ParcelData[0].West;
|
||||||
this.m_world.LandMap[(mody * 256) + modx -1 ] += 0.1f;
|
// Console.WriteLine("height in packet is " + modify.ModifyBlock.Height.ToString());
|
||||||
this.m_world.LandMap[(mody * 256) + modx] += 0.2f;
|
// Console.WriteLine("current height at that point is " + this.m_world.LandMap[(mody * 256) + modx].ToString());
|
||||||
this.m_world.LandMap[(mody * 256) + modx + 1] += 0.1f;
|
|
||||||
this.m_world.LandMap[((mody+1) * 256) + modx] += 0.1f;
|
this.m_world.LandMap[(mody * 256) + modx -1 ] += 0.05f;
|
||||||
this.m_world.LandMap[((mody -1) * 256) + modx] += 0.1f;
|
this.m_world.LandMap[(mody * 256) + modx] += 0.1f;
|
||||||
|
this.m_world.LandMap[(mody * 256) + modx + 1] += 0.05f;
|
||||||
|
this.m_world.LandMap[((mody+1) * 256) + modx] += 0.05f;
|
||||||
|
this.m_world.LandMap[((mody -1) * 256) + modx] += 0.05f;
|
||||||
m_world.RegenerateTerrain(true, modx, mody);
|
m_world.RegenerateTerrain(true, modx, mody);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -446,11 +451,14 @@ namespace OpenSim
|
||||||
{
|
{
|
||||||
int mody = (int)modify.ParcelData[0].North;
|
int mody = (int)modify.ParcelData[0].North;
|
||||||
int modx = (int)modify.ParcelData[0].West;
|
int modx = (int)modify.ParcelData[0].West;
|
||||||
this.m_world.LandMap[(mody * 256) + modx - 1] -= 0.1f;
|
// Console.WriteLine("height in packet is " + modify.ModifyBlock.Height.ToString());
|
||||||
this.m_world.LandMap[(mody * 256) + modx] -= 0.2f;
|
// Console.WriteLine("current height at that point is " + this.m_world.LandMap[(mody * 256) + modx].ToString());
|
||||||
this.m_world.LandMap[(mody * 256) + modx + 1] -= 0.1f;
|
|
||||||
this.m_world.LandMap[((mody + 1) * 256) + modx] -= 0.1f;
|
this.m_world.LandMap[(mody * 256) + modx - 1] -= 0.05f;
|
||||||
this.m_world.LandMap[((mody - 1) * 256) + modx] -= 0.1f;
|
this.m_world.LandMap[(mody * 256) + modx] -= 0.1f;
|
||||||
|
this.m_world.LandMap[(mody * 256) + modx + 1] -= 0.05f;
|
||||||
|
this.m_world.LandMap[((mody + 1) * 256) + modx] -= 0.05f;
|
||||||
|
this.m_world.LandMap[((mody - 1) * 256) + modx] -= 0.05f;
|
||||||
m_world.RegenerateTerrain(true, modx, mody);
|
m_world.RegenerateTerrain(true, modx, mody);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue