* Diuerse beavtificatems

afrisby
lbsa71 2007-11-01 19:19:05 +00:00
parent bda35705e6
commit 4fad66f855
30 changed files with 149 additions and 149 deletions

View File

@ -52,10 +52,10 @@ namespace OpenSim.Framework.Communications.Cache
public List<AssetRequest> TextureRequests = new List<AssetRequest>(); //textures ready to be sent
public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>();
//Assets requested from the asset server
//Assets requested from the asset server
public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>();
//Textures requested from the asset server
//Textures requested from the asset server
public Dictionary<LLUUID, TextureSender> SendingTextures = new Dictionary<LLUUID, TextureSender>();
private BlockingQueue<TextureSender> QueueTextures = new BlockingQueue<TextureSender>();

View File

@ -90,7 +90,7 @@ namespace OpenSim.Framework.Communications.Cache
{
InventoryFolderImpl createdFolder =
userProfile.RootFolder.CreateNewSubFolder(folderID, folderName, folderType);
if (createdFolder != null)
{
m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, createdFolder);
@ -119,7 +119,7 @@ namespace OpenSim.Framework.Communications.Cache
return;
}
if ((fold = libraryRoot.HasSubFolder(folderID)) != null)
{
remoteClient.SendInventoryFolderDetails(libraryRoot.agentID, folderID, fold.RequestListOfItems());
@ -129,7 +129,7 @@ namespace OpenSim.Framework.Communications.Cache
CachedUserInfo userProfile;
if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
{
{
if (userProfile.RootFolder != null)
{
if (userProfile.RootFolder.folderID == folderID)

View File

@ -444,4 +444,4 @@ namespace OpenSim.Framework
event Action<IClientAPI> OnConnectionClosed;
void SendLogoutPacket();
}
}
}

View File

@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Framework
{
/// <summary>
@ -23,18 +19,28 @@ namespace OpenSim.Framework
public InventoryConfig(string description, string filename)
{
configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
configMember =
new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration);
configMember.performConfigurationRetrieve();
}
public void loadConfigurationOptions()
{
configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS", false);
configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "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);
configMember.addConfigurationOption("default_startup_message",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Default Startup Message", "Welcome to OGS", false);
configMember.addConfigurationOption("default_user_server",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"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)
@ -42,26 +48,26 @@ namespace OpenSim.Framework
switch (configuration_key)
{
case "default_startup_message":
this.DefaultStartupMsg = (string)configuration_result;
DefaultStartupMsg = (string) configuration_result;
break;
case "default_user_server":
this.UserServerURL = (string)configuration_result;
UserServerURL = (string) configuration_result;
break;
case "user_send_key":
this.UserSendKey = (string)configuration_result;
UserSendKey = (string) configuration_result;
break;
case "user_recv_key":
this.UserRecvKey = (string)configuration_result;
UserRecvKey = (string) configuration_result;
break;
case "database_provider":
this.DatabaseProvider = (string)configuration_result;
DatabaseProvider = (string) configuration_result;
break;
case "http_port":
HttpPort = (int)configuration_result;
HttpPort = (int) configuration_result;
break;
}
return true;
}
}
}
}

View File

@ -25,10 +25,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.Xml.Serialization;
using System.Collections;
using System.Collections.Generic;
using System.Xml.Serialization;
using libsecondlife;
namespace OpenSim.Framework
@ -251,23 +250,20 @@ namespace OpenSim.Framework
* class defined in Communications.Framework.Communications.Caches. So we serialize/deserialize
* into this simpler class, and then use that.
*/
[XmlRoot(ElementName = "inventory", IsNullable = true)]
public class SerializableInventory
{
[XmlRoot(ElementName = "folder", IsNullable = true)]
public class SerializableFolder : InventoryFolderBase
{
[XmlArray(ElementName = "folders", IsNullable = true)]
[XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof(SerializableFolder))]
public ArrayList SubFolders;
[XmlArray(ElementName = "folders", IsNullable = true)] [XmlArrayItem(ElementName = "folder", IsNullable = true, Type = typeof (SerializableFolder))] public
ArrayList SubFolders;
[XmlArray(ElementName = "items", IsNullable = true)]
[XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof(InventoryItemBase))]
public ArrayList Items;
[XmlArray(ElementName = "items", IsNullable = true)] [XmlArrayItem(ElementName = "item", IsNullable = true, Type = typeof (InventoryItemBase))] public ArrayList
Items;
}
[XmlElement(ElementName = "folder", IsNullable = true)]
public SerializableFolder root;
[XmlElement(ElementName = "folder", IsNullable = true)] public SerializableFolder root;
}
}
}

View File

@ -94,7 +94,8 @@ namespace OpenSim.Framework
UserRecvKey = config.Configs["Network"].GetString("user_recv_key", "null");
AssetURL = config.Configs["Network"].GetString("asset_server_url", AssetURL);
InventoryURL = config.Configs["Network"].GetString("inventory_server_url",
"http://127.0.0.1:" + InventoryConfig.DefaultHttpPort.ToString());
"http://127.0.0.1:" +
InventoryConfig.DefaultHttpPort.ToString());
}
}
}
}

View File

@ -107,11 +107,10 @@ namespace OpenSim.Framework.Servers
{
IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
buffer = streamedRequestHandler.Handle(path, request.InputStream);
}
else
{
IStreamHandler streamHandler = (IStreamHandler)requestHandler;
IStreamHandler streamHandler = (IStreamHandler) requestHandler;
using (MemoryStream memoryStream = new MemoryStream())
{

View File

@ -53,5 +53,4 @@ namespace OpenSim.Framework.Servers
// Handle request stream, return byte array
void Handle(string path, Stream request, Stream response);
}
}

View File

@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
@ -20,22 +17,22 @@ namespace OpenSim.Framework.Servers
m_method = method;
}
public void Handle(string path, Stream request, Stream responseStream )
public void Handle(string path, Stream request, Stream responseStream)
{
TRequest deserial;
using (XmlTextReader xmlReader = new XmlTextReader(request))
{
XmlSerializer deserializer = new XmlSerializer(typeof(TRequest));
deserial = (TRequest)deserializer.Deserialize(xmlReader);
XmlSerializer deserializer = new XmlSerializer(typeof (TRequest));
deserial = (TRequest) deserializer.Deserialize(xmlReader);
}
TResponse response = m_method(deserial);
using (XmlWriter xmlWriter = XmlTextWriter.Create( responseStream ))
using (XmlWriter xmlWriter = XmlTextWriter.Create(responseStream))
{
XmlSerializer serializer = new XmlSerializer(typeof(TResponse));
serializer.Serialize(xmlWriter, response );
XmlSerializer serializer = new XmlSerializer(typeof (TResponse));
serializer.Serialize(xmlWriter, response);
}
}
}
}
}

View File

@ -775,4 +775,4 @@ namespace OpenSim
#endregion
}
}
}

View File

@ -382,7 +382,7 @@ namespace OpenSim.Region.ClientStack
newSimPack.Info = new CrossedRegionPacket.InfoBlock();
newSimPack.Info.Position = pos;
newSimPack.Info.LookAt = look;
// new LLVector3(0.0f, 0.0f, 0.0f); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!!
// new LLVector3(0.0f, 0.0f, 0.0f); // copied from Avatar.cs - SHOULD BE DYNAMIC!!!!!!!!!!
newSimPack.RegionData = new CrossedRegionPacket.RegionDataBlock();
newSimPack.RegionData.RegionHandle = newRegionHandle;
byte[] byteIP = externalIPEndPoint.Address.GetAddressBytes();
@ -847,7 +847,7 @@ namespace OpenSim.Region.ClientStack
{
AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket();
aw.AgentData.AgentID = AgentId;
aw.AgentData.SerialNum = (uint)serial;
aw.AgentData.SerialNum = (uint) serial;
aw.AgentData.SessionID = m_sessionId;
aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13];
@ -1296,7 +1296,7 @@ namespace OpenSim.Region.ClientStack
protected ObjectUpdatePacket.ObjectDataBlock CreateDefaultAvatarPacket(byte[] textureEntry)
{
ObjectUpdatePacket.ObjectDataBlock objdata = new ObjectUpdatePacket.ObjectDataBlock();
// new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
// new libsecondlife.Packets.ObjectUpdatePacket.ObjectDataBlock(data1, ref i);
SetDefaultAvatarPacketValues(ref objdata);
objdata.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24);

View File

@ -152,7 +152,7 @@ namespace OpenSim.Region.ClientStack
else
{
m_networkServer.SendPacketTo(sendbuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode);
//userEP);
//userEP);
}
}
catch (Exception)

View File

@ -202,7 +202,7 @@ namespace OpenSim.Region.ClientStack
case PacketType.AgentRequestSit:
if (OnAgentRequestSit != null)
{
AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack;
AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket) Pack;
OnAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
}
@ -770,4 +770,4 @@ namespace OpenSim.Region.ClientStack
OutPacket(logReply);
}
}
}
}

View File

@ -54,7 +54,7 @@ namespace OpenSim.Region.ClientStack
new Dictionary<PacketType, PacketMethod>(); //Global/static handlers for all clients
protected Dictionary<PacketType, PacketMethod> m_packetHandlers = new Dictionary<PacketType, PacketMethod>();
//local handlers for this instance
//local handlers for this instance
private LLUUID m_sessionId;
public LLUUID SecureSessionID = LLUUID.Zero;
@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack
{
if (debug > 0)
{
string info= "";
string info = "";
if (debug < 255 && packet.Type == PacketType.AgentUpdate)
return;
if (debug < 254 && packet.Type == PacketType.ViewerEffect)

View File

@ -132,7 +132,7 @@ namespace OpenSim.Region.Communications.Local
map.Y = (ushort) regInfo.RegionLocY;
map.WaterHeight = (byte) regInfo.EstateSettings.waterHeight;
map.MapImageId = regInfo.EstateSettings.terrainImageID;
//new LLUUID("00000000-0000-0000-9999-000000000007");
//new LLUUID("00000000-0000-0000-9999-000000000007");
map.Agents = 1;
map.RegionFlags = 72458694;
map.Access = 13;

View File

@ -46,4 +46,4 @@ namespace OpenSim.Region.Communications.OGS1
m_userService = new OGS1UserServices(this);
}
}
}
}

View File

@ -25,9 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.IO;
using System.Xml.Serialization;
using System.Collections.Generic;
using libsecondlife;
using OpenSim.Framework;
@ -38,7 +35,7 @@ namespace OpenSim.Region.Communications.OGS1
{
public class OGS1InventoryService : IInventoryServices
{
string _inventoryServerUrl;
private string _inventoryServerUrl;
public OGS1InventoryService(string inventoryServerUrl)
{
@ -88,4 +85,4 @@ namespace OpenSim.Region.Communications.OGS1
#endregion
}
}
}

View File

@ -431,4 +431,4 @@ namespace OpenSim.Region.Environment.Modules
m_tcp.Close();
}
}
}
}

View File

@ -490,4 +490,4 @@ namespace OpenSim.Region.Environment.Modules
return m_id;
}
}
}
}

View File

@ -332,16 +332,14 @@ namespace OpenSim.Region.Environment.Scenes
{
if (ent is SceneObjectGroup)
{
hasprim = ((SceneObjectGroup)ent).HasChildPrim(localID);
hasprim = ((SceneObjectGroup) ent).HasChildPrim(localID);
if (hasprim != false)
{
((SceneObjectGroup)ent).UpdatePrimFlags(localID, (ushort)packet.Type, true, packet.ToBytes());
((SceneObjectGroup) ent).UpdatePrimFlags(localID, (ushort) packet.Type, true, packet.ToBytes());
}
}
}
//System.Console.WriteLine("Got primupdate packet: " + packet.UsePhysics.ToString());
}

View File

@ -1565,4 +1565,4 @@ namespace OpenSim.Region.Environment.Scenes
}
}
}
}
}

View File

@ -341,8 +341,9 @@ namespace OpenSim.Region.Environment.Scenes
///
/// </summary>
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)
{
}
#endregion
@ -927,6 +928,7 @@ namespace OpenSim.Region.Environment.Scenes
part.UpdatePrimFlags(type, inUse, data);
}
}
public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data)
{
SceneObjectPart part = GetChildPart(localID);
@ -1394,4 +1396,4 @@ namespace OpenSim.Region.Environment.Scenes
Text = text;
}
}
}
}

View File

@ -272,9 +272,10 @@ namespace OpenSim.Region.Environment.Scenes
}
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)
{
}
/// <summary>
/// Create a completely new SceneObjectPart (prim)
@ -286,7 +287,8 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="shape"></param>
/// <param name="position"></param>
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_regionHandle = regionHandle;
@ -313,12 +315,12 @@ namespace OpenSim.Region.Environment.Scenes
m_flags = 0;
m_flags |= LLObject.ObjectFlags.ObjectModify |
LLObject.ObjectFlags.ObjectCopy |
LLObject.ObjectFlags.ObjectYouOwner |
LLObject.ObjectFlags.Touch |
LLObject.ObjectFlags.ObjectMove |
LLObject.ObjectFlags.ObjectYouOwner |
LLObject.ObjectFlags.Touch |
LLObject.ObjectFlags.ObjectMove |
LLObject.ObjectFlags.AllowInventoryDrop |
LLObject.ObjectFlags.ObjectTransfer |
LLObject.ObjectFlags.CreateSelected |
LLObject.ObjectFlags.CreateSelected |
LLObject.ObjectFlags.ObjectOwnerModify;
ScheduleFullUpdate();
@ -447,23 +449,25 @@ namespace OpenSim.Region.Environment.Scenes
TimeStampFull = (uint) Util.UnixTimeSinceEpoch();
m_updateFlag = 2;
}
public void AddFlag(LLObject.ObjectFlags flag)
{
LLObject.ObjectFlags prevflag = m_flags;
LLObject.ObjectFlags prevflag = 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());
m_flags |= flag;
}
uint currflag = (uint)m_flags;
uint currflag = (uint) m_flags;
//System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + m_flags.ToString());
//ScheduleFullUpdate();
}
public void RemFlag(LLObject.ObjectFlags flag)
{
LLObject.ObjectFlags prevflag = m_flags;
if ((this.ObjectFlags & (uint) flag) != 0)
LLObject.ObjectFlags prevflag = m_flags;
if ((ObjectFlags & (uint) flag) != 0)
{
//Console.WriteLine("Removing flag: " + ((LLObject.ObjectFlags)flag).ToString());
m_flags &= ~flag;
@ -640,6 +644,7 @@ namespace OpenSim.Region.Environment.Scenes
#endregion
#region ExtraParams
public void UpdatePrimFlags(ushort type, bool inUse, byte[] data)
{
bool hasPrim = false;
@ -649,8 +654,8 @@ namespace OpenSim.Region.Environment.Scenes
bool CastsShadows = false;
//bool IsLocked = false;
int i = 0;
try
{
i += 46;
@ -661,40 +666,41 @@ namespace OpenSim.Region.Environment.Scenes
IsPhantom = (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
}
if (IsPhantom)
{
AddFlag(LLObject.ObjectFlags.Phantom);
if(this.PhysActor != null) {
this.m_parentGroup.m_scene.PhysScene.RemovePrim(this.PhysActor); /// that's not wholesome. Had to make m_scene public
this.PhysActor = null;
if (PhysActor != null)
{
m_parentGroup.m_scene.PhysScene.RemovePrim(PhysActor);
/// that's not wholesome. Had to make m_scene public
PhysActor = null;
}
}
else
{
RemFlag(LLObject.ObjectFlags.Phantom);
if (this.PhysActor == null)
if (PhysActor == null)
{
this.PhysActor = this.m_parentGroup.m_scene.PhysScene.AddPrimShape(
this.Name,
this.Shape,
new PhysicsVector(this.AbsolutePosition.X, this.AbsolutePosition.Y,
this.AbsolutePosition.Z),
new PhysicsVector(this.Scale.X, this.Scale.Y, this.Scale.Z),
new Quaternion(this.RotationOffset.W, this.RotationOffset.X,
this.RotationOffset.Y, this.RotationOffset.Z));
PhysActor = m_parentGroup.m_scene.PhysScene.AddPrimShape(
Name,
Shape,
new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y,
AbsolutePosition.Z),
new PhysicsVector(Scale.X, Scale.Y, Scale.Z),
new Quaternion(RotationOffset.W, RotationOffset.X,
RotationOffset.Y, RotationOffset.Z));
}
}
if (UsePhysics)
{
AddFlag(LLObject.ObjectFlags.Physics);
}
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());
ScheduleFullUpdate();
}
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
@ -861,22 +864,21 @@ namespace OpenSim.Region.Environment.Scenes
{
LLQuaternion lRot;
lRot = RotationOffset;
uint clientFlags = ObjectFlags & ~(uint)LLObject.ObjectFlags.CreateSelected;
uint clientFlags = ObjectFlags & ~(uint) LLObject.ObjectFlags.CreateSelected;
List<ScenePresence> avatars=m_parentGroup.GetScenePresences();
foreach(ScenePresence s in avatars)
{
if(s.m_uuid == OwnerID)
{
if(s.ControllingClient == remoteClient)
{
clientFlags = ObjectFlags;
m_flags &= ~LLObject.ObjectFlags.CreateSelected;
}
break;
}
}
List<ScenePresence> avatars = m_parentGroup.GetScenePresences();
foreach (ScenePresence s in avatars)
{
if (s.m_uuid == OwnerID)
{
if (s.ControllingClient == remoteClient)
{
clientFlags = ObjectFlags;
m_flags &= ~LLObject.ObjectFlags.CreateSelected;
}
break;
}
}
remoteClient.SendPrimitiveToClient(m_regionHandle, 64096, LocalID, m_shape, lPos, clientFlags, m_uuid,
OwnerID,
@ -1042,4 +1044,4 @@ namespace OpenSim.Region.Environment.Scenes
}
}
}
}
}

View File

@ -455,7 +455,7 @@ namespace OpenSim.Region.Environment.Scenes
// Must check for standing up even when PhysicsActor is null,
// 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();
UpdateMovementAnimations(true);
@ -526,7 +526,8 @@ namespace OpenSim.Region.Environment.Scenes
SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID);
LLVector3 pos = new LLVector3();
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);
m_parentID = 0;
SendFullUpdateToAllClients();
@ -569,7 +570,7 @@ namespace OpenSim.Region.Environment.Scenes
remoteClient.OutPacket(avatarSitResponse);
}
public void HandleAgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset)
{
SendSitResponse(remoteClient, targetID, offset);
@ -597,7 +598,8 @@ namespace OpenSim.Region.Environment.Scenes
{
// these magic numbers come mostly from experimenting with ODE,
// 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;
MakeChildAgent();
SendAnimPack(Animations.AnimsLLUUID["SIT"], 1);
@ -616,20 +618,21 @@ namespace OpenSim.Region.Environment.Scenes
}
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);
}
else
{
SendAnimPack(Animations.AnimsLLUUID["WALK"], 1);
{
SendAnimPack(Animations.AnimsLLUUID["WALK"], 1);
}
}
}
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);
}
@ -656,7 +659,9 @@ namespace OpenSim.Region.Environment.Scenes
direc = direc*((0.03f)*128f);
if (m_physicsActor.Flying)
{ direc *= 4; }
{
direc *= 4;
}
else
{
if (!m_physicsActor.Flying && m_physicsActor.IsColliding)
@ -668,7 +673,6 @@ namespace OpenSim.Region.Environment.Scenes
//System.Console.WriteLine("Jump");
SendAnimPack(Animations.AnimsLLUUID["PRE_JUMP"], 1);
}
}
}
@ -1093,4 +1097,4 @@ namespace OpenSim.Region.Environment.Scenes
m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++);
}
}
}
}

View File

@ -27,12 +27,10 @@
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Region.ExtensionsScriptModule.JVMEngine.Types
{
public class BaseType : Object
{
}
}
}

View File

@ -47,7 +47,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
foreach (KeyValuePair<string, IScript> script in compiledscripts)
{
ScriptInfo scriptInfo = new ScriptInfo(m_scene);
// Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
// Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
MainLog.Instance.Verbose("Loading " + script.Key);
script.Value.Initialise(scriptInfo);
scripts.Add(script.Value);
@ -127,7 +127,7 @@ namespace OpenSim.Region.ExtensionsScriptModule
{
MainLog.Instance.Verbose("Loading script " + script.Name);
ScriptInfo scriptInfo = new ScriptInfo(m_scene);
// Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
// Since each script could potentially corrupt their access with a stray assignment, making a new one for each script.
script.Initialise(scriptInfo);
scripts.Add(script);

View File

@ -246,4 +246,4 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
{
}
}
}
}

View File

@ -59,7 +59,7 @@ namespace OpenSim.Region.Physics.Manager
public abstract Quaternion Orientation { get; set; }
public abstract bool Flying { get; set; }
public abstract bool IsColliding { get; set; }
public abstract bool Kinematic { get; set; }
@ -105,6 +105,7 @@ namespace OpenSim.Region.Physics.Manager
get { return false; }
set { return; }
}
public override bool IsColliding
{
get { return false; }
@ -127,4 +128,4 @@ namespace OpenSim.Region.Physics.Manager
return;
}
}
}
}

View File

@ -26,7 +26,7 @@
*
*/
/* Channel
/* Channel
* A channel is a single heightmap array
* */

View File

@ -47,7 +47,7 @@ namespace libTerrain
thisFrame = (double[,]) map.Clone();
NeighbourSystem type = NeighbourSystem.Moore;
// Using moore neighbourhood (twice as computationally expensive)
// Using moore neighbourhood (twice as computationally expensive)
int NEIGHBOUR_ME = 4; // I am always 4 in both systems.
int NEIGHBOUR_MAX = type == NeighbourSystem.Moore ? 9 : 5;