From caee1d5990021385a4fccb827d9b933e5f5166ed Mon Sep 17 00:00:00 2001 From: Tyler Lentz Date: Fri, 7 Jun 2024 01:10:40 -0700 Subject: [PATCH] :confused: --- config.json | 4 ++-- src/server/game/projectile.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index 4ec18d7d..a5add66d 100644 --- a/config.json +++ b/config.json @@ -2,7 +2,7 @@ "game": { "maze": { "directory": "maps", - "procedural": false, + "procedural": true, "maze_file": "test/itemRoom.maze" }, "disable_enemies": false @@ -16,7 +16,7 @@ "lobby_broadcast": true, "max_players": 2, "disable_dm": false, - "skip_intro": false + "skip_intro": true }, "client": { "default_name": "Conan O'Brien", diff --git a/src/server/game/projectile.cpp b/src/server/game/projectile.cpp index 54644d5a..9eb64d86 100644 --- a/src/server/game/projectile.cpp +++ b/src/server/game/projectile.cpp @@ -70,6 +70,12 @@ void Projectile::doCollision(Object* other, ServerGameState& state) { //handle cases for spell projectiles else { SpellOrb* orb = dynamic_cast(this); + + if (orb == nullptr) { + std::cout << "Just saved us from a seg fault 6/7/2024 1:07am BRUHHHHHHHHHHHHHhhhhhhhhh\n"; + return; + } + switch (orb->sType) { case SpellType::Fireball: { // do damage if creature