This commit is contained in:
Dominic 2024-07-07 13:43:02 +02:00
parent 7965c7fb41
commit c13b96d88b
Signed by: msrd0
GPG key ID: AAF7C8430CA3345D

View file

@ -42,11 +42,11 @@ pub fn update(state: &mut crate::State, ctx: &mut comfy::EngineContext<'_>) {
let house = state.house_mut(); let house = state.house_mut();
house.player.update(&house.grid); house.player.update(&house.grid);
if house.player.is_moving_to_right_room(&house.room) { if house.player.is_moving_to_right_room(&house.room) {
house.room = Room::new(ctx); house.room = Room::new(ctx);
house.player.reset_on_room(&house.room, true); house.player.reset_on_room(&house.room, true);
} else if house.player.is_moving_to_left_room(&house.room) { } else if house.player.is_moving_to_left_room(&house.room) {
house.room = Room::new(ctx); house.room = Room::new(ctx);
house.player.reset_on_room(&house.room, false); house.player.reset_on_room(&house.room, false);
} }
} }