From a6897eb44d181a52bece88f552df81f5d18934b1 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 2 Mar 2024 13:42:16 +0100 Subject: fix error on exit --- src/world.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/world.cpp') 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 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 world::ensure_player_character(object_id& id) -- cgit v1.2.3