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:
parent
0ade5b9861
commit
c8c78d0b2a
@ -6,6 +6,10 @@ Saves from 11.x are not compatible with 12.0.0.
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[Campaign]** Fixed double counting of parked aircraft kills when DCS reports multiple kill events.
|
||||
* **[UI]** Naval control points (carriers, LHAs) can no longer be moved onto land.
|
||||
|
||||
|
||||
# 11.0.0
|
||||
|
||||
Saves from 10.x are not compatible with 11.0.0.
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user