From a1ad7f6af02515f66e30fb10c21a9ac5da723646 Mon Sep 17 00:00:00 2001 From: Vectozavr <60608292+vectozavr@users.noreply.github.com> Date: Mon, 1 Nov 2021 13:47:51 +0700 Subject: [PATCH] Visual Studio refactoring --- ShooterClient.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ShooterClient.cpp b/ShooterClient.cpp index f1e4d7e..98402ac 100644 --- a/ShooterClient.cpp +++ b/ShooterClient.cpp @@ -117,6 +117,10 @@ void ShooterClient::processCustomPacket(sf::Packet &packet) { _player->addDeath(); auto camera = _player->attached(ObjectNameTag("Camera")); + if(camera == nullptr) { + break; + } + _player->unattach(ObjectNameTag("Camera")); _player->translateToPoint(Vec3D{10000}); Vec2D cameraOrientation(camera->angleLeftUpLookAt().x(), _player->angle().y());