From 5f5bf3ac7a85f8cde512ec44e3d55b93fb4354ba Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 3 Nov 2024 12:43:18 +0100 Subject: remove more pointers from frontend --- backend/Dungeon.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backend/Dungeon.cpp') diff --git a/backend/Dungeon.cpp b/backend/Dungeon.cpp index ce9ba9f..3fe9a58 100644 --- a/backend/Dungeon.cpp +++ b/backend/Dungeon.cpp @@ -44,9 +44,9 @@ void Dungeon::update_movement() { lprtf(":: De vijanden bewegen ::\n"); Direction direction = random_direction(*location); location->remove_enemy(enemy); - Location * new_location = location->get_exit(direction); - new_location->add_enemy(enemy); - if (&this->player.get_location() == new_location) + Location & new_location = location->get_exit(direction); + new_location.add_enemy(enemy); + if (&this->player.get_location() == &new_location) lprtf("%s komt de huidige locatie binnen\n", enemy->get_name().c_str()); moved = true; } -- cgit v1.2.3