I am having an issue when we change possession between pawns that a held binary input is triggering on the newly possessed pawn if the input button was held prior to the possession change.
The issue looks to stem from a change in:
IEnhancedInputSubsystemInterface::RebuildControlMappings
Although reading the commit note on this change, the notes sound like the opposite of the change that was actually made:
https://github.com/EpicGames/UnrealEngine/commit/4cf4b69897e5179bfd109917905e9f30ad7830bb
The issue being that the code on ~line 930 ( according to github on UE 5.5 ):
Mapping.bShouldBeIgnored = true;
Is made redundant by the line further down ~line 947 ( according to github on UE 5.5 ):
Mapping = MoveTemp(OldMappings[Idx]);
where the value of bShouldBeIgnored is being written over by the value of this in the old mapping.
The change mentioned above has the comment:
“Ensure that we set bShouldBeIgnored AFTER we retain the state of old triggers and modifiers”
however the actual change looks to move it before to before it is retaining the the state of the old triggers and modifiers?
Am I just misunderstanding the commit/message/logic or is this a legitimate issue?
NB: I swapped the code around locally and it resolved the issue for me ( so it looked like it did before the change linked above ).
Edit: Having looked back over our local history ( typically taking later release iterations like 5.4.3 etc. but going as far back as 5.2 ) I don’t ever see that code that sets bShouldBeIgnored AFTER the code that is copying over from the old mappings. The issue *seemed* to appear for us when we upgraded from 5.4.X to 5.5.X ( though it is possible it was there before and we just didn’t have a clear use-case in place yet, but I am relatively sure I was testing this functionality about 18 months ago and it was working, but maybe not? ).
Ah, ok - it was this commit that moved it AFTER, not much time before moving it back again with the commit above:
https://github.com/EpicGames/UnrealEngine/commit/64be6db96f23312cf3cdf9b13693dff3e1944309
Was there an issue with this being AFTER and this wouldn’t be a suitable fix for this?