merge
This commit is contained in:
commit
42a098c625
8 changed files with 17 additions and 17 deletions
|
@ -38,7 +38,7 @@ class CTrack
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
CTrack() : m_PhysicalSource(NULL), m_LogicalSource(NULL) { }
|
CTrack() : m_LogicalSource(NULL), m_PhysicalSource(NULL) { }
|
||||||
/// Init
|
/// Init
|
||||||
inline void init(ISoundDriver *soundDriver) { m_PhysicalSource = soundDriver->createSource(); }
|
inline void init(ISoundDriver *soundDriver) { m_PhysicalSource = soundDriver->createSource(); }
|
||||||
/// Destructor
|
/// Destructor
|
||||||
|
|
|
@ -270,7 +270,7 @@ CEvalNumExpr::TReturnState CEvalNumExpr::getNextToken (TToken &token)
|
||||||
return NoError;
|
return NoError;
|
||||||
}
|
}
|
||||||
// Is a number ?
|
// Is a number ?
|
||||||
else if ((currentChar >= '0') && (currentChar <= '9') || (currentChar == '.'))
|
else if (((currentChar >= '0') && (currentChar <= '9')) || (currentChar == '.'))
|
||||||
{
|
{
|
||||||
// This is a number
|
// This is a number
|
||||||
token = Number;
|
token = Number;
|
||||||
|
|
|
@ -231,7 +231,7 @@ static TCallbackItem NamingClientCallbackArray[] =
|
||||||
|
|
||||||
void CNamingClient::connect( const CInetAddress &addr, CCallbackNetBase::TRecordingState rec, const vector<CInetAddress> &/* addresses */ )
|
void CNamingClient::connect( const CInetAddress &addr, CCallbackNetBase::TRecordingState rec, const vector<CInetAddress> &/* addresses */ )
|
||||||
{
|
{
|
||||||
nlassert (_Connection == NULL || _Connection != NULL && !_Connection->connected ());
|
nlassert (_Connection == NULL || (_Connection != NULL && !_Connection->connected ()));
|
||||||
|
|
||||||
if (_Connection == NULL)
|
if (_Connection == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -185,7 +185,7 @@ void followBorder(CInteriorSurface &surface, uint first, uint edge, uint sens, v
|
||||||
loop = false;
|
loop = false;
|
||||||
// -1 means no neighbor at all, -2 means a neighbor that is not available yet
|
// -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);
|
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)))
|
(loop = (current->EdgeFlags[nextEdge] && !allowThis)))
|
||||||
{
|
{
|
||||||
// if reaches the end of the border, then quits.
|
// if reaches the end of the border, then quits.
|
||||||
|
|
|
@ -182,8 +182,8 @@ public:
|
||||||
// check each edge of each face
|
// check each edge of each face
|
||||||
for (i=0; i<Faces.size(); ++i)
|
for (i=0; i<Faces.size(); ++i)
|
||||||
{
|
{
|
||||||
if (Faces[i].Surface == CCollisionFace::ExteriorSurface && linkInterior ||
|
if ((Faces[i].Surface == CCollisionFace::ExteriorSurface && linkInterior) ||
|
||||||
Faces[i].Surface >= CCollisionFace::InteriorSurfaceFirst && !linkInterior)
|
(Faces[i].Surface >= CCollisionFace::InteriorSurfaceFirst && !linkInterior))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (j=0; j<3; ++j)
|
for (j=0; j<3; ++j)
|
||||||
|
|
|
@ -95,7 +95,7 @@ const CVector &NLPACS::CLocalRetriever::getStartVector(uint32 chain, sint32 surf
|
||||||
const COrderedChain3f &ochain = onLeft ? _FullOrderedChains[_Chains[chain].getSubChains().front()] :
|
const COrderedChain3f &ochain = onLeft ? _FullOrderedChains[_Chains[chain].getSubChains().front()] :
|
||||||
_FullOrderedChains[_Chains[chain].getSubChains().back()];
|
_FullOrderedChains[_Chains[chain].getSubChains().back()];
|
||||||
|
|
||||||
if (ochain.isForward() && onLeft || !ochain.isForward() && !onLeft)
|
if (ochain.isForward() == onLeft)
|
||||||
return ochain.getVertices().front();
|
return ochain.getVertices().front();
|
||||||
else
|
else
|
||||||
return ochain.getVertices().back();
|
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()] :
|
const COrderedChain3f &ochain = onLeft ? _FullOrderedChains[_Chains[chain].getSubChains().back()] :
|
||||||
_FullOrderedChains[_Chains[chain].getSubChains().front()];
|
_FullOrderedChains[_Chains[chain].getSubChains().front()];
|
||||||
|
|
||||||
if (ochain.isForward() && onLeft || !ochain.isForward() && !onLeft)
|
if (ochain.isForward() == onLeft)
|
||||||
return ochain.getVertices().back();
|
return ochain.getVertices().back();
|
||||||
else
|
else
|
||||||
return ochain.getVertices().front();
|
return ochain.getVertices().front();
|
||||||
|
@ -525,7 +525,7 @@ void NLPACS::CLocalRetriever::computeLoopsAndTips()
|
||||||
nlwarning("loopCloseDistance=%f", loopCloseDistance);
|
nlwarning("loopCloseDistance=%f", loopCloseDistance);
|
||||||
nlerror("Couldn't close loop on surface=%d", i);
|
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)
|
loopCloseDistance < 1.0e-3f)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
|
@ -1132,8 +1132,8 @@ void NLPACS::CLocalRetriever::retrievePosition(CVector estimated, CCollisionSurf
|
||||||
++stop;
|
++stop;
|
||||||
|
|
||||||
// if upper or lower the bounds, do nothing
|
// if upper or lower the bounds, do nothing
|
||||||
if (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)
|
(estim.y < vertices[start].y && estim.y < vertices[stop].y))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
isOnBorder = true;
|
isOnBorder = true;
|
||||||
|
@ -1306,8 +1306,8 @@ void NLPACS::CLocalRetriever::retrieveAccuratePosition(CVector2s estim, CCollisi
|
||||||
++stop;
|
++stop;
|
||||||
|
|
||||||
// if upper or lower the bounds, do nothing
|
// if upper or lower the bounds, do nothing
|
||||||
if (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)
|
(estim.y < vertices[start].y && estim.y < vertices[stop].y))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
onBorder = true;
|
onBorder = true;
|
||||||
|
@ -1839,7 +1839,7 @@ void NLPACS::CLocalRetriever::findPath(const NLPACS::CLocalRetriever::CLocalPosi
|
||||||
|
|
||||||
thisChainId = surface._Chains[loop[loopIndex]].Chain;
|
thisChainId = surface._Chains[loop[loopIndex]].Chain;
|
||||||
thisChainForward = (_Chains[thisChainId].getLeft() == surfaceId);
|
thisChainForward = (_Chains[thisChainId].getLeft() == surfaceId);
|
||||||
thisOChainIndex = (thisChainForward && forward || !thisChainForward && !forward) ?
|
thisOChainIndex = (thisChainForward == forward) ?
|
||||||
0 : (sint)_Chains[thisChainId]._SubChains.size()-1;
|
0 : (sint)_Chains[thisChainId]._SubChains.size()-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,9 @@ namespace NLSOUND {
|
||||||
|
|
||||||
CSimpleSource::CSimpleSource(CSimpleSound *simpleSound, bool spawn, TSpawnEndCallback cb, void *cbUserParam, NL3D::CCluster *cluster)
|
CSimpleSource::CSimpleSource(CSimpleSound *simpleSound, bool spawn, TSpawnEndCallback cb, void *cbUserParam, NL3D::CCluster *cluster)
|
||||||
: CSourceCommon(simpleSound, spawn, cb, cbUserParam, cluster),
|
: CSourceCommon(simpleSound, spawn, cb, cbUserParam, cluster),
|
||||||
|
_SimpleSound(simpleSound),
|
||||||
_Track(NULL),
|
_Track(NULL),
|
||||||
_PlayMuted(false),
|
_PlayMuted(false)
|
||||||
_SimpleSound(simpleSound)
|
|
||||||
{
|
{
|
||||||
nlassert(_SimpleSound != 0);
|
nlassert(_SimpleSound != 0);
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ sint main( sint argc, char ** argv )
|
||||||
if (its == itSkillEnd)
|
if (its == itSkillEnd)
|
||||||
{
|
{
|
||||||
nlwarning("ERROR : cannot find the parent skill %s for skill %s (skill %u)", (*itSkill).second.ParentSkill.c_str(), (*itSkill).second.SkillName.c_str(), count );
|
nlwarning("ERROR : cannot find the parent skill %s for skill %s (skill %u)", (*itSkill).second.ParentSkill.c_str(), (*itSkill).second.SkillName.c_str(), count );
|
||||||
nlstop("");
|
nlstop;
|
||||||
}
|
}
|
||||||
(*itSkill).second.ParentSkillPtr = &((*its).second);
|
(*itSkill).second.ParentSkillPtr = &((*its).second);
|
||||||
(*its).second.Children.push_back(&((*itSkill).second));
|
(*its).second.Children.push_back(&((*itSkill).second));
|
||||||
|
|
Loading…
Reference in a new issue