Skip to content

Commit

Permalink
fix: ensure flag carrier is hidden on radar map after flag reset (#286)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MrDave1999 authored Jan 9, 2025
1 parent 5ca2edd commit 1c6bd3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Application/Teams/Flags/Systems/ResetFlagSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ private void ResetFlagPosition(Player player, Team team)
team.ColorName
});
team.IsFlagAtBasePosition = true;
team.Flag.RemoveCarrier();
team.Flag.Carrier?.HideOnRadarMap();
team.Flag.RemoveCarrier();
teamPickupService.CreateFlagFromBasePosition(team);
teamPickupService.DestroyExteriorMarker(team);
teamSoundsService.PlayFlagReturnedSound(team);
Expand Down

0 comments on commit 1c6bd3d

Please sign in to comment.