We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
max_dist
min_dist
it_802CDE1C
1 parent 7464b41 commit 3d9b2beCopy full SHA for 3d9b2be
src/melee/it/items/ithassam.c
@@ -137,9 +137,9 @@ Item_GObj* it_802CDE1C(Vec3* vec, Item_GObj* gobj)
137
Fighter_GObj* cur;
138
Fighter* fp;
139
Item* ip;
140
- f32 temp_f0, x_dist, y_dist, max_dist;
+ f32 temp_f0, x_dist, y_dist, min_dist;
141
142
- max_dist = F32_MAX;
+ min_dist = F32_MAX;
143
144
PAD_STACK(8);
145
@@ -161,8 +161,8 @@ Item_GObj* it_802CDE1C(Vec3* vec, Item_GObj* gobj)
161
y_dist = vec->y - sp20.y;
162
x_dist = vec->x - sp20.x;
163
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;
+ if ((temp_f0 < min_dist) && (sp20.y > vec->y)) {
+ min_dist = temp_f0;
166
best_fgobj = cur;
167
}
168
0 commit comments