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

Fixed Friendly Personnel Missing Post-Scenario Scenario Credit #4125

Merged
merged 4 commits into from
Jun 6, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented May 30, 2024

This PR addresses an issue where friendly personnel are not receiving scenario credit upon scenario completion.

From my analysis, it seems that friendly personnel should not be processed at this point in the code, as they are supposed to be handled elsewhere. I reviewed the code and could not identify where friendlies are being added to the oppositionPersonnel Hashtable. However, it appears they are being added somewhere, or there is another underlying issue I couldn't spot.

Given the nature of this problem, I recommend that someone with more experience review the ResolveScenarioTracker.java code. This type of error could potentially lead to more significant problems in the future.

- Added new action for logging participation in scenario during mission
- Enhanced condition for logging of captured during scenario to accommodate non-capture scenarios
@IllianiCBT IllianiCBT self-assigned this May 30, 2024
@SJuliez
Copy link
Member

SJuliez commented Jun 3, 2024

It appears that line 1051 of public class ResolveScenarioTracker is the only place that something is added to oppositionPersonnel
image
This is in processPrisonerCapture(). I am not sure why friendlies should be added to this map at all. But of course it cycles all units it gets passed in and tries to add their crew. If friendly units get passed in from salvage then that is, I guess, an error. Going back gives some places where units get added to potentialSalvage. Of course, if some MUL file processing goes wrong, then the fault could lie in MM code.

@SJuliez SJuliez merged commit 129c168 into MegaMek:master Jun 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants