@@ -46,7 +46,7 @@ pub fn hitbox_collision(
4646 2 | 10 | 11 | 12 | 13 | 14 => {
4747 * kill_player |= small_player. overlaps ( & Rect {
4848 x : object. x as f32 - world_offset,
49- y : object . y as f32 + 10.0 - player_cam_y as f32 ,
49+ y : obj_y as f32 + 10.0 - player_cam_y as f32 ,
5050 w : 3.0 ,
5151 h : 20.0
5252 } ) ;
@@ -136,7 +136,7 @@ pub fn hitbox_collision(
136136 4 | 22 | 26 => {
137137 if centered_player. overlaps ( & Rect {
138138 x : object. x as f32 - 10.0 - world_offset,
139- y : object . y as f32 - 10.0 - player_cam_y as f32 ,
139+ y : obj_y as f32 - 10.0 - player_cam_y as f32 ,
140140 w : 60.0 ,
141141 h : 60.0
142142 } ) {
@@ -209,7 +209,7 @@ pub fn hitbox_collision(
209209 7 => {
210210 * kill_player |= centered_player. overlaps ( & Rect {
211211 x : object. x as f32 - world_offset + 20.0 ,
212- y : object . y as f32 + if object. rotation > 145 || object. rotation < -145 { 5.0 } else { 25.0 } - player_cam_y as f32 ,
212+ y : obj_y as f32 + if object. rotation > 145 || object. rotation < -145 { 5.0 } else { 25.0 } - player_cam_y as f32 ,
213213 w : 10.0 ,
214214 h : 10.0
215215 } ) ;
@@ -278,7 +278,7 @@ pub fn hitbox_draw(
278278 || object. id == 14 {
279279 draw_rectangle_lines (
280280 object. x as f32 - world_offset,
281- object . y as f32 + 10.0 - player_cam_y as f32 ,
281+ obj_y as f32 + 10.0 - player_cam_y as f32 ,
282282 3.0 ,
283283 20.0 ,
284284 2.0 ,
@@ -329,7 +329,7 @@ pub fn hitbox_draw(
329329 || object. id == 22 {
330330 draw_rectangle_lines (
331331 object. x as f32 - 10.0 - world_offset,
332- object . y as f32 - 10.0 - player_cam_y as f32 ,
332+ obj_y as f32 - 10.0 - player_cam_y as f32 ,
333333 60.0 ,
334334 60.0 ,
335335 2.0 ,
@@ -353,7 +353,7 @@ pub fn hitbox_draw(
353353 if object. id == 7 {
354354 draw_rectangle_lines (
355355 object. x as f32 - world_offset + 20.0 ,
356- object . y as f32 + if object. rotation > 145 || object. rotation < -145 { 5.0 } else { 25.0 } - player_cam_y as f32 ,
356+ obj_y as f32 + if object. rotation > 145 || object. rotation < -145 { 5.0 } else { 25.0 } - player_cam_y as f32 ,
357357 10.0 ,
358358 10.0 ,
359359 2.0 ,
0 commit comments