refining the sprites

This commit is contained in:
Llywelwyn 2023-09-23 19:35:51 +01:00
parent d58614b106
commit 670b365def
6 changed files with 28 additions and 22 deletions

View file

@ -1235,9 +1235,8 @@ pub fn ranged_target(
&gs.ecs,
ctx
);
let (screen_x, screen_y) = (40, 30);
let x = x.clamp(x_offset, x_offset - 1 + (screen_x as i32));
let y = y.clamp(y_offset, y_offset - 1 + (screen_y as i32));
let x = x.clamp(x_offset, x_offset - 1 + VIEWPORT_W);
let y = y.clamp(y_offset, y_offset - 1 + VIEWPORT_H);
let mut mouse_pos_adjusted = mouse_pos;
mouse_pos_adjusted.0 += min_x - x_offset;