X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fserver%2Finit.c;h=fefe3f3a27cba083ccfb9a763b0bd08a55cf2f05;hb=d4ae3915f817fa25f938c5ab47cea2823ba5aaa9;hp=aa5761cfff0cb40dbb5857209740d765f4e613df;hpb=491e8bc8e7a9b1d312256817c0b8be7e05b127be;p=plomrogue diff --git a/src/server/init.c b/src/server/init.c index aa5761c..fefe3f3 100644 --- a/src/server/init.c +++ b/src/server/init.c @@ -1,4 +1,9 @@ -/* src/server/init.c */ +/* src/server/init.c + * + * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3 + * or any later version. For details on its copyright, license, and warranties, + * see the file NOTICE in the root directory of the PlomRogue source package. + */ #define _POSIX_C_SOURCE 2 /* getopt(), optarg */ #include "init.h" @@ -26,7 +31,7 @@ #include "things.h" /* Thing, ThingType, free_things(), add_things(), * get_thing_id_action_id_by_name() */ -#include "run.h" /* obey_msg(), io_loop(), record() */ +#include "run.h" /* obey_msg(), io_loop(), record(), send_to_outfile() */ #include "world.h" /* global world */ @@ -191,8 +196,6 @@ extern uint8_t remake_world() { return test; } - free(world.log); - world.log = NULL; /* thing_actions.c's update_log() checks for this. */ world.seed_map = world.seed; free_things(world.things); remake_map(); @@ -223,6 +226,7 @@ extern uint8_t remake_world() world.turn = 1; world.do_update = 1; world.exists = 1; + send_to_outfile("NEW_WORLD\n", 1); return 0; }