mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-09 23:59:51 +00:00
Remove unused stuff
- entity group IDs - entity node groups (?!) - WaterFont.[cpp|h]
This commit is contained in:
parent
8b67ece907
commit
0f13f08357
8 changed files with 21 additions and 331 deletions
|
@ -217,7 +217,6 @@ Entity::Entity()
|
|||
targetRange = 32;
|
||||
//energyChargeTarget = energyShotTarget = true;
|
||||
deathSound = "GenericDeath";
|
||||
groupID = 0;
|
||||
entityID = 0;
|
||||
//assignUniqueID();
|
||||
hair = 0;
|
||||
|
@ -349,50 +348,6 @@ void Entity::setSpiritFreeze(bool v)
|
|||
spiritFreeze = v;
|
||||
}
|
||||
|
||||
Vector Entity::getGroupCenter()
|
||||
{
|
||||
Vector position;
|
||||
int sz = 0;
|
||||
FOR_ENTITIES(i)
|
||||
{
|
||||
Entity *e = *i;
|
||||
if (e->getGroupID() == this->getGroupID())
|
||||
{
|
||||
position += e->position;
|
||||
sz++;
|
||||
}
|
||||
}
|
||||
position/=sz;
|
||||
return position;
|
||||
}
|
||||
|
||||
Vector Entity::getGroupHeading()
|
||||
{
|
||||
Vector v;
|
||||
int sz = 0;
|
||||
FOR_ENTITIES(i)
|
||||
{
|
||||
Entity *e = *i;
|
||||
if (e->getGroupID() == this->getGroupID())
|
||||
{
|
||||
v += e->vel;
|
||||
sz++;
|
||||
}
|
||||
}
|
||||
v/=sz;
|
||||
return v;
|
||||
}
|
||||
|
||||
int Entity::getGroupID()
|
||||
{
|
||||
return groupID;
|
||||
}
|
||||
|
||||
void Entity::setGroupID(int g)
|
||||
{
|
||||
groupID = g;
|
||||
}
|
||||
|
||||
void Entity::setEntityProperty(EntityProperty ep, bool value)
|
||||
{
|
||||
entityProperties[int(ep)] = value;
|
||||
|
@ -574,37 +529,6 @@ void Entity::moveToNode(Path *path, int speedType, int dieOnPathEnd, bool swim)
|
|||
//position.startPath(((position.data->path.getNumPathNodes()*TILE_SIZE*4)-2)/dsq->continuity.getSpeedType(speedType));
|
||||
}
|
||||
|
||||
void Entity::addNodeToNodeGroup(int group, Path *p)
|
||||
{
|
||||
nodeGroups[group].push_back(p);
|
||||
}
|
||||
|
||||
void Entity::removeNodeFromAllNodeGroups(Path *p)
|
||||
{
|
||||
for (int j = 0; j < nodeGroups.size(); j++)
|
||||
{
|
||||
for (int i = 0; i < nodeGroups[j].size(); i++)
|
||||
{
|
||||
if (nodeGroups[j][i] == p)
|
||||
{
|
||||
nodeGroups[j][i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Entity::setNodeGroupActive(int group, bool v)
|
||||
{
|
||||
for (int i = 0; i < nodeGroups[group].size(); i++)
|
||||
{
|
||||
Path *p = nodeGroups[group][i];
|
||||
if (p)
|
||||
{
|
||||
p->setActive(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Entity::stopFollowingPath()
|
||||
{
|
||||
position.stopPath();
|
||||
|
@ -2455,24 +2379,6 @@ void Entity::moveTowardsTarget(float dt, int spd, int t)
|
|||
moveTowards(targets[t]->position, dt, spd);
|
||||
}
|
||||
|
||||
void Entity::moveTowardsGroupCenter(float dt, int speed)
|
||||
{
|
||||
if (getGroupID() != 0)
|
||||
{
|
||||
moveTowards(getGroupCenter(), dt, speed);
|
||||
}
|
||||
}
|
||||
|
||||
void Entity::moveTowardsGroupHeading(float dt, int speed)
|
||||
{
|
||||
if (getGroupID() != 0)
|
||||
{
|
||||
Vector d = getGroupHeading() - position;
|
||||
d.setLength2D(speed*dt);
|
||||
vel += d;
|
||||
}
|
||||
}
|
||||
|
||||
void Entity::moveAroundTarget(float dt, int spd, int dir, int t)
|
||||
{
|
||||
if (!targets[t]) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue