mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 09:06:43 +00:00
anonymous namespace
This commit is contained in:
parent
0a187e56aa
commit
905cff2a94
2 changed files with 14 additions and 9 deletions
|
@ -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,9 +4,8 @@
|
|||
#include "boost/tuple/tuple.hpp"
|
||||
#include "OgreMath.h"
|
||||
|
||||
namespace MWMechanics
|
||||
namespace
|
||||
{
|
||||
|
||||
//helpers functions
|
||||
float distanceZCorrected(ESM::Pathgrid::Point point,float x,float y,float 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…
Reference in a new issue