cortex-command-community / Cortex-Command-Community-Project-Source

[ARCHIVED] Cortex Command - Open Source under GNU AGPL v3 (no game data included)
https://cortex-command-community.github.io/
GNU Affero General Public License v3.0
201 stars 41 forks source link

Activities unexpectedly end when loading a brain in a plane #218

Open tomflenniken opened 4 years ago

tomflenniken commented 4 years ago

Describe the bug The Maginot mission is not winnable because you lose when you load your brain in the rocket. The same goes for other activities that you lose when your brain is destroyed. "DEAD" text appears but the scene doesn't end. When the brain is killed, even after "DEAD," the text is "FAIL" instead. Whatever "FAIL" is doing seems to be correct, but "DEAD" is dead wrong.

To Reproduce This is easiest to reproduce in Brain vs Brain. Start the mission, load your brain into a rocket, and that's it. Fly it into space if you want things to turn to "FAIL" instead of "DEAD".

Expected behavior The brain should still be considered to be alive if it's inside of some craft.

Additional context I believe the root of the problem is the GetPlayerBrain Lua function is not recognizing brains in crafts. That's why I've opened this bug against the source rather than the data project.

fourZK commented 4 years ago

Some activities deal with this by assigning "brain" status to whatever craft is holding brain units inside of it, but I definitely agree that this should be something that is worked out source-side.

tomflenniken commented 4 years ago

@fourZK Thanks for the work around suggestion.