Skip to content

Commit 3d9b2be

Browse files
committed
max_dist -> min_dist in it_802CDE1C
1 parent 7464b41 commit 3d9b2be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/melee/it/items/ithassam.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ Item_GObj* it_802CDE1C(Vec3* vec, Item_GObj* gobj)
137137
Fighter_GObj* cur;
138138
Fighter* fp;
139139
Item* ip;
140-
f32 temp_f0, x_dist, y_dist, max_dist;
140+
f32 temp_f0, x_dist, y_dist, min_dist;
141141

142-
max_dist = F32_MAX;
142+
min_dist = F32_MAX;
143143

144144
PAD_STACK(8);
145145

@@ -161,8 +161,8 @@ Item_GObj* it_802CDE1C(Vec3* vec, Item_GObj* gobj)
161161
y_dist = vec->y - sp20.y;
162162
x_dist = vec->x - sp20.x;
163163
temp_f0 = (x_dist * x_dist) + (y_dist * y_dist);
164-
if ((temp_f0 < max_dist) && (sp20.y > vec->y)) {
165-
max_dist = temp_f0;
164+
if ((temp_f0 < min_dist) && (sp20.y > vec->y)) {
165+
min_dist = temp_f0;
166166
best_fgobj = cur;
167167
}
168168
}

0 commit comments

Comments
 (0)