fix(physics): restore recovered flipper states
Replace the reversed oversized flipper vectors with the original binary rest and raised geometry. Render the exact resource 997 flipper rectangles while pressed and keep the live collision capsules aligned with those sprites. Test Plan: - cargo fmt --check - cargo test - cargo clippy --all-targets --all-features -- -D warnings - compare forced raised-state rendering with the extracted resource rectangles
This commit is contained in:
@@ -452,6 +452,30 @@ impl App {
|
||||
},
|
||||
);
|
||||
}
|
||||
for (raised, region) in [
|
||||
(
|
||||
game.flippers.left_raised,
|
||||
Rect::new(93.0, 373.0, 47.0, 52.0),
|
||||
),
|
||||
(
|
||||
game.flippers.right_raised,
|
||||
Rect::new(175.0, 372.0, 45.0, 53.0),
|
||||
),
|
||||
] {
|
||||
if raised {
|
||||
draw_texture_ex(
|
||||
&self.assets.active_table,
|
||||
region.x,
|
||||
region.y,
|
||||
WHITE,
|
||||
DrawTextureParams {
|
||||
dest_size: Some(vec2(region.w, region.h)),
|
||||
source: Some(region),
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
draw_texture(
|
||||
&self.assets.ball,
|
||||
game.ball.position.x - 8.0,
|
||||
|
||||
Reference in New Issue
Block a user