mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-21 15:56:50 -04:00
Add SQUARE macro to improve readibility for distances
This commit is contained in:
@@ -746,7 +746,7 @@ static void action_modoru_move(am_class* i_this) {
|
||||
i_this->mTargetAngleY = cM_atan2s(xDistToSpawn, zDistToSpawn);
|
||||
}
|
||||
|
||||
f32 xzDist = std::sqrtf(xDistToSpawn*xDistToSpawn + zDistToSpawn*zDistToSpawn);
|
||||
f32 xzDist = std::sqrtf(SQUARE(xDistToSpawn) + SQUARE(zDistToSpawn));
|
||||
if (xzDist < 20.0f) {
|
||||
i_this->mTargetAngleY = i_this->mSpawnRotY;
|
||||
actor->speedF = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user