* Added temporary code to track and prevent the multiple remove_map's that appear to be happening.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12430 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
49f1f4434d
commit
66ba548612
@ -7813,6 +7813,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
|
|||||||
|
|
||||||
if (map[sd->bl.m].users++ == 0 && battle_config.dynamic_mobs) //Skotlex
|
if (map[sd->bl.m].users++ == 0 && battle_config.dynamic_mobs) //Skotlex
|
||||||
map_spawnmobs(sd->bl.m);
|
map_spawnmobs(sd->bl.m);
|
||||||
|
sd->state.debug_remove_map = 0; // temporary state to track double remove_map's [FlavioJS]
|
||||||
|
|
||||||
map_addblock(&sd->bl);
|
map_addblock(&sd->bl);
|
||||||
clif_spawn(&sd->bl);
|
clif_spawn(&sd->bl);
|
||||||
|
@ -88,6 +88,7 @@ struct map_session_data {
|
|||||||
unsigned killable : 1;
|
unsigned killable : 1;
|
||||||
unsigned doridori : 1;
|
unsigned doridori : 1;
|
||||||
unsigned ignoreAll : 1;
|
unsigned ignoreAll : 1;
|
||||||
|
unsigned debug_remove_map : 1; // temporary state to track double remove_map's [FlavioJS]
|
||||||
unsigned short autoloot;
|
unsigned short autoloot;
|
||||||
unsigned short autolootid; // [Zephyrus]
|
unsigned short autolootid; // [Zephyrus]
|
||||||
unsigned noks : 3; // [Zeph Kill Steal Protection]
|
unsigned noks : 3; // [Zeph Kill Steal Protection]
|
||||||
|
@ -1689,8 +1689,19 @@ int unit_remove_map(struct block_list *bl, int clrtype)
|
|||||||
party_send_dot_remove(sd);//minimap dot fix [Kevin]
|
party_send_dot_remove(sd);//minimap dot fix [Kevin]
|
||||||
guild_send_dot_remove(sd);
|
guild_send_dot_remove(sd);
|
||||||
|
|
||||||
|
if( map[bl->m].users <= 0 || sd->state.debug_remove_map )
|
||||||
|
{// this is only place where map users is decreased, if the mobs were removed too soon then this function was executed too many times [FlavioJS]
|
||||||
|
ShowDebug("unit_remove_map: unexpected state when removing player AID/CID:%d/%d"
|
||||||
|
" (active=%d connect_new=%d rewarp=%d changemap=%d debug_remove_map=%d)"
|
||||||
|
" from map=%s (users=%d). Please report this!!!\n",
|
||||||
|
sd->status.account_id, sd->status.char_id,
|
||||||
|
sd->state.active, sd->state.connect_new, sd->state.rewarp, sd->state.changemap, sd->state.debug_remove_map,
|
||||||
|
map[bl->m].name, map[bl->m].users);
|
||||||
|
}
|
||||||
|
else
|
||||||
if (--map[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex]
|
if (--map[bl->m].users == 0 && battle_config.dynamic_mobs) //[Skotlex]
|
||||||
map_removemobs(bl->m);
|
map_removemobs(bl->m);
|
||||||
|
sd->state.debug_remove_map = 1; // temporary state to track double remove_map's [FlavioJS]
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user