feat: show corpse skull marker on world map when player is a ghost

When the player dies and releases spirit, the world map now renders a
bone-white X cross at the corpse's location (matching the existing
minimap skull marker). The marker appears only when the player is a
ghost with an unclaimed corpse on the same map, and shows a "Your
corpse" tooltip on hover. Implemented via setCorpsePos() on WorldMap,
called from renderWorldMap() using getCorpseCanonicalPos().
This commit is contained in:
Kelsi 2026-03-17 19:52:17 -07:00
parent 614fcf6b98
commit d0df6eed2c
3 changed files with 49 additions and 0 deletions

View file

@ -7083,6 +7083,17 @@ void GameScreen::renderWorldMap(game::GameHandler& gameHandler) {
wm->setTaxiNodes(std::move(taxiNodes));
}
// Corpse marker: show skull X on world map when ghost with unclaimed corpse
{
float corpseCanX = 0.0f, corpseCanY = 0.0f;
bool ghostWithCorpse = gameHandler.isPlayerGhost() &&
gameHandler.getCorpseCanonicalPos(corpseCanX, corpseCanY);
glm::vec3 corpseRender = ghostWithCorpse
? core::coords::canonicalToRender(glm::vec3(corpseCanX, corpseCanY, 0.0f))
: glm::vec3{};
wm->setCorpsePos(ghostWithCorpse, corpseRender);
}
glm::vec3 playerPos = renderer->getCharacterPosition();
float playerYaw = renderer->getCharacterYaw();
auto* window = app.getWindow();