December 2014 files

This commit is contained in:
Loki Rautio
2026-03-01 11:00:23 -06:00
parent b691c43c44
commit 8fd3ac6e37
2049 changed files with 260190 additions and 134787 deletions

View File

@@ -1,24 +1,38 @@
#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
float walkSpeed, sprintSpeed;
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, float walkSpeed, float sprintSpeed);
AvoidPlayerGoal(PathfinderMob *mob, const type_info& avoidType, float maxDist, double walkSpeedModifier, double sprintSpeedModifier);
~AvoidPlayerGoal();
virtual bool canUse();