Just find the original cvar.speed>1 in client.cpp (it should be commented out) and replace it with this code
register the cvars
Code:
if ( cvar.speed>1 )
{
extern DWORD speed_ticks_left;
extern DWORD phase_ticks_left;
int speedbar_x = displayCenterX*2 - 100;
int speedbar_y = displayCenterY*2 - 195;
ColorEntry* clr=colorList.get(13);
if(cvar.speedoff == 0 )
{
DrawHudString(cvar.speedbar_x-11,cvar.speedbar_y, 0, 0, 0, "SpeeD: NoLimiT");
}
else
{
if(speed_ticks_left) DrawHudString(cvar.speedbar_x,cvar.speedbar_y ,clr->r,clr->g,clr->b, "speed: %d",speed_ticks_left );
else DrawHudString(cvar.speedbar_x,cvar.speedbar_y-20,clr->r,clr->g,clr->b, "wait.. %d",phase_ticks_left );
}
if(cvar.speedbar == 1)
{
gEngfuncs.pfnFillRGBA(cvar.speedbar_x,cvar.speedbar_y,100,20,30,30,30,12);//background
if(speed_ticks_left)
{
gEngfuncs.pfnFillRGBA(cvar.speedbar_x,cvar.speedbar_y,speed_ticks_left/(cvar.speedon/100),20,255,0,0,255);
}
else
{
gEngfuncs.pfnFillRGBA(cvar.speedbar_x,cvar.speedbar_y,phase_ticks_left/(cvar.speedoff/100),20,255,50,0,255);
}
if(speed_ticks_left)
{
DrawHudString(cvar.speedbar_x,cvar.speedbar_y,clr->r,clr->g,clr->b, "speed: %d",speed_ticks_left );
}
else
{
DrawHudString(cvar.speedbar_x,cvar.speedbar_y-20,clr->r,clr->g,clr->b, "wait.. %d",phase_ticks_left );
}
}
}
}