mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-26 02:07:26 +00:00
Fix typo in 5a9025a2a7
that caused crashing
This commit is contained in:
parent
60e3c4d7ad
commit
7cd8f51b47
1 changed files with 2 additions and 2 deletions
|
@ -1928,13 +1928,13 @@ void Entity::moveAroundAngle(int angle, float dt, int spd, int dir)
|
||||||
|
|
||||||
void Entity::moveTowardsTarget(float dt, int spd, size_t t)
|
void Entity::moveTowardsTarget(float dt, int spd, size_t t)
|
||||||
{
|
{
|
||||||
if (targets.size() < t || !targets[t]) return;
|
if (t >= targets.size() || !targets[t]) return;
|
||||||
moveTowards(targets[t]->position, dt, spd);
|
moveTowards(targets[t]->position, dt, spd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Entity::moveAroundTarget(float dt, int spd, int dir, size_t t)
|
void Entity::moveAroundTarget(float dt, int spd, int dir, size_t t)
|
||||||
{
|
{
|
||||||
if (targets.size() < t || !targets[t]) return;
|
if (t >= targets.size() || !targets[t]) return;
|
||||||
moveAround(targets[t]->position, dt, spd, dir);
|
moveAround(targets[t]->position, dt, spd, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue