forked from teamnwah/openmw-tes3coop
the sgn function is no longer in the global namespace
This commit is contained in:
parent
1eb3d3e10e
commit
2be9405c96
1 changed files with 80 additions and 77 deletions
|
@ -13,24 +13,27 @@
|
|||
#include <boost/graph/adjacency_list.hpp>
|
||||
#include "boost/tuple/tuple.hpp"
|
||||
|
||||
MWMechanics::AiTravel::AiTravel(float x, float y, float z)
|
||||
namespace MWMechanics
|
||||
{
|
||||
|
||||
AiTravel::AiTravel(float x, float y, float z)
|
||||
: mX(x),mY(y),mZ(z),mPathFinder()
|
||||
{
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
MWMechanics::AiTravel * MWMechanics::AiTravel::clone() const
|
||||
{
|
||||
AiTravel * AiTravel::clone() const
|
||||
{
|
||||
return new AiTravel(*this);
|
||||
}
|
||||
}
|
||||
|
||||
float sgn(float a)
|
||||
{
|
||||
float sgn(float a)
|
||||
{
|
||||
if(a>0) return 1.;
|
||||
else return -1.;
|
||||
}
|
||||
}
|
||||
|
||||
bool MWMechanics::AiTravel::execute (const MWWorld::Ptr& actor)
|
||||
{
|
||||
bool AiTravel::execute (const MWWorld::Ptr& actor)
|
||||
{
|
||||
const ESM::Pathgrid *pathgrid =
|
||||
MWBase::Environment::get().getWorld()->getStore().get<ESM::Pathgrid>().search(*actor.getCell()->mCell);
|
||||
|
||||
|
@ -94,11 +97,11 @@ bool MWMechanics::AiTravel::execute (const MWWorld::Ptr& actor)
|
|||
MWWorld::Class::get(actor).getMovementSettings(actor).mForwardBackward = 1;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
int MWMechanics::AiTravel::getTypeId() const
|
||||
{
|
||||
int AiTravel::getTypeId() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue