diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-24 18:30:58 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-06-25 13:49:20 -0700 |
commit | c9c81a610d97c95c15f938ecd07ceb71cb0cdfb1 (patch) | |
tree | 7637cf53216c6d0b8deadbfb8ea56faf4ff5bc85 /src/map/map.cpp | |
parent | dbbfda0e96037da4f208ff8f00d181a5294484ae (diff) | |
download | tmwa-c9c81a610d97c95c15f938ecd07ceb71cb0cdfb1.tar.gz tmwa-c9c81a610d97c95c15f938ecd07ceb71cb0cdfb1.tar.bz2 tmwa-c9c81a610d97c95c15f938ecd07ceb71cb0cdfb1.tar.xz tmwa-c9c81a610d97c95c15f938ecd07ceb71cb0cdfb1.zip |
Fix bugs
Diffstat (limited to 'src/map/map.cpp')
-rw-r--r-- | src/map/map.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<block_list> 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<map_local>(); 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; } |