Closed Auge103 closed 1 year ago
To embed images
![](<link>)
Also your link is wrong when you click on it
https://github.com/acemod/ACE3/blob/master/addons/optics/functions/fnc_onDrawScope2D.sqf#L30 This is problematic, should only be called on first frame though.
https://github.com/acemod/ACE3/blob/master/addons/optics/functions/fnc_onDrawScope2D.sqf#L82 ~That might be expensive? Though it doesn't show up on the profiler (assuming the profiler is not bugging out..)~ Doesn't matter perf wise, and doesn't show up in profiler because it exits early. Read TLDR below.
~https://github.com/acemod/ACE3/blob/master/addons/optics/functions/fnc_onDrawScope2D.sqf#L98-L103 This does seem bad. It's a PFH. If the control is already shown we shouldn't re-show it. Though I don't know the perf impact of that.~ Would need instruction level prof. I'll do that gimme a min.
TLDR at bottom.
When attaching a ACE PIP scope/optic to a weapon, using it causes the framerate to drop from >60 to <10fps for me.
Can't reproduce. Not looking through scope 200us, looking through scope 400us. Does the problem take some time to appear?
This happens everywhere, but has more impact the larger the map / the richer the environment is.
Speaks for ambient brightness script. actually really weird that it's missing in your capture....
Maybe something is deleting the GVAR(camera)
Can you make a capture with -profilerEnableInstruction
Arma start parameter, and attach the capture here in a zip file? doesn't have to be long, all that matters is that the function is on there.
I stay on smooth 60fps while looking through a pip scope ace_optic_arco_pip
I assume the camera is nullobj, instruction profiling will confirm it if it's the case.
Can't see any mod in your RPT that might cause that. Well unless bwmod.... @commy2 you got any idea? Same kind of allMissionObjects "camera"
that BW was doing.
TLDR; nvm all that I wrote.
https://github.com/acemod/ACE3/blob/master/addons/optics/functions/fnc_onDrawScope2D.sqf#L31
It loops here, into the exitWith. Same bug as BWMod had.
The _x != GVAR(camera)
check doesn't make any sense if camera is null. Also findIf.
Didn't we get a new feature camera thing in CBA?
tracytrace.zip Here's a full capture //Edit: regarding your question, the problem appears instantly when starting the scenario or when attaching such an optic in the field
Did you test in editor preview? Can you test if it still happens without BWMod? I assume that's the cause. Are you running the latest version of BWMod?
Strange enough, when pressing ESC (multiplayer - not paused), the framerate goes back to normal while it is still rendering the same scene as before. This also happens when having a scope attached in the ace arsenal loadout screen.
This draw handler is not executed when the esc menu is opened, because the focus is no longer on the mission display, where the draw handler is (indirectly) attached to.
@dedmen Yes, editor preview. And you are right, its working again with disabled BWMod. (it is the latest version from Steam, as are all loaded mods)
Up to commy then. Dunno what he did inside bwmod.
@Auge103 You can try disabling the PIP Optics in the settings of BWA3.
@commy2 I set BWA3_usePipOptics to false, didn't change anything regarding the ACE optics.
Don't set the variable to false. Change the setting in the menu and maybe restart the mission.
i have this issue, too. but only in the "liberation mission" and only with ace-pip scopes.https://github.com/KillahPotatoes/KP-Liberation/issues/570#issuecomment-467534483
@madpat3 only on liberation? Are you running BWMod? If not then that is the same cause as how I found the same bug in BWMod.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
We now use CBA optics right so should probably be fixed now?
We don't use CBA optics in master and there is no branch for it. However, if I find time to spare I will implement that.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closing due to age, inactivity or already solved. May be re-opened if the issue is still present, even better just open a new up-to-date Issue.
Arma 3 Version:
stable 1.88.145302
CBA Version:stable 3.9.1
ACE3 Version:stable 3.12.5
Mods:
see list in attached .rpt
Description:
z\ace\addons\optics\functions\fnc_onDrawScope2D.sqf.19
is using up to 60ms of frametime when one of those scopes is attached: PictureSteps to reproduce:
Where did the issue occur?
Additional information:
RPT log file: https://pastebin.com/jMwbqsfC ACE debug paste: https://pastebin.com/eArS011c