Skip to content

Commit 1c6bd3d

Browse files
authored
fix: ensure flag carrier is hidden on radar map after flag reset (#286)
The HideOnRadarMap method must be invoked before calling RemoveCarrier to ensure the Carrier property is not set to null. If RemoveCarrier is called first, HideOnRadarMap will not be called, resulting in the carrier still being visible on the radar map despite the flag reset.
1 parent 5ca2edd commit 1c6bd3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Application/Teams/Flags/Systems/ResetFlagSystem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ private void ResetFlagPosition(Player player, Team team)
3838
team.ColorName
3939
});
4040
team.IsFlagAtBasePosition = true;
41-
team.Flag.RemoveCarrier();
4241
team.Flag.Carrier?.HideOnRadarMap();
42+
team.Flag.RemoveCarrier();
4343
teamPickupService.CreateFlagFromBasePosition(team);
4444
teamPickupService.DestroyExteriorMarker(team);
4545
teamSoundsService.PlayFlagReturnedSound(team);

0 commit comments

Comments
 (0)