Skip to content

Commit

Permalink
#5584: Use the entity colour for rendering the name.
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Jan 24, 2022
1 parent 393c030 commit 546d152
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions radiantcore/entity/RenderableEntityName.cpp
Expand Up @@ -16,8 +16,10 @@ const std::string& RenderableEntityName::getText()

const Vector4& RenderableEntityName::getColour()
{
static Vector4 colour(1, 1, 1, 1);
return colour;
// Keep the local copy up to date by querying the owning entity every time
_colour = _entity.getEntityColour();

return _colour;
}

}
1 change: 1 addition & 0 deletions radiantcore/entity/RenderableEntityName.h
Expand Up @@ -15,6 +15,7 @@ class RenderableEntityName :
private:
const EntityNode& _entity;
const NameKey& _nameKey;
Vector4 _colour;

public:
RenderableEntityName(const EntityNode& entity, const NameKey& nameKey) :
Expand Down

0 comments on commit 546d152

Please sign in to comment.