GoldenEye: Source Forums

Debriefing => Bug Reports & Fixes => Topic started by: Joe on June 01, 2013, 12:11:18 pm

Title: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
Post by: Joe on June 01, 2013, 12:11:18 pm
This bug doesn't occur when the HUD message's colour is a pure colour (I tested the pure colours with their alpha = 0).

To test this bug, add the following code to the Death Match script and then repeatedly press the voodoo key when playing it, the HUD message's colour will become white after several presses of this key:
Code: [Select]
test = 0

def OnPlayerSay(self,player,text):
if text == "!voodoo":
GEUtil.HudMessage(None,"test:" + str(DeathMatch.test),-1,-1,GEUtil.Color(100,184,234,255),GERules.GetRoundTimeLeft(),1)
DeathMatch.test += 1
Title: Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
Post by: killermonkey on June 01, 2013, 12:37:29 pm
Alpha 0 is used as a flag in the backend to ignore the color. Don't test with alpha 0. Pure color is alpha 255
Title: Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
Post by: Joe on June 01, 2013, 07:01:23 pm
When I said this bug didn't happen when the HUD message used a "pure colour" I was referring to the colours: (255,0,0) (0,255,0) and (0,0,255).

Changing the alpha value from 0 to 255 hasn't prevented the colour from fading in this code's HUD message, I've also tried 220:
Code: [Select]
test = 0

def OnPlayerSay(self,player,text):
        if text == "!voodoo":
            GEUtil.HudMessage(None,"test:" + str(DeathMatch.test),-1,-1,GEUtil.Color(100,184,234,255),GERules.GetRoundTimeLeft(),1)
            DeathMatch.test += 1
Title: Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
Post by: killermonkey on June 02, 2013, 08:29:05 pm
Wow, awesome catch! I have fixed this now as well... problem was the messages were not "overwriting" the previous ones on the same channel. Thus the colors stacked up on each other. Pure colors didn't go to white since their color component was already 255. The whiteness is actually an artifact of drawing the same message over several times.
Title: Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
Post by: Troy on June 02, 2013, 11:53:52 pm
I knew it did this when you omitted a channel, but I didn't know it did this if you defined a channel.  Definately shouldn't overlap then.
Title: Re: 4.2.3 RC1 & 4.2.2: HUD Message's colour fades when it's overwritten.
Post by: Joe on June 09, 2013, 03:13:59 pm
Wow, awesome catch! I have fixed this now as well... problem was the messages were not "overwriting" the previous ones on the same channel. Thus the colors stacked up on each other. Pure colors didn't go to white since their color component was already 255. The whiteness is actually an artifact of drawing the same message over several times.

Thanks for fixing this bug.