From c9c81a610d97c95c15f938ecd07ceb71cb0cdfb1 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 24 Jun 2013 18:30:58 -0700 Subject: Fix bugs --- src/map/map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/map.cpp') diff --git a/src/map/map.cpp b/src/map/map.cpp index fc80199..fdae071 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -62,9 +62,6 @@ dumb_ptr object[MAX_FLOORITEM]; static int first_free_object_id = 0, last_object_id = 0; -static -int map_port = 0; - interval_t autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; int save_settings = 0xFFFF; @@ -1329,6 +1326,9 @@ void map_addmap(const std::string& mapname) auto newmap = make_unique(); strzcpy(newmap->name_, mapname.c_str(), 16); + // novice challenge: figure out why this is necessary, and why it works + const char *name = newmap->name_; + maps_db.put(name, std::move(newmap)); } /*========================================== @@ -1679,7 +1679,7 @@ int do_init(int argc, char *argv[]) PRINTF("The server is running in \033[1;31mPK Mode\033[0m.\n"); PRINTF("The map-server is \033[1;32mready\033[0m (Server is listening on the port %d).\n\n", - map_port); + clif_getport()); return 0; } -- cgit v1.2.3-60-g2f50