made illogical bitwise operations logical

afrisby
Jeff Ames 2007-10-31 05:29:51 +00:00
parent 33d6222e8d
commit 7f0d836d35
5 changed files with 8 additions and 8 deletions

View File

@ -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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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)