From 7f0d836d35e579632413e1b06d5f5e6e6981ca05 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 31 Oct 2007 05:29:51 +0000 Subject: made illogical bitwise operations logical --- OpenSim/Framework/Communications/Cache/AssetCache.cs | 2 +- OpenSim/Region/Environment/Modules/TextureDownloadModule.cs | 2 +- OpenSim/Region/Environment/Scenes/Scene.cs | 4 ++-- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 +- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index ca2fc35..5457d14 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -681,7 +681,7 @@ namespace OpenSim.Framework.Communications.Cache SendPacket(); counter++; - if ((request.PacketCounter >= request.NumPackets) | counter > 100 | (request.NumPackets == 1) | + if ((request.PacketCounter >= request.NumPackets) || counter > 100 || (request.NumPackets == 1) || (request.DiscardLevel == -1)) { return true; diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs index 66c499b..5ba5941 100644 --- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs @@ -187,7 +187,7 @@ namespace OpenSim.Region.Environment.Modules { SendPacket(); counter++; - if ((PacketCounter >= NumPackets) | counter > 100 | (NumPackets == 1) | (request.DiscardLevel == -1)) + if ((PacketCounter >= NumPackets) || counter > 100 || (NumPackets == 1) || (request.DiscardLevel == -1)) { return true; } diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 0a2a5a3..279f34e 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -653,7 +653,7 @@ namespace OpenSim.Region.Environment.Scenes XmlDocument doc = new XmlDocument(); XmlNode rootNode; int primCount = 0; - if ((fileName.StartsWith("http:")) | (File.Exists(fileName))) + if (fileName.StartsWith("http:") || File.Exists(fileName)) { XmlTextReader reader = new XmlTextReader(fileName); reader.WhitespaceHandling = WhitespaceHandling.None; @@ -710,7 +710,7 @@ namespace OpenSim.Region.Environment.Scenes { XmlDocument doc = new XmlDocument(); XmlNode rootNode; - if ((fileName.StartsWith("http:")) | (File.Exists(fileName))) + if (fileName.StartsWith("http:") || File.Exists(fileName)) { XmlTextReader reader = new XmlTextReader(fileName); reader.WhitespaceHandling = WhitespaceHandling.None; diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index b9c723b..56c1401 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -338,7 +338,7 @@ namespace OpenSim.Region.Environment.Scenes updateCount++; } - if (m_partsUpdateQueue.Count < 1 | updateCount > 60) + if (m_partsUpdateQueue.Count < 1 || updateCount > 60) { runUpdate = false; } diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 4afe784..82b94db 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -333,13 +333,13 @@ namespace OpenSim.Region.Physics.OdePlugin step_time += timeStep; lock (OdeLock) { - if (_characters.Count > 0 & RENDER_FLAG) + if (_characters.Count > 0 && RENDER_FLAG) { Console.WriteLine("RENDER: frame"); } foreach (OdePrim p in _prims) { - if (_characters.Count > 0 & RENDER_FLAG) + if (_characters.Count > 0 && RENDER_FLAG) { Vector3 rx, ry, rz; p.Orientation.ToAxes(out rx, out ry, out rz); @@ -607,7 +607,7 @@ namespace OpenSim.Region.Physics.OdePlugin d.Vector3 vel = d.BodyGetLinearVel(Body); // if velocity is zero, use position control; otherwise, velocity control - if (_target_velocity.X == 0.0f & _target_velocity.Y == 0.0f & _target_velocity.Z == 0.0f & iscolliding) + if (_target_velocity.X == 0.0f && _target_velocity.Y == 0.0f && _target_velocity.Z == 0.0f && iscolliding) { // keep track of where we stopped. No more slippin' & slidin' if (!_zeroFlag) -- cgit v1.1