anonymous namespace

actorid
gus 12 years ago
parent 0a187e56aa
commit 905cff2a94

@ -13,6 +13,15 @@
#include <boost/graph/adjacency_list.hpp>
#include "boost/tuple/tuple.hpp"
namespace
{
float sgn(float a)
{
if(a>0) return 1.;
else return -1.;
}
}
namespace MWMechanics
{
@ -26,12 +35,6 @@ namespace MWMechanics
return new AiTravel(*this);
}
static float sgn(float a)
{
if(a>0) return 1.;
else return -1.;
}
bool AiTravel::execute (const MWWorld::Ptr& actor)
{
const ESM::Pathgrid *pathgrid =

@ -4,10 +4,9 @@
#include "boost/tuple/tuple.hpp"
#include "OgreMath.h"
namespace MWMechanics
namespace
{
//helpers functions
//helpers functions
float distanceZCorrected(ESM::Pathgrid::Point point,float x,float y,float z)
{
return sqrt((point.mX - x)*(point.mX - x)+(point.mY - y)*(point.mY - y)+0.1*(point.mZ - z)*(point.mZ - z));
@ -89,7 +88,10 @@ namespace MWMechanics
const PathGridGraph & mGraph;
PointID mGoal;
};
}
namespace MWMechanics
{
PathGridGraph buildGraph(const ESM::Pathgrid* pathgrid,float xCell = 0,float yCell = 0)
{
PathGridGraph graph;

Loading…
Cancel
Save