mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Stop naval control points from being moved onto land (#3373)
This PR fixes #3243 by checking whether the destination point is in the sea for naval control points before permitting the movement.
This commit is contained in:
@@ -89,6 +89,11 @@ def set_destination(
|
||||
detail=f"Cannot move {cp} more than "
|
||||
f"{cp.max_move_distance.nautical_miles}nm.",
|
||||
)
|
||||
if cp.is_fleet and not game.theater.is_in_sea(point):
|
||||
raise HTTPException(
|
||||
status.HTTP_400_BAD_REQUEST,
|
||||
detail=f"Cannot move naval control point {cp} onto land.",
|
||||
)
|
||||
cp.target_position = point
|
||||
from .. import EventStream
|
||||
|
||||
|
||||
Reference in New Issue
Block a user