1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Fix compile error & warnings

This commit is contained in:
scrawl 2013-03-26 18:01:01 +01:00
parent 2ecd2f4ecd
commit efe6a3ebee
2 changed files with 33 additions and 33 deletions

View File

@ -46,7 +46,7 @@ int getClosestPoint(const ESM::Pathgrid* grid,float x,float y,float z)
float m = distance(grid->mPoints[0],x,y,z); float m = distance(grid->mPoints[0],x,y,z);
int i0 = 0; int i0 = 0;
for(int i=1; i<grid->mPoints.size();i++) for(unsigned int i=1; i<grid->mPoints.size();++i)
{ {
if(distance(grid->mPoints[i],x,y,z)<m) if(distance(grid->mPoints[i],x,y,z)<m)
{ {
@ -139,7 +139,7 @@ PathGridGraph buildGraph(const ESM::Pathgrid* pathgrid,float xCell = 0,float yCe
{ {
PathGridGraph graph; PathGridGraph graph;
for(int i = 0;i<pathgrid->mPoints.size();i++) for(unsigned int i = 0;i<pathgrid->mPoints.size();++i)
{ {
PointID pID = boost::add_vertex(graph); PointID pID = boost::add_vertex(graph);
graph[pID].mX = pathgrid->mPoints[i].mX + xCell; graph[pID].mX = pathgrid->mPoints[i].mX + xCell;
@ -147,7 +147,7 @@ PathGridGraph buildGraph(const ESM::Pathgrid* pathgrid,float xCell = 0,float yCe
graph[pID].mZ = pathgrid->mPoints[i].mZ; graph[pID].mZ = pathgrid->mPoints[i].mZ;
} }
for(int i = 0;i<pathgrid->mEdges.size();i++) for(unsigned int i = 0;i<pathgrid->mEdges.size();++i)
{ {
PointID u = pathgrid->mEdges[i].mV0; PointID u = pathgrid->mEdges[i].mV0;
PointID v = pathgrid->mEdges[i].mV1; PointID v = pathgrid->mEdges[i].mV1;

View File

@ -1,35 +1,35 @@
#ifndef GAME_MWMECHANICS_AITRAVEL_H #ifndef GAME_MWMECHANICS_AITRAVEL_H
#define GAME_MWMECHANICS_AITRAVEL_H #define GAME_MWMECHANICS_AITRAVEL_H
#include "aipackage.hpp" #include "aipackage.hpp"
#include "components\esm\loadpgrd.hpp" #include <components/esm/loadpgrd.hpp>
#include <list> #include <list>
namespace MWMechanics namespace MWMechanics
{ {
class AiTravel : public AiPackage class AiTravel : public AiPackage
{ {
public: public:
AiTravel(float x, float y, float z); AiTravel(float x, float y, float z);
virtual AiTravel *clone() const; virtual AiTravel *clone() const;
virtual bool execute (const MWWorld::Ptr& actor); virtual bool execute (const MWWorld::Ptr& actor);
///< \return Package completed? ///< \return Package completed?
virtual int getTypeId() const; virtual int getTypeId() const;
private: private:
float mX; float mX;
float mY; float mY;
float mZ; float mZ;
int cellX; int cellX;
int cellY; int cellY;
bool isPathConstructed; bool isPathConstructed;
std::list<ESM::Pathgrid::Point> mPath; std::list<ESM::Pathgrid::Point> mPath;
}; };
} }
#endif #endif