beyond-all-reason / beyond-all-reason/RecoilEngine
Attack Command: Attackers can stop without being able to fire when obstructed by terrain
- Dominant language
- C++
- Stars
- 683
- Forks
- 293
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
## Current behavior
Units executing an explicit Attack command can stop moving without firing when
their shot is obstructed by terrain or by friendly units.
In a group, some units may continue moving and firing while other units stop
behind the obstruction and remain idle, even though they still have the Attack
command queued.
https://github.com/user-attachments/assets/7eab142d-acba-4be2-ace3-0675c06602fc
Notice that when all 5 Sheldon stop moving
- 2 are stuck behind a wall
- 2 are shooting at their friends or other targets
- Only one is actually shooting at the target
## Expected behavior
Units should continue moving until they have an actual firing solution. They
should not stop permanently at a position from which their weapon cannot fire.
## Manual Reproduction
1. Place several mobile, non-strafing attackers close together behind uneven
terrain.
2. Give the group a direct Attack command against a unit on the other side of
the obstruction.
## Test case
Unzip this to bar data
[attack-obstacle-reproducer-master.zip](https://github.com/user-attachments/files/31280967/attack-obstacle-reproducer-master.zip)
start game:
```sh
'/path/to/recoil/install/spring' \
--window \
--isolation \
--write-dir '/path/to/bar-data' \
tools/StartScripts/startscript_attack_target_list_scenario.txt
```
Contributor guide
Research direction
Start by unpacking attack-obstacle-reproducer-master.zip into the BAR data directory and run tools/StartScripts/startscript_attack_target_list_scenario.txt with the documented command. Observe the explicit Attack command with multiple attackers behind uneven terrain, then trace the attack-command and movement behavior involved. Done means obstructed units keep moving until they have a valid firing solution rather than stopping idle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100