diff --git a/code/nel/include/nel/sound/mixing_track.h b/code/nel/include/nel/sound/mixing_track.h index 4ca328b7b..98f97db42 100644 --- a/code/nel/include/nel/sound/mixing_track.h +++ b/code/nel/include/nel/sound/mixing_track.h @@ -38,7 +38,7 @@ class CTrack { public: /// Constructor - CTrack() : m_PhysicalSource(NULL), m_LogicalSource(NULL) { } + CTrack() : m_LogicalSource(NULL), m_PhysicalSource(NULL) { } /// Init inline void init(ISoundDriver *soundDriver) { m_PhysicalSource = soundDriver->createSource(); } /// Destructor diff --git a/code/nel/src/misc/eval_num_expr.cpp b/code/nel/src/misc/eval_num_expr.cpp index 723b25b75..449277bbc 100644 --- a/code/nel/src/misc/eval_num_expr.cpp +++ b/code/nel/src/misc/eval_num_expr.cpp @@ -270,7 +270,7 @@ CEvalNumExpr::TReturnState CEvalNumExpr::getNextToken (TToken &token) return NoError; } // Is a number ? - else if ((currentChar >= '0') && (currentChar <= '9') || (currentChar == '.')) + else if (((currentChar >= '0') && (currentChar <= '9')) || (currentChar == '.')) { // This is a number token = Number; diff --git a/code/nel/src/net/naming_client.cpp b/code/nel/src/net/naming_client.cpp index cfc47a7ff..5c735cf97 100644 --- a/code/nel/src/net/naming_client.cpp +++ b/code/nel/src/net/naming_client.cpp @@ -231,7 +231,7 @@ static TCallbackItem NamingClientCallbackArray[] = void CNamingClient::connect( const CInetAddress &addr, CCallbackNetBase::TRecordingState rec, const vector &/* addresses */ ) { - nlassert (_Connection == NULL || _Connection != NULL && !_Connection->connected ()); + nlassert (_Connection == NULL || (_Connection != NULL && !_Connection->connected ())); if (_Connection == NULL) { diff --git a/code/nel/src/pacs/build_indoor.cpp b/code/nel/src/pacs/build_indoor.cpp index 672088fa8..06e0b1bff 100644 --- a/code/nel/src/pacs/build_indoor.cpp +++ b/code/nel/src/pacs/build_indoor.cpp @@ -185,7 +185,7 @@ void followBorder(CInteriorSurface &surface, uint first, uint edge, uint sens, v loop = false; // -1 means no neighbor at all, -2 means a neighbor that is not available yet sint32 thisOpposite = (next != NULL) ? next->InternalSurface : (current->Visibility[nextEdge] ? -1 : -2); - if (thisOpposite != currentSurfId && thisOpposite != oppositeSurfId || + if ((thisOpposite != currentSurfId && thisOpposite != oppositeSurfId) || (loop = (current->EdgeFlags[nextEdge] && !allowThis))) { // if reaches the end of the border, then quits. diff --git a/code/nel/src/pacs/collision_mesh_build.h b/code/nel/src/pacs/collision_mesh_build.h index 0a373703a..80c0bf463 100644 --- a/code/nel/src/pacs/collision_mesh_build.h +++ b/code/nel/src/pacs/collision_mesh_build.h @@ -182,8 +182,8 @@ public: // check each edge of each face for (i=0; i= CCollisionFace::InteriorSurfaceFirst && !linkInterior) + if ((Faces[i].Surface == CCollisionFace::ExteriorSurface && linkInterior) || + (Faces[i].Surface >= CCollisionFace::InteriorSurfaceFirst && !linkInterior)) continue; for (j=0; j<3; ++j) diff --git a/code/nel/src/pacs/local_retriever.cpp b/code/nel/src/pacs/local_retriever.cpp index bcfe5d19a..6bde93706 100644 --- a/code/nel/src/pacs/local_retriever.cpp +++ b/code/nel/src/pacs/local_retriever.cpp @@ -95,7 +95,7 @@ const CVector &NLPACS::CLocalRetriever::getStartVector(uint32 chain, sint32 surf const COrderedChain3f &ochain = onLeft ? _FullOrderedChains[_Chains[chain].getSubChains().front()] : _FullOrderedChains[_Chains[chain].getSubChains().back()]; - if (ochain.isForward() && onLeft || !ochain.isForward() && !onLeft) + if (ochain.isForward() == onLeft) return ochain.getVertices().front(); else return ochain.getVertices().back(); @@ -107,7 +107,7 @@ const CVector &NLPACS::CLocalRetriever::getStopVector(uint32 chain, sint32 surfa const COrderedChain3f &ochain = onLeft ? _FullOrderedChains[_Chains[chain].getSubChains().back()] : _FullOrderedChains[_Chains[chain].getSubChains().front()]; - if (ochain.isForward() && onLeft || !ochain.isForward() && !onLeft) + if (ochain.isForward() == onLeft) return ochain.getVertices().back(); else return ochain.getVertices().front(); @@ -525,7 +525,7 @@ void NLPACS::CLocalRetriever::computeLoopsAndTips() nlwarning("loopCloseDistance=%f", loopCloseDistance); nlerror("Couldn't close loop on surface=%d", i); } - else if (best > 1.0e0f && loopCloseDistance < 3.0e-2f || + else if ((best > 1.0e0f && loopCloseDistance < 3.0e-2f) || loopCloseDistance < 1.0e-3f) { break; @@ -1132,8 +1132,8 @@ void NLPACS::CLocalRetriever::retrievePosition(CVector estimated, CCollisionSurf ++stop; // if upper or lower the bounds, do nothing - if (estim.y > vertices[start].y && estim.y > vertices[stop].y || - estim.y < vertices[start].y && estim.y < vertices[stop].y) + if ((estim.y > vertices[start].y && estim.y > vertices[stop].y) || + (estim.y < vertices[start].y && estim.y < vertices[stop].y)) continue; isOnBorder = true; @@ -1306,8 +1306,8 @@ void NLPACS::CLocalRetriever::retrieveAccuratePosition(CVector2s estim, CCollisi ++stop; // if upper or lower the bounds, do nothing - if (estim.y > vertices[start].y && estim.y > vertices[stop].y || - estim.y < vertices[start].y && estim.y < vertices[stop].y) + if ((estim.y > vertices[start].y && estim.y > vertices[stop].y) || + (estim.y < vertices[start].y && estim.y < vertices[stop].y)) continue; onBorder = true; @@ -1839,7 +1839,7 @@ void NLPACS::CLocalRetriever::findPath(const NLPACS::CLocalRetriever::CLocalPosi thisChainId = surface._Chains[loop[loopIndex]].Chain; thisChainForward = (_Chains[thisChainId].getLeft() == surfaceId); - thisOChainIndex = (thisChainForward && forward || !thisChainForward && !forward) ? + thisOChainIndex = (thisChainForward == forward) ? 0 : (sint)_Chains[thisChainId]._SubChains.size()-1; } diff --git a/code/nel/src/sound/simple_source.cpp b/code/nel/src/sound/simple_source.cpp index 4450aa883..a25068400 100644 --- a/code/nel/src/sound/simple_source.cpp +++ b/code/nel/src/sound/simple_source.cpp @@ -30,9 +30,9 @@ namespace NLSOUND { CSimpleSource::CSimpleSource(CSimpleSound *simpleSound, bool spawn, TSpawnEndCallback cb, void *cbUserParam, NL3D::CCluster *cluster) : CSourceCommon(simpleSound, spawn, cb, cbUserParam, cluster), + _SimpleSound(simpleSound), _Track(NULL), - _PlayMuted(false), - _SimpleSound(simpleSound) + _PlayMuted(false) { nlassert(_SimpleSound != 0);