1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00

Fix typo in 5a9025a2a7 that caused crashing

This commit is contained in:
fgenesis 2023-09-24 18:04:40 +02:00
parent 60e3c4d7ad
commit 7cd8f51b47

View file

@ -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)
{
if (targets.size() < t || !targets[t]) return;
if (t >= targets.size() || !targets[t]) return;
moveTowards(targets[t]->position, dt, spd);
}
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);
}