1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-25 23:12:56 +00:00

try making quote less jittery

This commit is contained in:
Alula 2020-09-22 21:09:25 +02:00
parent 5f6f59947c
commit 0335c9766d
No known key found for this signature in database
GPG key ID: 3E00485503A1D8BA

View file

@ -578,8 +578,8 @@ impl GameEntity<()> for Player {
{
let batch = state.texture_set.get_or_load_batch(ctx, &state.constants, "MyChar")?;
batch.add_rect(
(((self.x - self.display_bounds.left as isize) / 0x200) - (frame.x / 0x200)) as f32,
(((self.y - self.display_bounds.top as isize) / 0x200) - (frame.y / 0x200)) as f32,
((((self.x - self.display_bounds.left as isize) / 0x200) - (frame.x / 0x200)) as f32).floor(),
((((self.y - self.display_bounds.top as isize) / 0x200) - (frame.y / 0x200)) as f32).floor(),
&self.anim_rect,
);
batch.draw(ctx)?;
@ -590,8 +590,8 @@ impl GameEntity<()> for Player {
match self.direction {
Direction::Left => {
batch.add_rect(
(((self.x - self.display_bounds.left as isize) / 0x200) - (frame.x / 0x200)) as f32 - 8.0,
(((self.y - self.display_bounds.top as isize) / 0x200) - (frame.y / 0x200)) as f32 + self.weapon_offset_y as f32,
((((self.x - self.display_bounds.left as isize) / 0x200) - (frame.x / 0x200)) as f32 - 8.0).floor(),
((((self.y - self.display_bounds.top as isize) / 0x200) - (frame.y / 0x200)) as f32 + self.weapon_offset_y as f32).floor(),
&self.weapon_rect,
);
}