From 6bb416f305c8d814561d611365ad8a1e91120b30 Mon Sep 17 00:00:00 2001 From: Taylor Locke Date: Sat, 5 Sep 2015 16:21:53 -0700 Subject: Added RE/Pre-RE start_point ability. --- src/char/char.c | 51 ++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 13 deletions(-) (limited to 'src/char') diff --git a/src/char/char.c b/src/char/char.c index 819cd2ef8..c54fedb8c 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -140,7 +140,11 @@ struct fame_list chemist_fame_list[MAX_FAME_LIST]; struct fame_list taekwon_fame_list[MAX_FAME_LIST]; // Initial position (it's possible to set it in conf file) -struct point start_point = { 0, 53, 111 }; +#ifdef RENEWAL + struct point start_point = { 0, 97, 90 }; +#else + struct point start_point = { 0, 53, 111 }; +#endif unsigned short skillid2idx[MAX_SKILL_ID]; @@ -5639,17 +5643,33 @@ int char_config_read(const char* cfgName) autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; } else if (strcmpi(w1, "save_log") == 0) { save_log = config_switch(w2); - } else if (strcmpi(w1, "start_point") == 0) { - char map[MAP_NAME_LENGTH_EXT]; - int x, y; - if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3) - continue; - start_point.map = mapindex->name2id(map); - if (!start_point.map) - ShowError("Specified start_point %s not found in map-index cache.\n", map); - start_point.x = x; - start_point.y = y; - } else if (strcmpi(w1, "start_items") == 0) { + } + #ifdef RENEWAL + else if (strcmpi(w1, "start_point") == 0) { + char map[MAP_NAME_LENGTH_EXT]; + int x, y; + if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3) + continue; + start_point.map = mapindex->name2id(map); + if (!start_point.map) + ShowError("Specified start_point %s not found in map-index cache.\n", map); + start_point.x = x; + start_point.y = y; + } + #else + else if (strcmpi(w1, "start_point_pre") == 0) { + char map[MAP_NAME_LENGTH_EXT]; + int x, y; + if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3) + continue; + start_point.map = mapindex->name2id(map); + if (!start_point.map) + ShowError("Specified start_point_pre %s not found in map-index cache.\n", map); + start_point.x = x; + start_point.y = y; + } + #endif + else if (strcmpi(w1, "start_items") == 0) { int i; char *split; @@ -5876,7 +5896,12 @@ int do_init(int argc, char **argv) { //Read map indexes mapindex->init(); - start_point.map = mapindex->name2id("new_zone01"); + + #ifdef RENEWAL + start_point.map = mapindex->name2id("iz_int"); + #else + start_point.map = mapindex->name2id("new_1-1"); + #endif cmdline->exec(argc, argv, CMDLINE_OPT_NORMAL); chr->config_read(chr->CHAR_CONF_NAME); -- cgit v1.2.3-60-g2f50