beyond-all-reason / beyond-all-reason/RecoilEngine

Airbursting Cannon Shots

Open
#552 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
679
Forks
290
Avg merge
3d 1h
Merged PRs (30d)
38

Description

![output](https://user-images.githubusercontent.com/44480662/208424283-ac8383cb-af26-409c-8f6b-d53268ef1c63.gif)
Bug in Cannon.cpp, void CCannon::FireImpl.

Projectile lifetime ttl is predicted using projectile 2D velocity and target 2D distance. However, the 2D velocity is using values after modification by projectile accuracy, the Spray Angle. Therefore, if projectile inaccuracy adds a large horizontal component to velocity, and target 2D distance is small, an erroneous small ttl value is calculated, causing projectiles to end their life, to "collide", airbursting while still in mid-air.

Contributor guide

Open the contributing guide

Research direction

Start in Cannon.cpp at CCannon::FireImpl and inspect how projectile 2D velocity, target 2D distance, accuracy, and Spray Angle feed into the lifetime calculation. Reproduce the small-distance, high-inaccuracy case shown in the report and verify that projectiles no longer end their lifetime or airburst while still in mid-air.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.