mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-11-30 16:18:00 +00:00
more collision fixes
This commit is contained in:
parent
215ec9ed6c
commit
0d47a0f401
|
|
@ -101,7 +101,7 @@ impl Player {
|
|||
let mut flags = Flag(0);
|
||||
|
||||
if ((self.y - self.hit_bounds.top as i32) < (npc.y + npc.hit_bounds.bottom as i32 - 0x600))
|
||||
&& ((self.y + self.hit_bounds.top as i32) > (npc.y - npc.hit_bounds.bottom as i32 + 0x600))
|
||||
&& ((self.y + self.hit_bounds.bottom as i32) > (npc.y - npc.hit_bounds.bottom as i32 + 0x600))
|
||||
&& ((self.x - self.hit_bounds.right as i32) < (npc.x + npc.hit_bounds.right as i32))
|
||||
&& ((self.x - self.hit_bounds.right as i32) > npc.x) {
|
||||
if self.vel_x < 0x200 {
|
||||
|
|
@ -112,7 +112,7 @@ impl Player {
|
|||
}
|
||||
|
||||
if ((self.y - self.hit_bounds.top as i32) < (npc.y + npc.hit_bounds.bottom as i32 - 0x600))
|
||||
&& ((self.y + self.hit_bounds.top as i32) > (npc.y - npc.hit_bounds.bottom as i32 + 0x600))
|
||||
&& ((self.y + self.hit_bounds.bottom as i32) > (npc.y - npc.hit_bounds.bottom as i32 + 0x600))
|
||||
&& ((self.x + self.hit_bounds.right as i32 - 0x200) > (npc.x - npc.hit_bounds.right as i32))
|
||||
&& ((self.x + self.hit_bounds.right as i32 - 0x200) < npc.x) {
|
||||
if self.vel_x > -0x200 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue