-
Notifications
You must be signed in to change notification settings - Fork 148
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
fix updating flashlight fx after attachment switch #1154
Conversation
- Moves adding of next attachment to next frame - Allows different flashlight modes to be used and update properly when switching - Currently switching from one flashlight to another in the same frame whilst the flashlight is on causes the light effect not to update to the new flashlight Question: Would the localEvent need to be moved into the next frame as well?
Video to show: Shows normal flashlight on, switching to far causes no effect change. ExecNextFrame forces the effect to refresh |
ugh.. Arma. Near/Far flashlight is a nice idea, is your mod for that public or do you play to propose that to ACE? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the use of #
and the missing spacing around it, and the missing naming inside the piece of code.
But it's just a one liner and it's really obvious what's happening so it doesn't matter.
Wasn't planning on making the far flashlights part of ace, I lumped them onto a 3CB flashlight/ir combo Any thoughts on the localEvent? |
Oops missed that. I think it should. People may use it to re-replace the item or detach it or whatever. Would be weird if it's not there yet. |
@dedmen Do you think this is ok? https://github.com/CBATeam/CBA_A3/pull/1154/files#diff-73655685f2cbb36065c6caf471ec6630R75 |
Also the event says "switched" in past tense. So it has to fire after. |
I don't get it. The same frame as what else exactly? The flashlight being on? Is the flashlight being turned off anywhere here? |
Switching in this context means removing one attachment and adding another. When both of the attachments are flashlights and the flashlight is on, the light effect of the new flashlight does not update unless you manually turn the light off and on after switching. This is because the remove and add are done in the same frame |
What happens if you hold down the key with this change? (switch attachment every frame. multiple times per frame)? Should be possible I guess, because the current attachment is removed immediately, but would test anyway. |
Holding the key down just switches once |
When merged this pull request will: