You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Client versions older than 0.3.7-R3 rendered the textdraws twice. Kalcor fixed it in 0.3.7-R3, but this causes textdraws to look different due to different alpha values.
SA-MP 0.3.7-R3
SA-MP 0.3.7-R2
Describe the solution you'd like
The issue can be fixed server-side by darkening the textdraw values for players on 0.3.7-R3 and newer clients (assuming that the textdraws are made on 0.3.7 or 0.3.7-R2 client). Some config switch would be useful if someone already made all textdraws on newer versions (maybe with possible textdraw brightening to make them look the same on older clients?).
@Y-Less posted ready-to-use snippet for darkening the colors:
uint32_tFixAlpha(uint32_t colour)
{
// Extract the alpha channel.uint32_t alpha = colour & 0xFF;
// Convert to a fraction.float n = (float)alpha / 255;
// Darken the result.float m = n * (2 - n);
// Convert back to a value.uint32_tfinal = (uint32_t)((m * 255.0f) + 0.5f);
// Clamp.if (final > 255)
final = 255;
// Put back in the colour.return (colour & 0xFFFFFF00) | final;
}
Describe alternatives you've considered
I've already made my own solution in Pawn with Pawn.RakNet (hooking ShowTextDraw and SelectTextDraw RPCs), but after discussing it on Discord, we came to the conclusion that it would be nice to have a native patch as well.
Is your feature request related to a problem? Please describe.
Client versions older than 0.3.7-R3 rendered the textdraws twice. Kalcor fixed it in 0.3.7-R3, but this causes textdraws to look different due to different alpha values.
SA-MP 0.3.7-R3
SA-MP 0.3.7-R2
Describe the solution you'd like
The issue can be fixed server-side by darkening the textdraw values for players on 0.3.7-R3 and newer clients (assuming that the textdraws are made on 0.3.7 or 0.3.7-R2 client). Some config switch would be useful if someone already made all textdraws on newer versions (maybe with possible textdraw brightening to make them look the same on older clients?).
@Y-Less posted ready-to-use snippet for darkening the colors:
Describe alternatives you've considered
I've already made my own solution in Pawn with Pawn.RakNet (hooking
ShowTextDraw
andSelectTextDraw
RPCs), but after discussing it on Discord, we came to the conclusion that it would be nice to have a native patch as well.Additional context
https://sampforum.blast.hk/showthread.php?tid=661491&pid=4070154#pid4070154
The text was updated successfully, but these errors were encountered: