diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-03 12:43:18 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-03 12:43:18 +0100 |
commit | 5f5bf3ac7a85f8cde512ec44e3d55b93fb4354ba (patch) | |
tree | 517b955e4e2ecddf185dfd13dcdc4bcf57f4588a /backend/Dungeon.cpp | |
parent | ed78baff64fe45479ca6c480d985ce0f9c0c9515 (diff) |
remove more pointers from frontend
Diffstat (limited to 'backend/Dungeon.cpp')
-rw-r--r-- | backend/Dungeon.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |