Skip to content

Conversation

@smallmodel
Copy link

It's very similar to issue #186.

SSE and earlier (FP87) have different precision than SSE2/above. A very tiny difference in value can cause some windings (and planes) not to be created at all, resulting in collision issues compared to the original game, such as players falling through the ground.

This bug is infrequent, not sure if anyone else has experienced it (we have).

I didn't try all quake 3 maps.

…ke3 binaries

This is due to a small precision difference between FP87/SSE and SSE2/above.
@timangus
Copy link
Member

Does anyone know why ChopWindingInPlace takes an epsilon parameter in the first place, as opposed to using a global constant? It only ever seems to be called with 0.1f, so that doesn't seem very useful. Perhaps it would be better to introduce a new epsilon global with value 1.0 - 0.0005, and use that instead of passing 0.1f as a parameter and messing with it in the if statements themselves.

Can you point to any concrete examples of where this bug occurs?

@llbraughler
Copy link

llbraughler commented Oct 30, 2025

That epsilon is there because the same clip routine is reused by external map tools or was probably built in the same toolchain as GtkRadiant and q3map2 which use different epsilon values like 0, 0.001 for different stages.

Copy link

@llbraughler llbraughler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use const float ... = 5e-4f instead of hard coding the values in if statements

@smallmodel
Copy link
Author

The bug occurs in a game based on quake3 engine, the game uses a lot of patch surfaces. Unfortunately I won't be able to provide example quake 3 maps where this happens, and it seems quake 3 maps rarely use patches.

There must be some custom maps where this issue occurs. If anyone has ever encountered collision issues with patch surfaces that don't occur in the original quake 3, this is likely the same bug.

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.

3 participants