aboutsummaryrefslogtreecommitdiff
path: root/backend/Enemy.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 22:19:15 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-02 22:19:15 +0100
commit07b8a5b0baed8c7b23681c99f25f297045945bfc (patch)
tree8383b4b675aba53d19a667f4713c3e73c32e9652 /backend/Enemy.cpp
parentd554cb39a2f1ec97dd214a5dd200ae5f03cf616d (diff)
fix more bugs
Diffstat (limited to 'backend/Enemy.cpp')
-rw-r--r--backend/Enemy.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/backend/Enemy.cpp b/backend/Enemy.cpp
index a2bab30..5f6f0cf 100644
--- a/backend/Enemy.cpp
+++ b/backend/Enemy.cpp
@@ -40,9 +40,7 @@ ListRange<Object *> Enemy::get_hidden_objects() {
return this->hidden_objects.range();
}
-const String & Enemy::get_displayname() const {
- static String displayname;
- displayname = String::fmt("%s%s", this->name.c_str(), this->health_points == 0 ? " [verslagen]" : "");
- return displayname;
+String Enemy::get_displayname() const {
+ return String::fmt("%s%s", this->name.c_str(), this->health_points == 0 ? " [verslagen]" : "");
}