名前に反してそれぞれ x1 と y1 しか代入しておらずしかも2か所だけなため該当する変数に置き換えた
POSITION x1;
POSITION y2;
POSITION x2;
- POSITION y_saver;
- POSITION x_saver;
bool visual = false;
bool breath = false;
bool blind = player_ptr->blind != 0;
x1 = target_x;
y1 = target_y;
}
-
- y_saver = y1;
- x_saver = x1;
y2 = target_y;
x2 = target_x;
POSITION t_y, t_x;
int max_attempts = 10;
do {
- t_y = y_saver - 1 + randint1(3);
- t_x = x_saver - 1 + randint1(3);
+ t_y = y1 - 1 + randint1(3);
+ t_x = x1 - 1 + randint1(3);
max_attempts--;
} while (max_attempts && in_bounds2u(player_ptr->current_floor_ptr, t_y, t_x) && !projectable(player_ptr, y, x, t_y, t_x));
if (max_attempts < 1) {
- t_y = y_saver;
- t_x = x_saver;
+ t_y = y1;
+ t_x = x1;
}
if (is_seen(player_ptr, m_ptr)) {