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