diff options
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 4a019de58..40b8491b5 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3892,6 +3892,11 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt // map_addblock(&sd->bl); /// ブロック登?とspawnは // clif_spawnpc(sd); + //double connection bug fix by Valaris + if(sd->alive_timer) + delete_timer(sd->alive_timer,pc_alive_timer); + sd->alive_timer=add_timer(gettick()+60*1000,pc_alive_timer,sd->bl.id,0); + return 0; } @@ -8085,6 +8090,7 @@ int do_init_pc(void) { // add night/day timer (by [yor]) add_timer_func_list(map_day_timer, "map_day_timer"); // by [yor] add_timer_func_list(map_night_timer, "map_night_timer"); // by [yor] + add_timer_func_list(pc_alive_timer, "pc_alive_timer"); //by Valaris { int day_duration = battle_config.day_duration; int night_duration = battle_config.night_duration; @@ -8105,3 +8111,14 @@ int do_init_pc(void) { return 0; } + +//Valaris +int pc_alive_timer(int tid,unsigned int tick,int id,int data) +{ + struct map_session_data *sd=(struct map_session_data*)map_id2bl(id); + nullpo_retr(0, sd); + if(sd->alive_timer != tid) + return 0; + map_quit(sd); + return 0; +}
\ No newline at end of file |