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

2314 Teleporting units sometimes draw their tracks between start and end position

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

Description

![image](https://github.com/beyond-all-reason/spring/assets/1318249/483fd09a-1c90-452e-9f73-e82356fdc97d)

This is new, 1821 works correctly. But there is no engine support for this, I just did stuff years ago until the tracks disappeared. Here is the current version.
```
function GG.MoveMobileUnit(unitID, tx, ty, tz)
if not CallScript(unitID, "unit_teleported", {tx, ty, tz}) then
Spring.SetUnitPosition(unitID, tx, tz)
Spring.MoveCtrl.Enable(unitID)
Spring.MoveCtrl.SetPosition(unitID, tx, ty, tz)
Spring.MoveCtrl.Disable(unitID)
end
end
```
[2024-03-18_06-00-52-841_TitanDuel 2_105.1.1-2314-g9e0bf7d BAR105.sdfz.txt](https://github.com/beyond-all-reason/spring/files/14631684/2024-03-18_06-00-52-841_TitanDuel.2_105.1.1-2314-g9e0bf7d.BAR105.sdfz.txt)

Contributor guide

Open the contributing guide

Research direction

Start with GG.MoveMobileUnit and compare the current 2314 behavior with 1821. Trace the teleport path through CallScript, Spring.SetUnitPosition, and Spring.MoveCtrl, using the attached reproduction details. Done means teleporting units no longer draw tracks between their start and end positions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, lua
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.