summaryrefslogtreecommitdiffhomepage
path: root/src/world.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-03-02 13:42:16 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-03-02 13:42:16 +0100
commita6897eb44d181a52bece88f552df81f5d18934b1 (patch)
tree7fa8cbc1847bc3bb3acb3bf89ad1fad761ba0893 /src/world.cpp
parent4b005d23ac212cdba1126df5eb51e0a4477179b3 (diff)
fix error on exit
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 650f1494..d75a835d 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -198,17 +198,13 @@ auto world::neighbors(chunk_coords_ coord) -> std::array<chunk*, 8>
return ret;
}
-const critter_proto& world::make_player_proto()
+critter_proto world::make_player_proto()
{
- static const critter_proto p = []
- {
- critter_proto cproto;
- cproto.name = "Player"_s;
- cproto.speed = 10;
- cproto.playable = true;
- return cproto;
- }();
- return p;
+ critter_proto cproto;
+ cproto.name = "Player"_s;
+ cproto.speed = 10;
+ cproto.playable = true;
+ return cproto;
}
shared_ptr_wrapper<critter> world::ensure_player_character(object_id& id)