Keep the labels over the creatures they belong to - #25
Merged
tomluchowski merged 1 commit intoAug 5, 2026
Merged
Conversation
The label over a creature is not attached to it. It is placed on the screen, worked out each frame from where the camera sees the creature, so it is only over it for as long as something keeps putting it back. Three things stopped that from happening. GameMap::updateAnimations() returns without doing anything while the game is paused, and the labels are moved from there. The camera is not paused: it is updated in frameRenderingQueued() before the check that stops the frame when the game is. So pausing and then moving the camera left every label behind, over whatever ground its creature had been standing on. The same holds before the first turn. The labels are now put back in both cases, given no time so that nothing they say changes and no creature with more than one mood to show takes its turn while the game is not running. The label is placed from the bounding box of the creature's mesh, taken as Ogre holds it rather than derived. That box is from the last time the scene was updated, and the creatures are moved after that, during the frame, so every label was a frame behind whatever was moving. And nothing hid the label of a creature that had died. A dead creature lies where it fell for a few turns before it is taken away, wearing its level and its mood the whole time. The client can tell: an overlay health value of the last step means dead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> (cherry picked from commit 1319ed0)
Owner
|
Err DOes it mentions labels with Creature health + level , or the label you get with the middlebutton ? |
Owner
|
Oki it goes about the first one. I wonder is it possible to trigger the overlays permanently ? AFAIR I played the gameplay where those overlays were permanent and one did not need to press ALT. OR wait ... it was triggered by callign the Pause game ....just checked -- no ! |
Author
|
This is a bug fix... the overlays were sometimes not synchronized with the creature position. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The label over a creature is placed on screen from where the camera sees the creature, so it is only over it while something keeps putting it back. Three things stopped that from happening (pausing then moving the camera among them), leaving labels floating over ground their creatures had left. One commit.
Split out of #16 so each topic can be reviewed on its own. Merging all of the split PRs reproduces the tree of #16 exactly.
🤖 Generated with Claude Code