mirror of
https://git.stillkill.net/MinecraftLeak/MinecraftConsoles-141217.git
synced 2026-10-24 05:52:19 +01:00
Initial commit
This commit is contained in:
commit
2dfcaaa842
5375 files changed
+978475
No files matched your search
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include "Goal.h"
|
||||
#include "EntitySelector.h"
|
||||
|
||||
class PathNavigation;
|
||||
class PathfinderMob;
|
||||
class Path;
|
||||
class AvoidPlayerGoal;
|
||||
|
||||
class AvoidPlayerGoalEntitySelector : public EntitySelector
|
||||
{
|
||||
private:
|
||||
AvoidPlayerGoal *m_parent;
|
||||
|
||||
public:
|
||||
AvoidPlayerGoalEntitySelector(AvoidPlayerGoal *parent);
|
||||
bool matches(shared_ptr<Entity> entity) const;
|
||||
};
|
||||
|
||||
class AvoidPlayerGoal : public Goal
|
||||
{
|
||||
friend class AvoidPlayerGoalEntitySelector;
|
||||
private:
|
||||
PathfinderMob *mob; // Owner of this goal
|
||||
double walkSpeedModifier, sprintSpeedModifier;
|
||||
weak_ptr<Entity> toAvoid;
|
||||
float maxDist;
|
||||
Path *path;
|
||||
PathNavigation *pathNav;
|
||||
const type_info& avoidType;
|
||||
EntitySelector *entitySelector;
|
||||
|
||||
public:
|
||||
AvoidPlayerGoal(PathfinderMob *mob, const type_info& avoidType, float maxDist, double walkSpeedModifier, double sprintSpeedModifier);
|
||||
~AvoidPlayerGoal();
|
||||
|
||||
virtual bool canUse();
|
||||
virtual bool canContinueToUse();
|
||||
virtual void start();
|
||||
virtual void stop();
|
||||
virtual void tick();
|
||||
};
|
||||
Reference in new issue
Block a user