Small correction in bg_team_leave (#5372)
Corrected bg_team_leave to also remove the player from the bg when entry_point (bg enqueue) is not defined
This commit is contained in:
@@ -538,8 +538,8 @@ int bg_team_leave(struct map_session_data *sd, bool quit, bool deserter)
|
||||
auto member = bgteam->members.begin();
|
||||
|
||||
while (member != bgteam->members.end()) {
|
||||
if (member->sd == sd && member->entry_point.map != 0) {
|
||||
if (!map_getmapflag(map_mapindex2mapid(member->entry_point.map), MF_NOSAVE))
|
||||
if (member->sd == sd) {
|
||||
if (member->entry_point.map != 0 && !map_getmapflag(map_mapindex2mapid(member->entry_point.map), MF_NOSAVE))
|
||||
pc_setpos(sd, member->entry_point.map, member->entry_point.x, member->entry_point.y, CLR_TELEPORT);
|
||||
else
|
||||
pc_setpos(sd, sd->status.save_point.map, sd->status.save_point.x, sd->status.save_point.y, CLR_TELEPORT); // Warp to save point if the entry map has no save flag.
|
||||
|
||||
Reference in New Issue
Block a user