Skip to content

Conversation

@do-gamer
Copy link

No description provided.

Copy link
Member

@Pablete1234 Pablete1234 left a comment

Choose a reason for hiding this comment

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

You're solving the wrong part of the issue.

This used to work just fine prior to the fix for CBS casting, meaning the issue is contained within just the statement:
.map(cbs -> !(cbs.getEntityInfo().isEnemy() || (cbs.getHullId() == 0 && safety.getCbsMode() == SafetyInfo.CbsMode.ALLY)))
which can return true in situations it shouldn't

@do-gamer
Copy link
Author

You're solving the wrong part of the issue.

This used to work just fine prior to the fix for CBS casting, meaning the issue is contained within just the statement: .map(cbs -> !(cbs.getEntityInfo().isEnemy() || (cbs.getHullId() == 0 && safety.getCbsMode() == SafetyInfo.CbsMode.ALLY))) which can return true in situations it shouldn't

@Pablete1234 Yes, I agree with you. The bug is exactly in this one condition.
I just implemented an early return, because if the run mode is NEVER, then there is nothing to do more in this method, just return false.

Is it make sense?
Else I will update the condition into map()

@do-gamer do-gamer requested a review from Pablete1234 January 25, 2026 14:13
@Pablete1234
Copy link
Member

I would rather have the root of the issue fixed instead of the early-return workaround

@do-gamer
Copy link
Author

I would rather have the root of the issue fixed instead of the early-return workaround

Moved into map()

@do-gamer
Copy link
Author

@Pablete1234 Please review again when you available. I have made the changes as requested.
Thank you!

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