Fix research sync toggle and classic medikit crash - #185
Merged
Merged
Conversation
Make the research sync toggle actually disable research synchronization. - Stop sending, receiving, and applying research updates when disabled. - Keep the client UI synchronized with the host-authoritative setting. - Propagate host changes made during an active session. - Clear pending research updates when synchronization is disabled. - Fix the research packet base longitude field name. - Label research synchronization as a Separate campaign option. - Prevent a disabled PvP reaction-fire setting from leaking into co-op. - Resolve the healer's actual medikit during classic-turn replay. - Validate the healer, medikit, item type, and body part. - Guard medikitUse against missing action, target, weapon, or rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes two co-op issues:
Enable Research Sync (Separate)toNOdid not disable research synchronization because the actual send, receive, and apply paths ignored the negotiated value.It also prevents a disabled PvP reaction-fire setting from leaking into later non-PvP co-op sessions.
Disabled research synchronization
Enable Research Sync (Separate)is set toNO.Enable Research Sync (Separate).base_lottobase_lon.Classic medikit crash
The classic replay path reused the host's current
BattleAction. It assigned the actor, action type, and TU cost, but never assignedaction->weapon.TileEngine::medikitUse()subsequently dereferenced:action->weapon->getRules()This caused an access violation when a client healed a soldier and the host's current action had no weapon.
The fix:
TileEngine::medikitUse().PvP reaction fire
Enable Reaction Fire in PvP = NOfrom affecting a later normal co-op campaign.Testing
action->weapon->getRules()with a null weapon.