wip: removing vec3 tls

This commit is contained in:
orng
2026-03-26 01:10:27 -05:00
parent c18e86944f
commit 7b021bc99d
62 changed files with 1070 additions and 1045 deletions

View File

@@ -151,7 +151,7 @@ void PathNavigation::updatePath() {
float waypointRadiusSqr = mob->bbWidth * mob->bbWidth;
for (int i = path->getIndex(); i < firstElevation; ++i) {
Vec3* pathPos = path->getPos(mob->shared_from_this(), i);
if (mobPos->distanceToSqr(pathPos) < waypointRadiusSqr) {
if (mobPos->distanceToSqr(*pathPos) < waypointRadiusSqr) {
path->setIndex(i + 1);
}
}
@@ -170,7 +170,7 @@ void PathNavigation::updatePath() {
// stuck detection (probably pushed off path)
if (_tick - lastStuckCheck > 100) {
if (mobPos->distanceToSqr(lastStuckCheckPos) < 1.5 * 1.5) stop();
if (mobPos->distanceToSqr(*lastStuckCheckPos) < 1.5 * 1.5) stop();
lastStuckCheck = _tick;
lastStuckCheckPos->x = mobPos->x;
lastStuckCheckPos->y = mobPos->y;
@@ -329,4 +329,4 @@ bool PathNavigation::canWalkAbove(int startX, int startY, int startZ, int sx,
return true;
}
void PathNavigation::setLevel(Level* level) { this->level = level; }
void PathNavigation::setLevel(Level* level) { this->level = level; }