fix: player name still visible after player removal

This commit is contained in:
MihailRis 2025-01-16 05:55:49 +03:00
parent 2073d3782a
commit 8aee8d81fb

View File

@ -156,6 +156,7 @@ void Decorator::update(float delta, const Camera& camera) {
auto note = renderer.texts->get(textsIter->second);
auto player = level.players->get(textsIter->first);
if (player == nullptr) {
renderer.texts->remove(textsIter->second);
textsIter = playerTexts.erase(textsIter);
} else {
note->setPosition(player->getPosition() + glm::vec3(0, 1, 0));