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

Fix FTE_PEXT_TRANS and FTE_PEXT_COLOURMOD #10

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

dsvensson
Copy link
Collaborator

No description provided.

@dsvensson
Copy link
Collaborator Author

dsvensson commented Nov 3, 2024

Ah, need to update the CI here since CMake transition, and should probably just build dynamically linked on Linux to make it fast. No value added by having the Windows build here, nor having multiple archs of Linux, as the protocol is the same on all OSes.

The extension was incorrectly implemented from the beginning. To support
the extra bits support for PF_EXTRA_PFS is needed which results in an
extra byte of player flags. With a 24 bit player flags PF_ONGROUND and
PF_SOLID are then found at a higher offset. This added offset is
typically emulated by upshifting the relevant bits in incoming data if
PEXT_TRANS is not part of the extensions the client announces support
for to be able to use the same definitions in both cases.
Support for colourmod was partially declared in protocol.h, but missing
the entity_state_t bytes, as well as a few defines.

colourmod[3] is r/g/b with 1/32 precision, thus a value of 32 corresponds
to 1.0f, which in effect means no color modification, and the same is
true for 0.0f. Values above 1.0f yields overbrights.
@dsvensson dsvensson merged commit dd5165c into QW-Group:master Nov 6, 2024
2 checks passed
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.

1 participant