Skip to content

Commit

Permalink
fix entity obstacle
Browse files Browse the repository at this point in the history
  • Loading branch information
aratama committed Feb 11, 2025
1 parent e4dbca5 commit e9e7ccd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/level/chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl LevelChunk {
Spawn::Bookshelf => {
let entity_index = position_to_index(Vec2::new(
entity.world_x.unwrap_or_default() as f32 + 8.0,
-entity.world_y.unwrap_or_default() as f32 + 8.0,
-entity.world_y.unwrap_or_default() as f32 - 8.0,
));
navigation_grid.set(
(entity_index.0 - min_x) as usize,
Expand All @@ -168,7 +168,7 @@ impl LevelChunk {
);
let entity_index2 = position_to_index(Vec2::new(
entity.world_x.unwrap_or_default() as f32 + 24.0,
-entity.world_y.unwrap_or_default() as f32 + 8.0,
-entity.world_y.unwrap_or_default() as f32 - 8.0,
));
navigation_grid.set(
(entity_index2.0 - min_x) as usize,
Expand Down

0 comments on commit e9e7ccd

Please sign in to comment.