Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aeon M2 - check if transport is dead #411

Merged
merged 2 commits into from
Jul 28, 2023
Merged

Conversation

maudlin27
Copy link
Contributor

A lua script error can arise if a transport is killed e.g. at the end of mission 2, as the code doesn't check if it is dead before trying to assign to a platoon.

A lua script error can arise if a transport is killed e.g. at the end of mission 2, as the code doesn't check if it is dead before trying to assign to a platoon.
@@ -1285,7 +1285,9 @@ function TransportAssault(platoon, landingLocation, patrolChain, airUnits)
end
else
for _, v in transports do
aiBrain:AssignUnitsToPlatoon('TransportPool', {v}, 'Scout', 'None')
if not(v:IsDead()) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it to v.Dead please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Use of v.Dead instead of v:IsDead()
@speed2CZ speed2CZ merged commit 09f1fb3 into FAForever:master Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants