Client: Implement "startdark" key from worldspawn. Which is responsible for

the fade-in effect in c0a0 for example.
This commit is contained in:
Marco Cawthorne 2022-01-02 21:04:55 -08:00
parent c920e4c3e8
commit d375ec5f93
Signed by: eukara
GPG key ID: C196CD8BA993248A
2 changed files with 18 additions and 0 deletions

View file

@ -85,6 +85,19 @@ Fade_Update (int x, int y, int w, int h)
pSeat->m_flFadeTime += clframetime;
}
void
Fade_StartDark(void)
{
pSeat->m_vecFadeColor = [0.0, 0.0, 0.0];
pSeat->m_flFadeMaxAlpha = 1.0;
pSeat->m_flFadeDuration = 5.0;
pSeat->m_flFadeHold = 4.0f;
pSeat->m_flFadeStyle = EVF_FADEDROM;
pSeat->m_flFadeTime = 0.0f;
pSeat->m_flFadeAlpha = 1.0f;
pSeat->m_iFadeActive = TRUE;
}
void
Fade_Parse (void)
{

View file

@ -50,6 +50,8 @@ var float g_flHDRIrisFadeUp = 0.1;
var float g_flHDRIrisFadeDown = 0.5;
var int g_iHDREnabled = 0;
void Fade_StartDark(void);
class worldspawn:NSEntity
{
void(void) worldspawn;
@ -81,6 +83,9 @@ void
worldspawn::SpawnKey(string strField, string strKey)
{
switch (strField) {
case "startdark":
Fade_StartDark();
break;
case "chaptertitle":
GameMessage_Setup(strKey, 0);
break;