altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

Flickering fix issued marker + drawline in combination

Open C0kkie opened this issue 4 years ago • 7 comments

Client/server version rc/4.0-rc1

Current behavior You cant use drawline in combination with marker native

Expected behavior Both should work

Steps to reproduce

const player = alt.Player.local;
alt.everyTick(() => {
    let pos = player.pos;

    native.drawRect(0, 0, 0, 0, 0, 0, 0, 0, false);

    native.drawBox(pos.x, pos.y, pos.z - 0.5, pos.x + 5, pos.y + 5, pos.z - 0.5, 0, 255, 0, 255);
    native.drawLine(pos.x, pos.y, pos.z, pos.x + 5, pos.y + 5, pos.z, 255, 0, 0, 255);

    //with this line the line and box are not visible
    //native.drawMarker(1, pos.x, pos.y, pos.z, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 255, 255, false, false, 2, false, undefined, undefined, false);
});

C0kkie avatar Jun 24 '21 21:06 C0kkie

@C0kkie Idk if it is related to this, but using the drawMarker native may result in flickering dialogs. It may be because of multiple drawMarker calls. I'll have a look into it.

pixlcrashr avatar Nov 07 '21 13:11 pixlcrashr

that code i posted is enough to reproduce, but there is no eta to fix

C0kkie avatar Nov 07 '21 13:11 C0kkie

that code i posted is enough to reproduce, but there is no eta to fix

I meant that using drawMarker (may also) results in flickering CEF dialogs. I didn't saw an issue for that specifically.

pixlcrashr avatar Nov 07 '21 13:11 pixlcrashr

@C0kkie A final note: When looking at a drawMarker-Marker, CEF pages start to flicker - including the alt:V UI.

Current solution is to disable markers completely.

pixlcrashr avatar Nov 07 '21 14:11 pixlcrashr

@pixlcrashr this is a known GTA Bug, if no GTA Hud is shown and a marker is on the screen. You can fix this with the native draw rect of sizes 0x0 in everyTick.

ThomasMarangoni avatar Nov 08 '21 07:11 ThomasMarangoni

@pixlcrashr this is a known GTA Bug, if no GTA Hud is shown and a marker is on the screen. You can fix this with the native draw rect of sizes 0x0 in everyTick.

@ThomasMarangoni First of all, thanks for the answer - it works. Thanks.

I am curious why that is.

pixlcrashr avatar Nov 08 '21 21:11 pixlcrashr

We cant repro this on rc/11.0-rc21 anymore. If someone has this bug, please write us

C0kkie avatar Jul 12 '22 15:07 C0kkie

Will be fixed in dev/15.0-dev50

C0kkie avatar Apr 16 '23 12:04 C0kkie