mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
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:
parent
614fcf6b98
commit
d0df6eed2c
3 changed files with 49 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue