mirror of
https://github.com/luksamuk/engine-psx.git
synced 2025-04-28 13:28:02 +03:00
Reposition player when hitting diagonal springs to avoid bugs
This commit is contained in:
parent
e511eeb776
commit
a90debf663
1 changed files with 2 additions and 0 deletions
|
@ -503,6 +503,8 @@ _spring_diagonal_update(ObjectState *state, ObjectTableEntry *, VECTOR *pos, uin
|
|||
if(collision_side == OBJ_SIDE_NONE) return;
|
||||
|
||||
player.grnd = 0;
|
||||
player.pos.vx = pos->vx << 12;
|
||||
player.pos.vy = (pos->vy - 16) << 12;
|
||||
player.vel.vx = is_red ? SPRND_ST_R : SPRND_ST_Y;
|
||||
player.vel.vy = is_red ? SPRND_ST_R : SPRND_ST_Y;
|
||||
if(!(state->flipmask & MASK_FLIP_FLIPY)) player.vel.vy *= -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue