… | |
… | |
133 | |
133 | |
134 | INVOKE_PLAYER (SAVE, ob->contr); |
134 | INVOKE_PLAYER (SAVE, ob->contr); |
135 | |
135 | |
136 | object_freezer freezer; |
136 | object_freezer freezer; |
137 | |
137 | |
138 | int wiz = ob->flags [FLAG_WIZ]; |
138 | int wiz = ob->flag [FLAG_WIZ]; |
139 | |
139 | |
140 | /* Eneq(@csd.uu.se): If we have an open container hide it. */ |
140 | /* Eneq(@csd.uu.se): If we have an open container hide it. */ |
141 | container = ob->container; |
141 | container = ob->container; |
142 | ob->container = 0; |
142 | ob->container = 0; |
143 | |
143 | |
… | |
… | |
207 | CLEAR_FLAG (ob, FLAG_NO_FIX_PLAYER); |
207 | CLEAR_FLAG (ob, FLAG_NO_FIX_PLAYER); |
208 | |
208 | |
209 | /* Eneq(@csd.uu.se): Reveal the container if we have one. */ |
209 | /* Eneq(@csd.uu.se): Reveal the container if we have one. */ |
210 | ob->container = container; |
210 | ob->container = container; |
211 | |
211 | |
212 | ob->flags [FLAG_WIZ] = wiz; |
212 | ob->flag [FLAG_WIZ] = wiz; |
213 | |
213 | |
214 | enable_save = !final; |
214 | enable_save = !final; |
215 | } |
215 | } |
216 | |
216 | |
217 | player * |
217 | player * |
… | |
… | |
230 | |
230 | |
231 | char buf[MAX_BUF], bufall[MAX_BUF]; |
231 | char buf[MAX_BUF], bufall[MAX_BUF]; |
232 | |
232 | |
233 | pl->set_object (object::create ()); |
233 | pl->set_object (object::create ()); |
234 | pl->last_save_time = time (0); |
234 | pl->last_save_time = time (0); |
235 | pl->name_changed = 1; |
|
|
236 | |
235 | |
237 | assign (pl->savebed_map, first_map_path); |
236 | assign (pl->savebed_map, first_map_path); |
238 | |
237 | |
239 | /* Loop through the file, loading the rest of the values */ |
238 | /* Loop through the file, loading the rest of the values */ |
240 | while (fgets (bufall, MAX_BUF, thawer)) |
239 | while (fgets (bufall, MAX_BUF, thawer)) |
… | |
… | |
359 | { |
358 | { |
360 | strcpy (pl->maplevel, pl->savebed_map); |
359 | strcpy (pl->maplevel, pl->savebed_map); |
361 | pl->ob->x = pl->bed_x, pl->ob->y = pl->bed_y; |
360 | pl->ob->x = pl->bed_x, pl->ob->y = pl->bed_y; |
362 | } |
361 | } |
363 | |
362 | |
364 | /* make sure he's a player -- needed because of class change. */ |
|
|
365 | pl->name_changed = 1; |
|
|
366 | pl->last_save_tick = pticks; |
363 | pl->last_save_tick = pticks; |
367 | |
364 | |
368 | INVOKE_PLAYER (LOAD, pl, ARG_STRING (path)); |
365 | INVOKE_PLAYER (LOAD, pl, ARG_STRING (path)); |
369 | |
366 | |
370 | return pl; |
367 | return pl; |