From 18f0615002c2b0b49d60b6c2cc92f1ea114091fd Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 21 Feb 2022 18:42:54 +0100 Subject: [PATCH] Fix --drawplayers --- TileGenerator.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/TileGenerator.cpp b/TileGenerator.cpp index a131dc8..e39138d 100644 --- a/TileGenerator.cpp +++ b/TileGenerator.cpp @@ -817,9 +817,13 @@ void TileGenerator::renderOrigin() m_image->drawCircle(getImageX(0, true), getImageY(0, true), 12, m_originColor); } -void TileGenerator::renderPlayers(const std::string &inputPath) +void TileGenerator::renderPlayers(const std::string &input_path) { - PlayerAttributes players(inputPath); + std::string input = input_path; + if (input.back() != PATH_SEPARATOR) + input += PATH_SEPARATOR; + + PlayerAttributes players(input); for (auto &player : players) { if (player.x < m_xMin * 16 || player.x > m_xMax * 16 || player.z < m_zMin * 16 || player.z > m_zMax * 16)