When using drawLaser on a PerFrame or Draw3d mission event handler and also displaying a PiP render on screen (from a AV camera, for example), the laser will only be drawn in the PiP render and not the main render.
The expected behavior (from a user perspective, not a scripters per se) would be that the laser is rendered in both the PiP render and the main render.
From a scripters perspective, I suspect that the MEH is only firing once for the full frame, and the drawLaser is being grabbed by the PiP render and then discarded as completed before the main frame is rendered, so this is "expected" but inconvenient.
Suggested fixes:
- give the PerFrame and Draw3d MEH's an optional parameter to be fired only once per main frame, or else for each render in a frame (specifically counting PiP renders).
- adjust drawLaser to check for PiP renders in a frame, and ensure that it is copied to all PiPs in that frame.
- create a diag command to detect whether the current render is for PiP or not, so that a check for this condition can be added to the script. (perhaps to spawn a script which waits for the "current frame" to not be PiP before firing a drawLaser)
Rational for needing this fix: drawLaser is a powerful function, allowing for modders to create weapon lasers of many types and qualities (my own mod is built almost entirely off this command). This power is limited if the laser (a weapon aiming laser, for example) disappears any time a PiP effect is being rendered. With recent additions to the Workshop, this could be any time you go to ADS with a PiP optic, or it could be as common a situation as sitting inside a vehicle that has PiP mirrors.