diff --git a/apps/openmw/mwmechanics/aiactivate.cpp b/apps/openmw/mwmechanics/aiactivate.cpp index 464b30c7c..b94c8c259 100644 --- a/apps/openmw/mwmechanics/aiactivate.cpp +++ b/apps/openmw/mwmechanics/aiactivate.cpp @@ -1,8 +1,8 @@ #include "aiactivate.hpp" #include -MWMechanics::AiActivate::AiActivate(const std::string &objectID): -mObjectID(objectID) +MWMechanics::AiActivate::AiActivate(const std::string &objectId) +: mObjectId(objectId) { } MWMechanics::AiActivate *MWMechanics::AiActivate::clone() const diff --git a/apps/openmw/mwmechanics/aiactivate.hpp b/apps/openmw/mwmechanics/aiactivate.hpp index 5744cb25b..7f3d4016d 100644 --- a/apps/openmw/mwmechanics/aiactivate.hpp +++ b/apps/openmw/mwmechanics/aiactivate.hpp @@ -7,17 +7,17 @@ namespace MWMechanics { - class AiActivate : AiPackage + class AiActivate : public AiPackage { public: - AiActivate(const std::string &objectID); + AiActivate(const std::string &objectId); virtual AiActivate *clone() const; virtual bool execute (const MWWorld::Ptr& actor); ///< \return Package completed? virtual int getTypeId() const; private: - std::string mObjectID; + std::string mObjectId; }; } #endif // GAME_MWMECHANICS_AIACTIVATE_H diff --git a/apps/openmw/mwmechanics/aiescort.cpp b/apps/openmw/mwmechanics/aiescort.cpp index 9f170ef6e..27cd9095d 100644 --- a/apps/openmw/mwmechanics/aiescort.cpp +++ b/apps/openmw/mwmechanics/aiescort.cpp @@ -1,10 +1,11 @@ #include "aiescort.hpp" #include -MWMechanics::AiEscort::AiEscort(const std::string &actorID,int duration, float x, float y, float z): -mActorID(actorID), mDuration(duration), mX(x), mY(y), mZ(z) +MWMechanics::AiEscort::AiEscort(const std::string &actorId,int duration, float x, float y, float z) +: mActorId(actorId), mX(x), mY(y), mZ(z), mDuration(duration) { } + MWMechanics::AiEscort *MWMechanics::AiEscort::clone() const { return new AiEscort(*this); @@ -21,25 +22,3 @@ int MWMechanics::AiEscort::getTypeId() const return 2; } -float MWMechanics::AiEscort::getX() -{ - return mX; -} -float MWMechanics::AiEscort::getY() -{ - return mY; -} -float MWMechanics::AiEscort::getZ() -{ - return mZ; -} - -std::string MWMechanics::AiEscort::getActorID() -{ - return mActorID; -} - -int MWMechanics::AiEscort::getDuration() -{ - return mDuration; -} diff --git a/apps/openmw/mwmechanics/aiescort.hpp b/apps/openmw/mwmechanics/aiescort.hpp index 4bd3f4b22..fef70f508 100644 --- a/apps/openmw/mwmechanics/aiescort.hpp +++ b/apps/openmw/mwmechanics/aiescort.hpp @@ -9,21 +9,16 @@ namespace MWMechanics class AiEscort : public AiPackage { public: - AiEscort(const std::string &actorID,int duration, float x, float y, float z); + AiEscort(const std::string &actorId,int duration, float x, float y, float z); virtual AiEscort *clone() const; virtual bool execute (const MWWorld::Ptr& actor); - ///< \return Package completed? + ///< \return Package completed? virtual int getTypeId() const; - float getX(); - float getY(); - float getZ(); - std::string getActorID(); - int getDuration(); private: - std::string mActorID; + std::string mActorId; float mX; float mY; float mZ; diff --git a/apps/openmw/mwmechanics/aifollow.cpp b/apps/openmw/mwmechanics/aifollow.cpp index 6478544bc..3fee6d98c 100644 --- a/apps/openmw/mwmechanics/aifollow.cpp +++ b/apps/openmw/mwmechanics/aifollow.cpp @@ -1,8 +1,8 @@ #include "aifollow.hpp" #include -MWMechanics::AiFollow::AiFollow(const std::string &actorID,float duration, float x, float y, float z): -mActorID(actorID), mDuration(duration), mX(x), mY(y), mZ(z) +MWMechanics::AiFollow::AiFollow(const std::string &actorId,float duration, float x, float y, float z) +: mDuration(duration), mX(x), mY(y), mZ(z), mActorId(actorId) { } MWMechanics::AiFollow *MWMechanics::AiFollow::clone() const diff --git a/apps/openmw/mwmechanics/aifollow.hpp b/apps/openmw/mwmechanics/aifollow.hpp index 079c3c381..ded13d780 100644 --- a/apps/openmw/mwmechanics/aifollow.hpp +++ b/apps/openmw/mwmechanics/aifollow.hpp @@ -7,10 +7,10 @@ namespace MWMechanics { - class AiFollow : AiPackage + class AiFollow : public AiPackage { public: - AiFollow(const std::string &ActorID,float duration, float X, float Y, float Z); + AiFollow(const std::string &ActorId,float duration, float X, float Y, float Z); virtual AiFollow *clone() const; virtual bool execute (const MWWorld::Ptr& actor); ///< \return Package completed? @@ -21,7 +21,7 @@ namespace MWMechanics float mX; float mY; float mZ; - std::string mActorID; + std::string mActorId; }; } #endif diff --git a/apps/openmw/mwmechanics/aitravel.cpp b/apps/openmw/mwmechanics/aitravel.cpp index d07d30228..897dd1748 100644 --- a/apps/openmw/mwmechanics/aitravel.cpp +++ b/apps/openmw/mwmechanics/aitravel.cpp @@ -1,8 +1,8 @@ #include "aitravel.hpp" #include -MWMechanics::AiTravel::AiTravel(float x, float y, float z): -mX(x),mY(y),mZ(z) +MWMechanics::AiTravel::AiTravel(float x, float y, float z) +: mX(x),mY(y),mZ(z) { } @@ -22,18 +22,4 @@ int MWMechanics::AiTravel::getTypeId() const return 1; } -float MWMechanics::AiTravel::getX() -{ - return mX; -} - -float MWMechanics::AiTravel::getY() -{ - return mY; -} - -float MWMechanics::AiTravel::getZ() -{ - return mZ; -} diff --git a/apps/openmw/mwmechanics/aitravel.hpp b/apps/openmw/mwmechanics/aitravel.hpp index 813ba81eb..1c6abbf27 100644 --- a/apps/openmw/mwmechanics/aitravel.hpp +++ b/apps/openmw/mwmechanics/aitravel.hpp @@ -15,10 +15,6 @@ namespace MWMechanics ///< \return Package completed? virtual int getTypeId() const; - float getX(); - float getY(); - float getZ(); - private: float mX; diff --git a/apps/openmw/mwmechanics/aiwander.cpp b/apps/openmw/mwmechanics/aiwander.cpp index 38d913f5f..e9db6d212 100644 --- a/apps/openmw/mwmechanics/aiwander.cpp +++ b/apps/openmw/mwmechanics/aiwander.cpp @@ -1,26 +1,11 @@ #include "aiwander.hpp" #include -MWMechanics::AiWander::AiWander(int distance, int duration, int timeOfDay,std::vector idle): +MWMechanics::AiWander::AiWander(int distance, int duration, int timeOfDay, const std::vector& idle): mDistance(distance), mDuration(duration), mTimeOfDay(timeOfDay), mIdle(idle) { } -int MWMechanics::AiWander::getDistance() const -{ - return mDistance; -} - -int MWMechanics::AiWander::getDuration() const -{ - return mDuration; -} - -int MWMechanics::AiWander::getTimeOfDay() const -{ - return mTimeOfDay; -} - MWMechanics::AiPackage * MWMechanics::AiWander::clone() const { return new AiWander(*this); @@ -36,8 +21,3 @@ int MWMechanics::AiWander::getTypeId() const { return 0; } - -int MWMechanics::AiWander::getIdle(int index) const -{ - return mIdle.at(index); -} diff --git a/apps/openmw/mwmechanics/aiwander.hpp b/apps/openmw/mwmechanics/aiwander.hpp index 6b53390a1..a71858feb 100644 --- a/apps/openmw/mwmechanics/aiwander.hpp +++ b/apps/openmw/mwmechanics/aiwander.hpp @@ -11,24 +11,19 @@ namespace MWMechanics { public: - AiWander(int distance, int duration, int timeOfDay,std::vector idle); + AiWander(int distance, int duration, int timeOfDay, const std::vector& idle); virtual AiPackage *clone() const; virtual bool execute (const MWWorld::Ptr& actor); ///< \return Package completed? virtual int getTypeId() const; ///< 0: Wander - int getDistance() const; - int getDuration()const; - int getTimeOfDay()const; - int getIdle(int index) const; - private: int mDistance; int mDuration; - int mTimeOfDay; + int mTimeOfDay; std::vector mIdle; }; } -#endif // AIWANDER_H +#endif