Skip to content

Commit

Permalink
add easter egg.
Browse files Browse the repository at this point in the history
  • Loading branch information
sabianroberts committed Dec 28, 2024
1 parent 7bf2917 commit 7f661e0
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
26 changes: 26 additions & 0 deletions cl_dll/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1054,4 +1054,30 @@ void CHud::ApplyGreyscaleEffect()
int grey = 128;
int alpha = 128;
gEngfuncs.pfnFillRGBA(0, 0, ScreenWidth, ScreenHeight, 255, 0, 0, 128);
}

cvar_t* r_pissfilter;

void CHud::ApplyPissFilter()
{
int r = 182;
int g = 137;
int b = 38;

static bool PissPrint = false;

if (r_pissfilter->value != 0)
{
gEngfuncs.pfnFillRGBA(0, 0, ScreenWidth, ScreenHeight, r, g, b, 60);
if (!PissPrint)
{
gEngfuncs.Con_Printf("PISSFILTER ENGAGED!!\n");
gEngfuncs.pfnPlaySoundByName("sound/gah.wav", 1);
PissPrint = true;
}
}
else
{
PissPrint = false;
}
}
3 changes: 2 additions & 1 deletion cl_dll/hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,8 @@ class CHud

float m_flHudLagOfs[2];
void ApplyGreyscaleEffect();
};
void ApplyPissFilter();
};

extern CHud gHUD;

Expand Down
2 changes: 2 additions & 0 deletions cl_dll/hud_redraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ int CHud :: Redraw( float flTime, int intermission )
{
ApplyGreyscaleEffect();
}
else
ApplyPissFilter();

/*
if ( g_iVisibleMouse )
Expand Down
3 changes: 3 additions & 0 deletions cl_dll/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ extern cvar_t* cl_forwardspeed;
extern cvar_t* chase_active;
extern cvar_t* scr_ofsx, * scr_ofsy, * scr_ofsz;
extern cvar_t* cl_vsmoothing;
extern cvar_t* r_pissfilter;

#define CAM_MODE_RELAX 1
#define CAM_MODE_FOCUS 2
Expand Down Expand Up @@ -2111,6 +2112,8 @@ void V_Init(void)
cl_shockrifle_punch_enabled = gEngfuncs.pfnRegisterVariable("cl_shockrifle_punch_enabled", "1", FCVAR_ARCHIVE);

crosshair_low = gEngfuncs.pfnRegisterVariable("crosshair_low", "0", FCVAR_ARCHIVE);

r_pissfilter = gEngfuncs.pfnRegisterVariable("r_pissfilter", "0", FCVAR_ARCHIVE);
}


Expand Down

0 comments on commit 7f661e0

Please sign in to comment.