openmw-tes3coop/apps/openmw/mwmechanics/aiwander.cpp

48 lines
926 B
C++
Raw Normal View History

2012-11-14 17:42:04 +00:00
#include "aiwander.hpp"
2012-11-15 21:15:20 +00:00
#include <iostream>
2012-11-14 17:42:04 +00:00
2012-11-15 21:15:20 +00:00
MWMechanics::AiWander::AiWander(int distance, int duration, int timeOfDay,std::vector<int> Idle):
mDistance(distance), mDuration(duration), mTimeOfDay(timeOfDay), mIdle(Idle)
2012-11-14 17:42:04 +00:00
{
}
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);
}
bool MWMechanics::AiWander::execute (const MWWorld::Ptr& actor)
{
2012-11-15 21:15:20 +00:00
std::cout << "AiWadner completed.\n";
2012-11-14 17:42:04 +00:00
return true;
}
int MWMechanics::AiWander::getTypeId() const
{
return 0;
}
int MWMechanics::AiWander::getIdle(int index) const
{
if(index < 0 || (uint)index > mIdle.size())
return -1;
int temp;
temp = mIdle.at(index);
return temp;
}