Think SceneObject/Primitive copying should now work, just need to hook it up to a event and test.
parent
fcc7f86427
commit
0ac6809343
|
@ -355,7 +355,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void CreateTerrainTexture()
|
public void CreateTerrainTexture()
|
||||||
{
|
{
|
||||||
//create a texture asset of the terrain
|
//create a texture asset of the terrain
|
||||||
byte[] data = this.Terrain.exportJpegImage("defaultstripe.png");
|
byte[] data = this.Terrain.exportJpegImage("defaultstripe.png");
|
||||||
|
@ -445,6 +445,15 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="agentID"></param>
|
/// <param name="agentID"></param>
|
||||||
/// <param name="child"></param>
|
/// <param name="child"></param>
|
||||||
public override void AddNewClient(IClientAPI client, bool child)
|
public override void AddNewClient(IClientAPI client, bool child)
|
||||||
|
{
|
||||||
|
SubscribeToClientEvents(client);
|
||||||
|
this.estateManager.sendRegionHandshake(client);
|
||||||
|
CreateAndAddScenePresence(client);
|
||||||
|
this.parcelManager.sendParcelOverlay(client);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void SubscribeToClientEvents(IClientAPI client)
|
||||||
{
|
{
|
||||||
client.OnRegionHandShakeReply += this.SendLayerData;
|
client.OnRegionHandShakeReply += this.SendLayerData;
|
||||||
//remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
|
//remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
|
||||||
|
@ -475,14 +484,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
client.OnParcelJoinRequest += new ParcelJoinRequest(parcelManager.handleParcelJoinRequest);
|
client.OnParcelJoinRequest += new ParcelJoinRequest(parcelManager.handleParcelJoinRequest);
|
||||||
client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest);
|
client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest);
|
||||||
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage);
|
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage);
|
||||||
|
|
||||||
|
|
||||||
this.estateManager.sendRegionHandshake(client);
|
|
||||||
CreateAndAddScenePresence(client);
|
|
||||||
|
|
||||||
this.parcelManager.sendParcelOverlay(client);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void CreateAndAddScenePresence(IClientAPI client)
|
protected void CreateAndAddScenePresence(IClientAPI client)
|
||||||
|
@ -772,7 +773,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4));
|
remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4));
|
||||||
|
|
||||||
}
|
}
|
||||||
//remoteClient.SendTeleportCancel();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,13 +115,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
SceneObject dupe = new SceneObject();
|
SceneObject dupe = new SceneObject();
|
||||||
|
|
||||||
|
dupe.m_world = this.m_world;
|
||||||
|
dupe.m_regionHandle = this.m_regionHandle;
|
||||||
Primitive newRoot = this.rootPrimitive.Copy((EntityBase)dupe, dupe);
|
Primitive newRoot = this.rootPrimitive.Copy((EntityBase)dupe, dupe);
|
||||||
|
dupe.rootPrimitive = newRoot;
|
||||||
foreach (EntityBase child in this.children)
|
dupe.rootPrimitive.Pos =( this.Pos + new LLVector3(0,0,1));
|
||||||
{
|
dupe.Rotation = this.Rotation;
|
||||||
EntityBase newChild = child.Copy();
|
|
||||||
dupe.children.Add(newChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
return dupe;
|
return dupe;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue