… | |
… | |
865 | ob->contr->ns->state = ST_PLAYING; |
865 | ob->contr->ns->state = ST_PLAYING; |
866 | |
866 | |
867 | if (ob->msg) |
867 | if (ob->msg) |
868 | ob->msg = 0; |
868 | ob->msg = 0; |
869 | |
869 | |
870 | /* We create this now because some of the unique maps will need it |
|
|
871 | * to save here. |
|
|
872 | */ |
|
|
873 | { |
|
|
874 | char buf[MAX_BUF]; |
|
|
875 | sprintf (buf, "%s/%s/%s", settings.localdir, settings.playerdir, &ob->name); |
|
|
876 | make_path_to_file (buf); |
|
|
877 | } |
|
|
878 | |
|
|
879 | start_info (ob); |
870 | start_info (ob); |
880 | CLEAR_FLAG (ob, FLAG_WIZ); |
871 | CLEAR_FLAG (ob, FLAG_WIZ); |
881 | give_initial_items (ob, ob->randomitems); |
872 | give_initial_items (ob, ob->randomitems); |
882 | link_player_skills (ob); |
873 | link_player_skills (ob); |
883 | esrv_send_inventory (ob, ob); |
874 | esrv_send_inventory (ob, ob); |
… | |
… | |
885 | |
876 | |
886 | /* This moves the player to a different start map, if there |
877 | /* This moves the player to a different start map, if there |
887 | * is one for this race |
878 | * is one for this race |
888 | */ |
879 | */ |
889 | if (*first_map_ext_path) |
880 | if (*first_map_ext_path) |
890 | { |
881 | ob->player_goto (format ("%s/%s", &first_map_ext_path, &ob->arch->archname), ob->x, ob->y); |
891 | object *tmp; |
|
|
892 | char mapname[MAX_BUF]; |
|
|
893 | |
|
|
894 | snprintf (mapname, MAX_BUF - 1, "%s/%s", &first_map_ext_path, &ob->arch->archname); |
|
|
895 | tmp = object::create (); |
|
|
896 | EXIT_PATH (tmp) = mapname; |
|
|
897 | EXIT_X (tmp) = ob->x; |
|
|
898 | EXIT_Y (tmp) = ob->y; |
|
|
899 | ob->enter_exit (tmp); /* we don't really care if it succeeded; |
|
|
900 | * if the map isn't there, then stay on the |
|
|
901 | * default initial map */ |
|
|
902 | tmp->destroy (); |
|
|
903 | } |
|
|
904 | else |
882 | else |
905 | LOG (llevDebug, "first_map_ext_path not set\n"); |
883 | LOG (llevDebug, "first_map_ext_path not set\n"); |
906 | } |
884 | } |
907 | |
885 | |
908 | void |
886 | void |