* Diuerse beavtificatems
parent
bda35705e6
commit
4fad66f855
|
@ -1,7 +1,3 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -23,18 +19,28 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public InventoryConfig(string description, string filename)
|
public InventoryConfig(string description, string filename)
|
||||||
{
|
{
|
||||||
configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
|
configMember =
|
||||||
|
new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
|
||||||
configMember.performConfigurationRetrieve();
|
configMember.performConfigurationRetrieve();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadConfigurationOptions()
|
public void loadConfigurationOptions()
|
||||||
{
|
{
|
||||||
configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false);
|
configMember.addConfigurationOption("default_startup_message",
|
||||||
configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString(), false);
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false);
|
"Default Startup Message", "Welcome to OGS", false);
|
||||||
configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false);
|
configMember.addConfigurationOption("default_user_server",
|
||||||
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32, "Http Listener port", DefaultHttpPort.ToString(), false);
|
"Default User Server URI",
|
||||||
|
"http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString(), false);
|
||||||
|
configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||||
|
"Key to send to user server", "null", false);
|
||||||
|
configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||||
|
"Key to expect from user server", "null", false);
|
||||||
|
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
|
||||||
|
"DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
|
||||||
|
configMember.addConfigurationOption("http_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||||
|
"Http Listener port", DefaultHttpPort.ToString(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
||||||
|
@ -42,22 +48,22 @@ namespace OpenSim.Framework
|
||||||
switch (configuration_key)
|
switch (configuration_key)
|
||||||
{
|
{
|
||||||
case "default_startup_message":
|
case "default_startup_message":
|
||||||
this.DefaultStartupMsg = (string)configuration_result;
|
DefaultStartupMsg = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "default_user_server":
|
case "default_user_server":
|
||||||
this.UserServerURL = (string)configuration_result;
|
UserServerURL = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "user_send_key":
|
case "user_send_key":
|
||||||
this.UserSendKey = (string)configuration_result;
|
UserSendKey = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "user_recv_key":
|
case "user_recv_key":
|
||||||
this.UserRecvKey = (string)configuration_result;
|
UserRecvKey = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "database_provider":
|
case "database_provider":
|
||||||
this.DatabaseProvider = (string)configuration_result;
|
DatabaseProvider = (string) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "http_port":
|
case "http_port":
|
||||||
HttpPort = (int)configuration_result;
|
HttpPort = (int) configuration_result;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,9 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
|
||||||
using System.Xml.Serialization;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Xml.Serialization;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Framework
|
namespace OpenSim.Framework
|
||||||
|
@ -251,23 +250,20 @@ namespace OpenSim.Framework
|
||||||
* class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
|
* class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
|
||||||
* into this simpler class, and then use that.
|
* into this simpler class, and then use that.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[XmlRoot(ElementName = "inventory", IsNullable = true)]
|
[XmlRoot(ElementName = "inventory", IsNullable = true)]
|
||||||
public class SerializableInventory
|
public class SerializableInventory
|
||||||
{
|
{
|
||||||
[XmlRoot(ElementName = "folder", IsNullable = true)]
|
[XmlRoot(ElementName = "folder", IsNullable = true)]
|
||||||
public class SerializableFolder : InventoryFolderBase
|
public class SerializableFolder : InventoryFolderBase
|
||||||
{
|
{
|
||||||
[XmlArray(ElementName = "folders", IsNullable = true)]
|
[XmlArray(ElementName = "folders", IsNullable = true)] [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof (SerializableFolder))] public
|
||||||
[XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof(SerializableFolder))]
|
ArrayList SubFolders;
|
||||||
public ArrayList SubFolders;
|
|
||||||
|
|
||||||
[XmlArray(ElementName = "items", IsNullable = true)]
|
[XmlArray(ElementName = "items", IsNullable = true)] [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof (InventoryItemBase))] public ArrayList
|
||||||
[XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof(InventoryItemBase))]
|
Items;
|
||||||
public ArrayList Items;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[XmlElement(ElementName = "folder", IsNullable = true)]
|
[XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root;
|
||||||
public SerializableFolder root;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -94,7 +94,8 @@ namespace OpenSim.Framework
|
||||||
UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null");
|
UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null");
|
||||||
AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL);
|
AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL);
|
||||||
InventoryURL = config.Configs["Network"].GetString("inventory_server_url",
|
InventoryURL = config.Configs["Network"].GetString("inventory_server_url",
|
||||||
"http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString());
|
"http://127.0.0.1:" +
|
||||||
|
InventoryConfig.DefaultHttpPort.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -107,11 +107,10 @@ namespace OpenSim.Framework.Servers
|
||||||
{
|
{
|
||||||
IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
|
IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
|
||||||
buffer = streamedRequestHandler.Handle(path, request.InputStream);
|
buffer = streamedRequestHandler.Handle(path, request.InputStream);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IStreamHandler streamHandler = (IStreamHandler)requestHandler;
|
IStreamHandler streamHandler = (IStreamHandler) requestHandler;
|
||||||
|
|
||||||
using (MemoryStream memoryStream = new MemoryStream())
|
using (MemoryStream memoryStream = new MemoryStream())
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,5 +53,4 @@ namespace OpenSim.Framework.Servers
|
||||||
// Handle request stream, return byte array
|
// Handle request stream, return byte array
|
||||||
void Handle(string path, Stream request, Stream response);
|
void Handle(string path, Stream request, Stream response);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,6 +1,3 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
@ -20,21 +17,21 @@ namespace OpenSim.Framework.Servers
|
||||||
m_method = method;
|
m_method = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Handle(string path, Stream request, Stream responseStream )
|
public void Handle(string path, Stream request, Stream responseStream)
|
||||||
{
|
{
|
||||||
TRequest deserial;
|
TRequest deserial;
|
||||||
using (XmlTextReader xmlReader = new XmlTextReader(request))
|
using (XmlTextReader xmlReader = new XmlTextReader(request))
|
||||||
{
|
{
|
||||||
XmlSerializer deserializer = new XmlSerializer(typeof(TRequest));
|
XmlSerializer deserializer = new XmlSerializer(typeof (TRequest));
|
||||||
deserial = (TRequest)deserializer.Deserialize(xmlReader);
|
deserial = (TRequest) deserializer.Deserialize(xmlReader);
|
||||||
}
|
}
|
||||||
|
|
||||||
TResponse response = m_method(deserial);
|
TResponse response = m_method(deserial);
|
||||||
|
|
||||||
using (XmlWriter xmlWriter = XmlTextWriter.Create( responseStream ))
|
using (XmlWriter xmlWriter = XmlTextWriter.Create(responseStream))
|
||||||
{
|
{
|
||||||
XmlSerializer serializer = new XmlSerializer(typeof(TResponse));
|
XmlSerializer serializer = new XmlSerializer(typeof (TResponse));
|
||||||
serializer.Serialize(xmlWriter, response );
|
serializer.Serialize(xmlWriter, response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -847,7 +847,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket();
|
AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket();
|
||||||
aw.AgentData.AgentID = AgentId;
|
aw.AgentData.AgentID = AgentId;
|
||||||
aw.AgentData.SerialNum = (uint)serial;
|
aw.AgentData.SerialNum = (uint) serial;
|
||||||
aw.AgentData.SessionID = m_sessionId;
|
aw.AgentData.SessionID = m_sessionId;
|
||||||
|
|
||||||
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
|
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
|
||||||
|
|
|
@ -202,7 +202,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
case PacketType.AgentRequestSit:
|
case PacketType.AgentRequestSit:
|
||||||
if (OnAgentRequestSit != null)
|
if (OnAgentRequestSit != null)
|
||||||
{
|
{
|
||||||
AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack;
|
AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket) Pack;
|
||||||
OnAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
|
OnAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
|
||||||
agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
|
agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
{
|
{
|
||||||
if (debug > 0)
|
if (debug > 0)
|
||||||
{
|
{
|
||||||
string info= "";
|
string info = "";
|
||||||
if (debug < 255 && packet.Type == PacketType.AgentUpdate)
|
if (debug < 255 && packet.Type == PacketType.AgentUpdate)
|
||||||
return;
|
return;
|
||||||
if (debug < 254 && packet.Type == PacketType.ViewerEffect)
|
if (debug < 254 && packet.Type == PacketType.ViewerEffect)
|
||||||
|
|
|
@ -25,9 +25,6 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Xml.Serialization;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework;
|
using OpenSim.Framework;
|
||||||
|
@ -38,7 +35,7 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
{
|
{
|
||||||
public class OGS1InventoryService : IInventoryServices
|
public class OGS1InventoryService : IInventoryServices
|
||||||
{
|
{
|
||||||
string _inventoryServerUrl;
|
private string _inventoryServerUrl;
|
||||||
|
|
||||||
public OGS1InventoryService(string inventoryServerUrl)
|
public OGS1InventoryService(string inventoryServerUrl)
|
||||||
{
|
{
|
||||||
|
|
|
@ -332,12 +332,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (ent is SceneObjectGroup)
|
if (ent is SceneObjectGroup)
|
||||||
{
|
{
|
||||||
hasprim = ((SceneObjectGroup)ent).HasChildPrim(localID);
|
hasprim = ((SceneObjectGroup) ent).HasChildPrim(localID);
|
||||||
if (hasprim != false)
|
if (hasprim != false)
|
||||||
{
|
{
|
||||||
|
((SceneObjectGroup) ent).UpdatePrimFlags(localID, (ushort) packet.Type, true, packet.ToBytes());
|
||||||
((SceneObjectGroup)ent).UpdatePrimFlags(localID, (ushort)packet.Type, true, packet.ToBytes());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -341,7 +341,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos,
|
public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos,
|
||||||
PrimitiveBaseShape shape):this(scene, regionHandle, ownerID, localID, pos, LLQuaternion.Identity, shape)
|
PrimitiveBaseShape shape)
|
||||||
|
: this(scene, regionHandle, ownerID, localID, pos, LLQuaternion.Identity, shape)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -927,6 +928,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
part.UpdatePrimFlags(type, inUse, data);
|
part.UpdatePrimFlags(type, inUse, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data)
|
public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = GetChildPart(localID);
|
SceneObjectPart part = GetChildPart(localID);
|
||||||
|
|
|
@ -272,7 +272,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
|
public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
|
||||||
PrimitiveBaseShape shape, LLVector3 groupPosition, LLVector3 offsetPosition):this(regionHandle, parent, ownerID, localID, shape, groupPosition, LLQuaternion.Identity, offsetPosition)
|
PrimitiveBaseShape shape, LLVector3 groupPosition, LLVector3 offsetPosition)
|
||||||
|
: this(regionHandle, parent, ownerID, localID, shape, groupPosition, LLQuaternion.Identity, offsetPosition)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,7 +287,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="shape"></param>
|
/// <param name="shape"></param>
|
||||||
/// <param name="position"></param>
|
/// <param name="position"></param>
|
||||||
public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
|
public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID,
|
||||||
PrimitiveBaseShape shape, LLVector3 groupPosition, LLQuaternion rotationOffset, LLVector3 offsetPosition)
|
PrimitiveBaseShape shape, LLVector3 groupPosition, LLQuaternion rotationOffset,
|
||||||
|
LLVector3 offsetPosition)
|
||||||
{
|
{
|
||||||
m_name = "Primitive";
|
m_name = "Primitive";
|
||||||
m_regionHandle = regionHandle;
|
m_regionHandle = regionHandle;
|
||||||
|
@ -447,23 +449,25 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
TimeStampFull = (uint) Util.UnixTimeSinceEpoch();
|
TimeStampFull = (uint) Util.UnixTimeSinceEpoch();
|
||||||
m_updateFlag = 2;
|
m_updateFlag = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddFlag(LLObject.ObjectFlags flag)
|
public void AddFlag(LLObject.ObjectFlags flag)
|
||||||
{
|
{
|
||||||
LLObject.ObjectFlags prevflag = m_flags;
|
LLObject.ObjectFlags prevflag = m_flags;
|
||||||
//uint objflags = m_flags;
|
//uint objflags = m_flags;
|
||||||
if ((this.ObjectFlags & (uint)flag) == 0)
|
if ((ObjectFlags & (uint) flag) == 0)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("Adding flag: " + ((LLObject.ObjectFlags) flag).ToString());
|
//Console.WriteLine("Adding flag: " + ((LLObject.ObjectFlags) flag).ToString());
|
||||||
m_flags |= flag;
|
m_flags |= flag;
|
||||||
}
|
}
|
||||||
uint currflag = (uint)m_flags;
|
uint currflag = (uint) m_flags;
|
||||||
//System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + m_flags.ToString());
|
//System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + m_flags.ToString());
|
||||||
//ScheduleFullUpdate();
|
//ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemFlag(LLObject.ObjectFlags flag)
|
public void RemFlag(LLObject.ObjectFlags flag)
|
||||||
{
|
{
|
||||||
LLObject.ObjectFlags prevflag = m_flags;
|
LLObject.ObjectFlags prevflag = m_flags;
|
||||||
if ((this.ObjectFlags & (uint) flag) != 0)
|
if ((ObjectFlags & (uint) flag) != 0)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("Removing flag: " + ((LLObject.ObjectFlags)flag).ToString());
|
//Console.WriteLine("Removing flag: " + ((LLObject.ObjectFlags)flag).ToString());
|
||||||
m_flags &= ~flag;
|
m_flags &= ~flag;
|
||||||
|
@ -640,6 +644,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ExtraParams
|
#region ExtraParams
|
||||||
|
|
||||||
public void UpdatePrimFlags(ushort type, bool inUse, byte[] data)
|
public void UpdatePrimFlags(ushort type, bool inUse, byte[] data)
|
||||||
{
|
{
|
||||||
bool hasPrim = false;
|
bool hasPrim = false;
|
||||||
|
@ -661,40 +666,41 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
IsPhantom = (data[i++] != 0) ? true : false;
|
IsPhantom = (data[i++] != 0) ? true : false;
|
||||||
CastsShadows = (data[i++] != 0) ? true : false;
|
CastsShadows = (data[i++] != 0) ? true : false;
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
System.Console.WriteLine("Ignoring invalid Packet:");
|
Console.WriteLine("Ignoring invalid Packet:");
|
||||||
//Silently ignore it - TODO: FIXME Quick
|
//Silently ignore it - TODO: FIXME Quick
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsPhantom)
|
if (IsPhantom)
|
||||||
{
|
{
|
||||||
AddFlag(LLObject.ObjectFlags.Phantom);
|
AddFlag(LLObject.ObjectFlags.Phantom);
|
||||||
if(this.PhysActor != null) {
|
if (PhysActor != null)
|
||||||
this.m_parentGroup.m_scene.PhysScene.RemovePrim(this.PhysActor); /// that's not wholesome. Had to make m_scene public
|
{
|
||||||
this.PhysActor = null;
|
m_parentGroup.m_scene.PhysScene.RemovePrim(PhysActor);
|
||||||
|
/// that's not wholesome. Had to make m_scene public
|
||||||
|
PhysActor = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RemFlag(LLObject.ObjectFlags.Phantom);
|
RemFlag(LLObject.ObjectFlags.Phantom);
|
||||||
if (this.PhysActor == null)
|
if (PhysActor == null)
|
||||||
{
|
{
|
||||||
this.PhysActor = this.m_parentGroup.m_scene.PhysScene.AddPrimShape(
|
PhysActor = m_parentGroup.m_scene.PhysScene.AddPrimShape(
|
||||||
this.Name,
|
Name,
|
||||||
this.Shape,
|
Shape,
|
||||||
new PhysicsVector(this.AbsolutePosition.X, this.AbsolutePosition.Y,
|
new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y,
|
||||||
this.AbsolutePosition.Z),
|
AbsolutePosition.Z),
|
||||||
new PhysicsVector(this.Scale.X, this.Scale.Y, this.Scale.Z),
|
new PhysicsVector(Scale.X, Scale.Y, Scale.Z),
|
||||||
new Quaternion(this.RotationOffset.W, this.RotationOffset.X,
|
new Quaternion(RotationOffset.W, RotationOffset.X,
|
||||||
this.RotationOffset.Y, this.RotationOffset.Z));
|
RotationOffset.Y, RotationOffset.Z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UsePhysics)
|
if (UsePhysics)
|
||||||
{
|
{
|
||||||
AddFlag(LLObject.ObjectFlags.Physics);
|
AddFlag(LLObject.ObjectFlags.Physics);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -710,9 +716,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
// System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
|
// System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
|
||||||
ScheduleFullUpdate();
|
ScheduleFullUpdate();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
|
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
|
||||||
|
@ -861,18 +864,17 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
LLQuaternion lRot;
|
LLQuaternion lRot;
|
||||||
lRot = RotationOffset;
|
lRot = RotationOffset;
|
||||||
uint clientFlags = ObjectFlags & ~(uint)LLObject.ObjectFlags.CreateSelected;
|
uint clientFlags = ObjectFlags & ~(uint) LLObject.ObjectFlags.CreateSelected;
|
||||||
|
|
||||||
List<ScenePresence> avatars=m_parentGroup.GetScenePresences();
|
List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
|
||||||
foreach(ScenePresence s in avatars)
|
foreach (ScenePresence s in avatars)
|
||||||
{
|
{
|
||||||
if(s.m_uuid == OwnerID)
|
if (s.m_uuid == OwnerID)
|
||||||
{
|
{
|
||||||
if(s.ControllingClient == remoteClient)
|
if (s.ControllingClient == remoteClient)
|
||||||
{
|
{
|
||||||
clientFlags = ObjectFlags;
|
clientFlags = ObjectFlags;
|
||||||
m_flags &= ~LLObject.ObjectFlags.CreateSelected;
|
m_flags &= ~LLObject.ObjectFlags.CreateSelected;
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -455,7 +455,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
// Must check for standing up even when PhysicsActor is null,
|
// Must check for standing up even when PhysicsActor is null,
|
||||||
// since sitting currently removes avatar from physical scene
|
// since sitting currently removes avatar from physical scene
|
||||||
if ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_STAND_UP) != 0)
|
if ((flags & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_STAND_UP) != 0)
|
||||||
{
|
{
|
||||||
StandUp();
|
StandUp();
|
||||||
UpdateMovementAnimations(true);
|
UpdateMovementAnimations(true);
|
||||||
|
@ -526,7 +526,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID);
|
SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID);
|
||||||
LLVector3 pos = new LLVector3();
|
LLVector3 pos = new LLVector3();
|
||||||
if (part != null)
|
if (part != null)
|
||||||
pos = part.AbsolutePosition + m_requestedSitOffset + new LLVector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight);
|
pos = part.AbsolutePosition + m_requestedSitOffset +
|
||||||
|
new LLVector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight);
|
||||||
MakeRootAgent(pos, false);
|
MakeRootAgent(pos, false);
|
||||||
m_parentID = 0;
|
m_parentID = 0;
|
||||||
SendFullUpdateToAllClients();
|
SendFullUpdateToAllClients();
|
||||||
|
@ -597,7 +598,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
// these magic numbers come mostly from experimenting with ODE,
|
// these magic numbers come mostly from experimenting with ODE,
|
||||||
// and seeing what looks right
|
// and seeing what looks right
|
||||||
AbsolutePosition = m_requestedSitOffset + new LLVector3(m_physicsActor.Size.X / 2.7f, 0f, m_physicsActor.Size.Z / 1.45f);
|
AbsolutePosition = m_requestedSitOffset +
|
||||||
|
new LLVector3(m_physicsActor.Size.X/2.7f, 0f, m_physicsActor.Size.Z/1.45f);
|
||||||
m_parentID = m_requestedSitTargetID;
|
m_parentID = m_requestedSitTargetID;
|
||||||
MakeChildAgent();
|
MakeChildAgent();
|
||||||
SendAnimPack(Animations.AnimsLLUUID["SIT"], 1);
|
SendAnimPack(Animations.AnimsLLUUID["SIT"], 1);
|
||||||
|
@ -616,7 +618,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (((m_movementflag & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && PhysicsActor.IsColliding)
|
if (((m_movementflag & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) &&
|
||||||
|
PhysicsActor.IsColliding)
|
||||||
{
|
{
|
||||||
SendAnimPack(Animations.AnimsLLUUID["CROUCHWALK"], 1);
|
SendAnimPack(Animations.AnimsLLUUID["CROUCHWALK"], 1);
|
||||||
}
|
}
|
||||||
|
@ -624,12 +627,12 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
SendAnimPack(Animations.AnimsLLUUID["WALK"], 1);
|
SendAnimPack(Animations.AnimsLLUUID["WALK"], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (((m_movementflag & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && PhysicsActor.IsColliding)
|
if (((m_movementflag & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) &&
|
||||||
|
PhysicsActor.IsColliding)
|
||||||
{
|
{
|
||||||
SendAnimPack(Animations.AnimsLLUUID["CROUCH"], 1);
|
SendAnimPack(Animations.AnimsLLUUID["CROUCH"], 1);
|
||||||
}
|
}
|
||||||
|
@ -656,7 +659,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
direc = direc*((0.03f)*128f);
|
direc = direc*((0.03f)*128f);
|
||||||
if (m_physicsActor.Flying)
|
if (m_physicsActor.Flying)
|
||||||
{ direc *= 4; }
|
{
|
||||||
|
direc *= 4;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!m_physicsActor.Flying && m_physicsActor.IsColliding)
|
if (!m_physicsActor.Flying && m_physicsActor.IsColliding)
|
||||||
|
@ -668,7 +673,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
//System.Console.WriteLine("Jump");
|
//System.Console.WriteLine("Jump");
|
||||||
SendAnimPack(Animations.AnimsLLUUID["PRE_JUMP"], 1);
|
SendAnimPack(Animations.AnimsLLUUID["PRE_JUMP"], 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.Types
|
namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.Types
|
||||||
{
|
{
|
||||||
|
|
|
@ -105,6 +105,7 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
get { return false; }
|
get { return false; }
|
||||||
set { return; }
|
set { return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool IsColliding
|
public override bool IsColliding
|
||||||
{
|
{
|
||||||
get { return false; }
|
get { return false; }
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Channel
|
/* Channel
|
||||||
* A channel is a single heightmap array
|
* A channel is a single heightmap array
|
||||||
* */
|
* */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue