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,9 +1,26 @@
#pragma once
#include "TargetGoal.h"
#include "EntitySelector.h"
class NearestAttackableTargetGoal;
// Anonymous class from NearestAttackableTargetGoal
class SubselectEntitySelector : public EntitySelector
{
private:
EntitySelector *m_subselector;
NearestAttackableTargetGoal *m_parent;
public:
SubselectEntitySelector(NearestAttackableTargetGoal *parent, EntitySelector *subselector);
~SubselectEntitySelector();
bool matches(shared_ptr<Entity> entity) const;
};
class NearestAttackableTargetGoal : public TargetGoal
{
friend class SubselectEntitySelector;
public:
class DistComp
{
@@ -17,18 +34,15 @@ public:
};
private:
weak_ptr<Mob> target;
const type_info& targetType;
int randomInterval;
DistComp *distComp;
EntitySelector *selector;
weak_ptr<LivingEntity> target;
public:
//public NearestAttackableTargetGoal(Mob mob, const type_info& targetType, float within, int randomInterval, bool mustSee)
//{
// this(mob, targetType, within, randomInterval, mustSee, false);
//}
NearestAttackableTargetGoal(PathfinderMob *mob, const type_info& targetType, int randomInterval, bool mustSee, bool mustReach = false, EntitySelector *entitySelector = NULL);
NearestAttackableTargetGoal(Mob *mob, const type_info& targetType, float within, int randomInterval, bool mustSee, bool mustReach = false);
virtual ~NearestAttackableTargetGoal();
virtual bool canUse();