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

ref: disabled verbose reporting about tracer invalid color index #1810

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

SNMetamorph
Copy link
Member

@SNMetamorph SNMetamorph commented Sep 2, 2024

Fixes messages spamming in mods such as Sven Co-op 4.8

@a1batross
Copy link
Member

What's the point of this? Why not to turn it into DPrintf or Reportf, if it's bothering you?

We still have bugs like #388 and it won't fix the issue for them, just like it less noticeable and harder to debug.

@SNMetamorph
Copy link
Member Author

We still have bugs like #388 and it won't fix the issue for them, just like it less noticeable and harder to debug.

It's not fixable from engine side, because this is bug of mod itself. GoldSrc does not any validation of color index, but still have buffer with 12 colors just like as we have. Therefore, any index above 12 will cause undefined behavior in such cases, while no reporting anything about invalid color index. This PR clarifies behavior in such cases, and fixes not reason, but consequences of #388

@a1batross
Copy link
Member

a1batross commented Sep 3, 2024

So you're telling me, GoldSrc just reads whatever is out of bounds color array and interprets as an RGB...

Still, it would be nice to have such message for mod developers at higher dev level, though it might be better to catch it not when it draws, because it will be printed each frame, but when it creates. Then it should be in cl_efx.c. Also, I don't think we will increase tracers color set anyway, as there is no real reason for this for now. :)

@SNMetamorph
Copy link
Member Author

So you're telling me, GoldSrc just reads whatever is out of bounds color array and interprets as an RGB...

Exactly. In function R_DrawParticles:
изображение

@SNMetamorph
Copy link
Member Author

SNMetamorph commented Sep 3, 2024

Still, it would be nice to have such message for mod developers at higher dev level, though it might be better to catch it not when it draws, because it will be printed each frame, but when it creates

Yes, this is good idea. But somehow we should have option to disable these messages for abandoned mods that won't be fixed anyway.

@a1batross
Copy link
Member

I'll merge it for now, restoring the message might be done later.

GoldSrc seems to print it only in R_UserTracerParticle impl.

@a1batross a1batross merged commit a85cac4 into FWGS:master Sep 3, 2024
13 checks passed
@SNMetamorph SNMetamorph deleted the tracers-fix-1 branch September 3, 2024 12:33
@a1batross
Copy link
Member

I wonder if we could replicate the broken values that GoldSrc from those versions had. If they don't get changed, of course.

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

Successfully merging this pull request may close these issues.

2 participants