mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Add mHidden field to AiTravel
This commit is contained in:
parent
81f29d8dcd
commit
5105c67642
4 changed files with 10 additions and 7 deletions
|
@ -48,7 +48,8 @@ namespace MWMechanics
|
||||||
TypeIdPursue = 6,
|
TypeIdPursue = 6,
|
||||||
TypeIdAvoidDoor = 7,
|
TypeIdAvoidDoor = 7,
|
||||||
TypeIdFace = 8,
|
TypeIdFace = 8,
|
||||||
TypeIdBreathe = 9
|
TypeIdBreathe = 9,
|
||||||
|
TypeIdInternalTravel = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
///Default constructor
|
///Default constructor
|
||||||
|
|
|
@ -28,15 +28,14 @@ bool isWithinMaxRange(const osg::Vec3f& pos1, const osg::Vec3f& pos2)
|
||||||
|
|
||||||
namespace MWMechanics
|
namespace MWMechanics
|
||||||
{
|
{
|
||||||
AiTravel::AiTravel(float x, float y, float z)
|
AiTravel::AiTravel(float x, float y, float z, bool hidden)
|
||||||
: mX(x),mY(y),mZ(z)
|
: mX(x),mY(y),mZ(z),mHidden(hidden)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
AiTravel::AiTravel(const ESM::AiSequence::AiTravel *travel)
|
AiTravel::AiTravel(const ESM::AiSequence::AiTravel *travel)
|
||||||
: mX(travel->mData.mX), mY(travel->mData.mY), mZ(travel->mData.mZ)
|
: mX(travel->mData.mX), mY(travel->mData.mY), mZ(travel->mData.mZ)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AiTravel *MWMechanics::AiTravel::clone() const
|
AiTravel *MWMechanics::AiTravel::clone() const
|
||||||
|
@ -64,7 +63,8 @@ namespace MWMechanics
|
||||||
|
|
||||||
int AiTravel::getTypeId() const
|
int AiTravel::getTypeId() const
|
||||||
{
|
{
|
||||||
return TypeIdTravel;
|
// TODO: store mHidden in the savegame?
|
||||||
|
return mHidden ? TypeIdInternalTravel : TypeIdTravel;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AiTravel::fastForward(const MWWorld::Ptr& actor, AiState& state)
|
void AiTravel::fastForward(const MWWorld::Ptr& actor, AiState& state)
|
||||||
|
|
|
@ -20,7 +20,7 @@ namespace MWMechanics
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// Default constructor
|
/// Default constructor
|
||||||
AiTravel(float x, float y, float z);
|
AiTravel(float x, float y, float z, bool hidden = false);
|
||||||
AiTravel(const ESM::AiSequence::AiTravel* travel);
|
AiTravel(const ESM::AiSequence::AiTravel* travel);
|
||||||
|
|
||||||
/// Simulates the passing of time
|
/// Simulates the passing of time
|
||||||
|
@ -38,6 +38,8 @@ namespace MWMechanics
|
||||||
float mX;
|
float mX;
|
||||||
float mY;
|
float mY;
|
||||||
float mZ;
|
float mZ;
|
||||||
|
|
||||||
|
bool mHidden;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1620,7 +1620,7 @@ namespace MWMechanics
|
||||||
dest = activePackage->getDestination(ptr);
|
dest = activePackage->getDestination(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
MWMechanics::AiTravel travelPackage(dest.x(), dest.y(), dest.z());
|
MWMechanics::AiTravel travelPackage(dest.x(), dest.y(), dest.z(), true);
|
||||||
aiSequence.stack(travelPackage, ptr, false);
|
aiSequence.stack(travelPackage, ptr, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue