Started to clean up/ rewrite Primitive class , currently the new version is called Primitive2 and not used, but once it is complete then it will replace the old version.
parent
5e81e7ed9d
commit
a70ef1c2cb
|
@ -207,13 +207,26 @@ namespace OpenSim.Framework.Inventory
|
|||
public LLUUID CreatorID;
|
||||
public sbyte InvType;
|
||||
public sbyte Type;
|
||||
public string Name;
|
||||
public string Name ="";
|
||||
public string Description;
|
||||
|
||||
public InventoryItem()
|
||||
{
|
||||
this.CreatorID = LLUUID.Zero;
|
||||
}
|
||||
|
||||
public string ExportString()
|
||||
{
|
||||
string typ = "notecard";
|
||||
string result = "";
|
||||
result += "\tinv_object\t0\n\t{\n";
|
||||
result += "\t\tobj_id\t%s\n";
|
||||
result += "\t\tparent_id\t"+ ItemID.ToString() +"\n";
|
||||
result += "\t\ttype\t"+ typ +"\n";
|
||||
result += "\t\tname\t" + Name+"|\n";
|
||||
result += "\t}\n";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public class AvatarWearable
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
|
@ -6,7 +6,8 @@
|
|||
<ProjectGuid>{632E1BFD-0000-0000-0000-000000000000}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon></ApplicationIcon>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>OpenSim.RegionServer</AssemblyName>
|
||||
|
@ -15,9 +16,11 @@
|
|||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder></AppDesignerFolder>
|
||||
<AppDesignerFolder>
|
||||
</AppDesignerFolder>
|
||||
<RootNamespace>OpenSim.RegionServer</RootNamespace>
|
||||
<StartupObject></StartupObject>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
</PropertyGroup>
|
||||
|
@ -28,7 +31,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
|
@ -37,7 +41,8 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
|
@ -46,7 +51,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
|
@ -55,13 +61,15 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<HintPath>System.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>System.Xml.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
|
@ -172,6 +180,7 @@
|
|||
<Compile Include="world\Primitive.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="world\Primitive2.cs" />
|
||||
<Compile Include="world\ScriptEngine.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
|
|
@ -345,16 +345,19 @@ namespace OpenSim
|
|||
AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
|
||||
this.UploadAssets.HandleUploadPacket(request, request.AssetBlock.TransactionID.Combine(this.SecureSessionID));
|
||||
break;
|
||||
case PacketType.RequestXfer:
|
||||
//Console.WriteLine(Pack.ToString());
|
||||
break;
|
||||
case PacketType.SendXferPacket:
|
||||
this.UploadAssets.HandleXferPacket((SendXferPacketPacket)Pack);
|
||||
break;
|
||||
case PacketType.CreateInventoryFolder:
|
||||
CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack;
|
||||
m_inventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type, Helpers.FieldToString(invFolder.FolderData.Name), invFolder.FolderData.ParentID);
|
||||
Console.WriteLine(Pack.ToString());
|
||||
//Console.WriteLine(Pack.ToString());
|
||||
break;
|
||||
case PacketType.CreateInventoryItem:
|
||||
Console.WriteLine(Pack.ToString());
|
||||
//Console.WriteLine(Pack.ToString());
|
||||
CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
|
||||
if (createItem.InventoryBlock.TransactionID != LLUUID.Zero)
|
||||
{
|
||||
|
@ -362,7 +365,7 @@ namespace OpenSim
|
|||
}
|
||||
else
|
||||
{
|
||||
Console.Write(Pack.ToString());
|
||||
// Console.Write(Pack.ToString());
|
||||
this.CreateInventoryItem(createItem);
|
||||
}
|
||||
break;
|
||||
|
@ -385,7 +388,7 @@ namespace OpenSim
|
|||
AssetBase asset = m_assetCache.GetAsset(update.InventoryData[i].TransactionID.Combine(this.SecureSessionID));
|
||||
if (asset != null)
|
||||
{
|
||||
Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache");
|
||||
// Console.WriteLine("updating inventory item, found asset" + asset.FullID.ToStringHyphenated() + " already in cache");
|
||||
m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
|
||||
}
|
||||
else
|
||||
|
@ -393,12 +396,12 @@ namespace OpenSim
|
|||
asset = this.UploadAssets.AddUploadToAssetCache(update.InventoryData[i].TransactionID);
|
||||
if (asset != null)
|
||||
{
|
||||
Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToStringHyphenated() + " to cache");
|
||||
//Console.WriteLine("updating inventory item, adding asset" + asset.FullID.ToStringHyphenated() + " to cache");
|
||||
m_inventoryCache.UpdateInventoryItemAsset(this, update.InventoryData[i].ItemID, asset);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("trying to update inventory item, but asset is null");
|
||||
//Console.WriteLine("trying to update inventory item, but asset is null");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -441,10 +444,12 @@ namespace OpenSim
|
|||
}
|
||||
break;
|
||||
case PacketType.UpdateTaskInventory:
|
||||
Console.WriteLine(Pack.ToString());
|
||||
// Console.WriteLine(Pack.ToString());
|
||||
UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
|
||||
AgentInventory myinventory = this.m_inventoryCache.GetAgentsInventory(this.AgentID);
|
||||
if (myinventory != null)
|
||||
{
|
||||
if (updatetask.UpdateData.Key == 0)
|
||||
{
|
||||
if (myinventory.InventoryItems[updatetask.InventoryData.ItemID] != null)
|
||||
{
|
||||
|
@ -457,6 +462,8 @@ namespace OpenSim
|
|||
foreach (Entity ent in m_world.Entities.Values)
|
||||
{
|
||||
if (ent.localid == updatetask.UpdateData.LocalID)
|
||||
{
|
||||
if (ent is OpenSim.world.Primitive)
|
||||
{
|
||||
this.m_world.AddScript(ent, Helpers.FieldToString(assBase.Data));
|
||||
}
|
||||
|
@ -465,6 +472,8 @@ namespace OpenSim
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PacketType.AgentAnimation:
|
||||
//Console.WriteLine(Pack.ToString());
|
||||
|
@ -520,7 +529,7 @@ namespace OpenSim
|
|||
return;
|
||||
}
|
||||
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Sending PacketAck");
|
||||
//OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Sending PacketAck");
|
||||
|
||||
|
||||
int i = 0;
|
||||
|
@ -817,7 +826,7 @@ namespace OpenSim
|
|||
|
||||
protected bool AgentTextureCached(SimClient simclient, Packet packet)
|
||||
{
|
||||
Console.WriteLine(packet.ToString());
|
||||
// Console.WriteLine(packet.ToString());
|
||||
AgentCachedTexturePacket chechedtex = (AgentCachedTexturePacket)packet;
|
||||
AgentCachedTextureResponsePacket cachedresp = new AgentCachedTextureResponsePacket();
|
||||
cachedresp.AgentData.AgentID = this.AgentID;
|
||||
|
|
|
@ -23,11 +23,11 @@ namespace OpenSim.world
|
|||
get { return m_name; }
|
||||
}
|
||||
|
||||
private LLVector3 m_pos;
|
||||
protected LLVector3 m_pos;
|
||||
protected PhysicsActor _physActor;
|
||||
protected World m_world;
|
||||
|
||||
public LLVector3 Pos
|
||||
public virtual LLVector3 Pos
|
||||
{
|
||||
get
|
||||
{
|
||||
|
|
|
@ -76,32 +76,16 @@ namespace OpenSim.world
|
|||
scriptend = scriptData.LastIndexOf("</Script>");
|
||||
substring = scriptData.Substring(scriptstart + 8, scriptend - scriptstart - 8);
|
||||
substring = substring.Trim();
|
||||
Console.WriteLine("searching for script to add: " + substring);
|
||||
//Console.WriteLine("searching for script to add: " + substring);
|
||||
|
||||
ScriptFactory scriptFactory;
|
||||
|
||||
if (this.m_scripts.TryGetValue(substring, out scriptFactory))
|
||||
{
|
||||
Console.WriteLine("added script");
|
||||
|
||||
|
||||
|
||||
//Console.WriteLine("added script");
|
||||
this.AddScript(entity, scriptFactory());
|
||||
}
|
||||
/*string delimStr = " ";
|
||||
char[] delimiter = delimStr.ToCharArray();
|
||||
string[] line;
|
||||
line = scriptData.Split(delimiter);
|
||||
if (line.Length > 1)
|
||||
{
|
||||
if (line[0] == "script:")
|
||||
{
|
||||
if (this.m_scripts.ContainsKey(line[1]))
|
||||
{
|
||||
this.AddScript(entity, this.m_scripts[line[1]]);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
public InventoryCache InventoryCache
|
||||
|
|
38
OpenSim.sln
38
OpenSim.sln
|
@ -1,5 +1,5 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
# Visual C# Express 2005
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim", "OpenSim\OpenSim.csproj", "{438A9556-0000-0000-0000-000000000000}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Physics.OdePlugin", "OpenSim.Physics\OdePlugin\OpenSim.Physics.OdePlugin.csproj", "{63A05FE9-0000-0000-0000-000000000000}"
|
||||
|
@ -41,42 +41,6 @@ Global
|
|||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectDependencies) = postSolution
|
||||
({438A9556-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).7 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).8 = ({8BB20F0A-0000-0000-0000-000000000000})
|
||||
({438A9556-0000-0000-0000-000000000000}).9 = ({632E1BFD-0000-0000-0000-000000000000})
|
||||
({63A05FE9-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({E88EF749-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({8BE16150-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({8BE16150-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({66591469-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({66591469-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({83C87BE6-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({83C87BE6-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({4F874463-0000-0000-0000-000000000000}).2 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({B0027747-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({B0027747-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({8BB20F0A-0000-0000-0000-000000000000}).2 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({8BB20F0A-0000-0000-0000-000000000000}).3 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({988F0AC4-0000-0000-0000-000000000000}).3 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({B55C0B5D-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({B55C0B5D-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).7 = ({E88EF749-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).8 = ({8BE16150-0000-0000-0000-000000000000})
|
||||
({632E1BFD-0000-0000-0000-000000000000}).9 = ({8BB20F0A-0000-0000-0000-000000000000})
|
||||
({E1B79ECF-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({E1B79ECF-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({7E494328-0000-0000-0000-000000000000}).5 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({7E494328-0000-0000-0000-000000000000}).6 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({546099CD-0000-0000-0000-000000000000}).4 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({546099CD-0000-0000-0000-000000000000}).5 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
({21BFC8E2-0000-0000-0000-000000000000}).3 = ({8ACA2445-0000-0000-0000-000000000000})
|
||||
({21BFC8E2-0000-0000-0000-000000000000}).4 = ({A7CD0630-0000-0000-0000-000000000000})
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{438A9556-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
|
|
Loading…
Reference in New Issue