* minor refactoring for readability (and to lessen greed)
parent
b2fe47ecb1
commit
4d5c9499f8
|
@ -328,7 +328,7 @@ namespace OpenSim.world
|
|||
this.dirtyFlag = true;
|
||||
}
|
||||
|
||||
public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID)
|
||||
public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID ownerID, uint localID)
|
||||
{
|
||||
ObjectUpdatePacket objupdate = new ObjectUpdatePacket();
|
||||
objupdate.RegionData.RegionHandle = m_regionHandle;
|
||||
|
@ -356,7 +356,7 @@ namespace OpenSim.world
|
|||
this.primData.Texture = objupdate.ObjectData[0].TextureEntry = ntex.ToBytes();
|
||||
objupdate.ObjectData[0].State = 0;
|
||||
objupdate.ObjectData[0].Data = new byte[0];
|
||||
PData.OwnerID = objupdate.ObjectData[0].OwnerID = agentID;
|
||||
PData.OwnerID = objupdate.ObjectData[0].OwnerID = ownerID;
|
||||
PData.PCode = objupdate.ObjectData[0].PCode = addPacket.ObjectData.PCode;
|
||||
PData.PathBegin = objupdate.ObjectData[0].PathBegin = addPacket.ObjectData.PathBegin;
|
||||
PData.PathEnd = objupdate.ObjectData[0].PathEnd = addPacket.ObjectData.PathEnd;
|
||||
|
|
|
@ -287,13 +287,13 @@ namespace OpenSim.world
|
|||
|
||||
#region Create Methods
|
||||
|
||||
public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID agentID, uint localID)
|
||||
public void CreateFromPacket(ObjectAddPacket addPacket, LLUUID ownerID, uint localID)
|
||||
{
|
||||
PrimData PData = new PrimData();
|
||||
this.primData = PData;
|
||||
this.primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
|
||||
PData.OwnerID = agentID;
|
||||
PData.OwnerID = ownerID;
|
||||
PData.PCode = addPacket.ObjectData.PCode;
|
||||
PData.PathBegin = addPacket.ObjectData.PathBegin;
|
||||
PData.PathEnd = addPacket.ObjectData.PathEnd;
|
||||
|
|
|
@ -496,12 +496,17 @@ namespace OpenSim.world
|
|||
}
|
||||
|
||||
public void AddNewPrim(ObjectAddPacket addPacket, SimClient AgentClient)
|
||||
{
|
||||
AddNewPrim(addPacket, AgentClient.AgentID);
|
||||
}
|
||||
|
||||
public void AddNewPrim(ObjectAddPacket addPacket, LLUUID ownerID)
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: AddNewPrim() - Creating new prim");
|
||||
Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this);
|
||||
prim.CreateFromPacket(addPacket, AgentClient.AgentID, this._primCount);
|
||||
prim.CreateFromPacket(addPacket, ownerID, this._primCount);
|
||||
PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z);
|
||||
PhysicsVector pSize = new PhysicsVector(0.255f, 0.255f, 0.255f);
|
||||
if (OpenSim.world.Avatar.PhysicsEngineFlying)
|
||||
|
|
Loading…
Reference in New Issue