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

EndTransport should use passengerID as arg

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

Description

Consider editing unitScript function EndTransport to use passengerID as argument.
This will enable customized animations instead of a default unload animation.

Additionnally, consider having EndTransport(passengerID) be called for each individual unit, rather than only once the transport is empty for UnloadLandFlood and UnloadLand methods; similar to what UnloadDrop method does; especially since we can now give individual UnloadUnit commands based on specific unitIDs rather than unloading all units.
You could still find a way to call it i.e. with a bool IsEmpty value in case the final EndTransport call (the one called when all units successfully unloaded) needs to be identified for further animating.
And last, consider adding a bool "killed" arg and calling EndTransport(passengerID, killed) upon passenger dying during transport. Allowing an animation to occur specifically when a passenger died.

nb. this might need to fix the fact that passengerID can be a number but not point to any valid unitID anymore when this is called near a unit death.

Contributor guide

Open the contributing guide

Research direction

Trace the unitScript EndTransport function and the UnloadLandFlood, UnloadLand, and UnloadDrop entry points first. Compare when each method unloads individual units, handles an empty transport, and reacts to a passenger death. Done means the relevant calls consistently provide the needed passenger identity and distinguish final unloading and death cases without relying on invalid unit IDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.