Support FTE_PEXT_TRANS and FTE_PEXT_COLOURMOD. #145
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FTE_PEXT_TRANS was broken when implemented long ago. This finishes the implementation, and also adds FTE_PEXT_COLOURMOD which was mostly declared in the protocol header, but not implemented. The latter is a convenient extension field for mappers to use when dealing with alpha brushes later on. For example using the same glass texture with alpha, but tint it via colormod field.
Broken clients (all ezQ versions) will be demoted to opaque entities based on revision.
When no entity has modified alpha or colormod, the additional bytes are not written. The PF_EXTRA_PFS will however still write one extra byte due to the moving of PF_ONGROUND and PF_SOLID. This is only a problem for buggy clients that have cl_pext_alpha set to 1, and somehow trick the server side check that would disable it if the client is too old, ie you get what you ask for.
For not fully connected usecases mvd and outdated qtv clients should remain unaffected by this change as long as no alpha nor colormod is used as it doesn't follow the networked player info packet structure. If for example using translucent spawn markers, these are only shown before demo recording usually begins so demos on maps without alpha entities will be playable in any old client.