Skip to content

Patch 03 - #5802

Open
SteelBlueZK wants to merge 2 commits into
ZeroK-RTS:masterfrom
SteelBlueZK:patch_03
Open

Patch 03#5802
SteelBlueZK wants to merge 2 commits into
ZeroK-RTS:masterfrom
SteelBlueZK:patch_03

Conversation

@SteelBlueZK

Copy link
Copy Markdown
Contributor

Potential fix for #5801

This essentially silent fails, "If this Unitdef is not a unitdef, then it is not a commander"

@sprunk sprunk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Personally I think the error is good (since the mod is passing an incorrect value and should just stop doing that) so perhaps the ideal improvement would have been to make it more helpful:

if not ud then
  error("Spring.Utilities.isComm() called with invalid arg: " .. tostring(ud))
end

But as-is the PR is consistent with how everything is polluted with a billion nil checks.

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.

2 participants