mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-03-19 17:12:03 +00:00
Slide/fade out for callvote HUD.
This commit is contained in:
parent
a629b44209
commit
880d2c0057
1 changed files with 7 additions and 2 deletions
|
@ -2229,7 +2229,7 @@ static void CG_DrawVote(void)
|
|||
trap_S_StartLocalSound(cgs.media.talkSound, CHAN_LOCAL_SOUND);
|
||||
}
|
||||
|
||||
sec = (VOTE_TIME - (cg.time - cgs.voteTime)) / 1000;
|
||||
sec = (VOTE_TIME - (cg.time - cgs.voteTime) + 999) / 1000;
|
||||
if (sec < 0) {
|
||||
sec = 0;
|
||||
}
|
||||
|
@ -2274,7 +2274,12 @@ static void CG_DrawVote(void)
|
|||
height = previewHeight + 4;
|
||||
}
|
||||
|
||||
alpha = SmoothLerp(Com_Clamp(0.f, 1.f, (cg.time - cgs.voteTime) / (1000.f * 0.125f)));
|
||||
{
|
||||
int begin = cg.time - cgs.voteTime;
|
||||
int end = VOTE_TIME - begin;
|
||||
int min = begin < end ? begin : end;
|
||||
alpha = Com_Clamp(0.f, 1.f, min / (1000.f * 0.125f));
|
||||
}
|
||||
|
||||
// slide in //
|
||||
xmin -= (1.f - alpha) * (len + offset);
|
||||
|
|
Loading…
Reference in a new issue