beyond-all-reason / beyond-all-reason/RecoilEngine
Request: add Spring.PokeUnit(unitID)
- Dominant language
- C++
- Stars
- 679
- Forks
- 290
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 40
Description
To make units act immediately, needed for some cases - for example mines spawned by ZK Badger or BAR Peewee Cannon will normally wait until the slowupdate (? at least i think it's a slowupdate, it seems to be 0 - 0.5s at least) to act, ZK jumpers will wait to continue moving after a jump, etc. ZK works around this by ordering CMD.WAIT twice, which forces an update but an explicit callout would be ideal (for both readability and not involving the extra overhead of command handling).
Possibly some of the use cases would be good to handle in the engine as well, but that is outside the scope of this request.
ZK usage examples of wait wait:
https://github.com/ZeroK-RTS/Zero-K/search?q=WaitWaitMoveUnit
https://github.com/ZeroK-RTS/Zero-K/blob/5ead91cdd3fd5fba24355b67c96b3c25a3a45cb8/LuaRules/Gadgets/unit_explosion_spawner.lua#L102-L104
https://github.com/ZeroK-RTS/Zero-K/blob/1488e31cecee7626f74f73ad55cd116574ed34f7/LuaRules/Gadgets/unit_jumpjets.lua#L392-L393
Contributor guide
Research direction
Start by tracing the existing Spring unit API for the requested Spring.PokeUnit(unitID) entry point, then read the cited Zero-K LuaRules usages of WaitWaitMoveUnit. Confirm the intended immediate-update behavior for spawned units and jumpers, and verify that the API can replace those double-WAIT workarounds without requiring engine-side handling beyond this request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, lua
- Domain
- api, game-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100