SafetyFinder: Fixed issue with CBS when run mode is NEVER#109
SafetyFinder: Fixed issue with CBS when run mode is NEVER#109do-gamer wants to merge 3 commits intodarkbot-reloaded:masterfrom
Conversation
Pablete1234
left a comment
There was a problem hiding this comment.
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. Is it make sense? |
|
I would rather have the root of the issue fixed instead of the early-return workaround |
Moved into |
|
@Pablete1234 Please review again when you available. I have made the changes as requested. |
|
Decided to move the code back to a more readable flow, fixed in 87a1692 , thanks for the PR anyways tho |
No description provided.