Skip to content
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

Issue with particles when drawing with DrawEntity2D #1312

Open
Akulla-A opened this issue Oct 21, 2023 · 0 comments
Open

Issue with particles when drawing with DrawEntity2D #1312

Akulla-A opened this issue Oct 21, 2023 · 0 comments

Comments

@Akulla-A
Copy link

Akulla-A commented Oct 21, 2023

Hi,
I found an issue related to drawing particles with DrawEntity2D, or any "render" outside of the default one ( See below ). This happens with at least TF2 particles and the default error particle. The particle is not drawn by DrawEntity2D.

This is not an issue related to the particle itself since this works with a Lua code not using pac3 ( I can provide a code example ). I tried a lot of options on the effect, and nothing worked.

I looked into the pac3 code, and a solution could be to redraw the particle with https://wiki.facepunch.com/gmod/CNewParticleEffect:Render when calling DrawEntity2D.
However, some parts of the effect code use functions that do not return a CNewParticleEffect object. Using alternative functions would break some options ( Like angle ). I wanted to make a commit with the :Render() thing, but since it would lead to breaking changes, it doesn't seem like the right solution.
Another solution can be to make an "invisible" entity, parent the particle on it, to keep the angle parameter, but it would break the point a/b/c/d thing since it would use another entity.

The code I used for the screen ( I also tried the PostDrawTranslucentRenderables hook ):

hook.Add("HUDPaint"," azeza", function()
    pac.DrawEntity2D(nil, nil, nil, 512, 512)
end)

The Pac3 Code: https://pastebin.com/Dmb5bi65

20231021233856_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant