@ -39,7 +39,7 @@ namespace MWMechanics
/// \brief AiPackage for an actor to follow another actor/the PC
/** The AI will follow the target until a condition (time, or position) are set. Both can be disabled to cause the actor to follow the other indefinitely
* */
class AiFollow : public AiPackage
class AiFollow final : public AiPackage
{
public :
AiFollow ( const std : : string & actorId , float duration , float x , float y , float z ) ;
@ -53,30 +53,30 @@ namespace MWMechanics
AiFollow ( const ESM : : AiSequence : : AiFollow * follow ) ;
virtual bool sideWithTarget ( ) const { return true ; }
virtual bool followTargetThroughDoors ( ) const { return true ; }
virtual bool shouldCancelPreviousAi ( ) const { return ! mCommanded ; }
bool sideWithTarget ( ) const final { return true ; }
bool followTargetThroughDoors ( ) const final { return true ; }
bool shouldCancelPreviousAi ( ) const final { return ! mCommanded ; }
virtual AiFollow * clone ( ) const ;
AiFollow * clone ( ) const final ;
virtual bool execute ( const MWWorld : : Ptr & actor , CharacterController & characterController , AiState & state , float duration ) ;
bool execute ( const MWWorld : : Ptr & actor , CharacterController & characterController , AiState & state , float duration ) final ;
virtual int getTypeId ( ) const ;
int getTypeId ( ) const final ;
virtual bool useVariableSpeed ( ) const { return true ; }
bool useVariableSpeed ( ) const final { return true ; }
/// Returns the actor being followed
std : : string getFollowedActor ( ) ;
virtual void writeState ( ESM : : AiSequence : : AiSequence & sequence ) const ;
void writeState ( ESM : : AiSequence : : AiSequence & sequence ) const final ;
bool isCommanded ( ) const ;
int getFollowIndex ( ) const ;
void fastForward ( const MWWorld : : Ptr & actor , AiState & state ) ;
void fastForward ( const MWWorld : : Ptr & actor , AiState & state ) final ;
virtual osg : : Vec3f getDestination ( ) const
osg : : Vec3f getDestination ( ) const final
{
MWWorld : : Ptr target = getTarget ( ) ;
if ( target . isEmpty ( ) )