瀏覽代碼

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
Atemo 4 年之前
父節點
當前提交
7264180a6f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/map/battleground.cpp

+ 2 - 2
src/map/battleground.cpp

@@ -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.