Fix incorrect offset to check for uncrouching
parent
8c924956a8
commit
39ff3313e8
|
@ -700,7 +700,10 @@ void player_movement_input_system(Scene_t* scene)
|
|||
}
|
||||
}
|
||||
|
||||
uint8_t collide_type = check_collision_offset(p_player, p_ctransform->position, p_bbox->size, &tilemap, (Vector2){0, -TILE_SIZE});
|
||||
uint8_t collide_type = check_collision_offset(
|
||||
p_player, p_ctransform->position, p_bbox->size,
|
||||
&tilemap, (Vector2){0, p_bbox->size.y - PLAYER_HEIGHT}
|
||||
);
|
||||
if (collide_type == 1)
|
||||
{
|
||||
p_pstate->is_crouch |= 0b10;
|
||||
|
|
Loading…
Reference in New Issue