void CHud :: Init( void ) { InitHUDMessages(); m_Ammo.Init(); m_Health.Init(); m_Geiger.Init(); m_Train.Init(); m_Battery.Init(); m_Flash.Init(); m_Message.Init(); m_Scoreboard.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); m_SayText.Init(); m_Menu.Init(); m_MOTD.Init(); MsgFunc_ResetHUD( 0, 0, NULL ); }
// This is called every time the DLL is loaded void CHud :: Init( void ) { HOOK_MESSAGE( Logo ); HOOK_MESSAGE( ResetHUD ); HOOK_MESSAGE( GameMode ); HOOK_MESSAGE( InitHUD ); HOOK_MESSAGE( ViewMode ); HOOK_MESSAGE( SetFOV ); HOOK_MESSAGE( Concuss ); HOOK_MESSAGE( Gametype ); // TFFree CommandMenu HOOK_COMMAND( "+commandmenu", OpenCommandMenu ); HOOK_COMMAND( "-commandmenu", CloseCommandMenu ); HOOK_COMMAND( "ForceCloseCommandMenu", ForceCloseCommandMenu ); HOOK_COMMAND( "special", InputPlayerSpecial ); HOOK_COMMAND( "togglebrowser", ToggleServerBrowser ); HOOK_COMMAND( "agrecord", Agrecord ); HOOK_COMMAND( "append", Append ); EngineClientCmd("alias zpecial \"append _zpecial\""); force_model::hook_commands(); steam_id::hook_messages(); HOOK_MESSAGE( ValClass ); HOOK_MESSAGE( TeamNames ); HOOK_MESSAGE( Feign ); HOOK_MESSAGE( Detpack ); HOOK_MESSAGE( MOTD ); HOOK_MESSAGE( BuildSt ); HOOK_MESSAGE( RandomPC ); HOOK_MESSAGE( ServerName ); HOOK_MESSAGE( ScoreInfo ); HOOK_MESSAGE( TeamScore ); HOOK_MESSAGE( TeamInfo ); HOOK_MESSAGE( Spectator ); HOOK_MESSAGE( AllowSpec ); HOOK_MESSAGE( SpecFade ); HOOK_MESSAGE( ResetFade ); // VGUI Menus HOOK_MESSAGE( VGUIMenu ); HOOK_MESSAGE( CheatCheck ); HOOK_MESSAGE( WhString ); HOOK_MESSAGE( SpikeCheck ); HOOK_MESSAGE( CRC32 ); HOOK_MESSAGE( PlaySound ); CVAR_CREATE( "hud_classautokill", "1", FCVAR_ARCHIVE | FCVAR_USERINFO ); // controls whether or not to suicide immediately on TF class switch CVAR_CREATE( "hud_takesshots", "0", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round // Implemented server-side, needs to be registered client-side. CVAR_CREATE( "cl_autowepswitch", "1", FCVAR_ARCHIVE | FCVAR_USERINFO | FCVAR_CLIENTDLL ); // This has to be called cl_righthand (there's some stuff compiled into the engine), // and also from my tests it has to be 0 for normal and 1 for left-handed. cl_righthand = CVAR_CREATE( "cl_righthand", "0", FCVAR_ARCHIVE ); m_iLogo = 0; m_iFOV = 0; CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 ); default_fov = CVAR_CREATE( "default_fov", "90", 0 ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); m_pCvarDrawDeathNoticesAlways = CVAR_CREATE( "cl_draw_deathnotices_always", "0", FCVAR_ARCHIVE ); m_pCvarColor = CVAR_CREATE( "hud_color", "", FCVAR_ARCHIVE ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); m_pSpriteList = NULL; // Clear any old HUD list if ( m_pHudList ) { HUDLIST *pList; while ( m_pHudList ) { pList = m_pHudList; m_pHudList = m_pHudList->pNext; free( pList ); } m_pHudList = NULL; } // In case we get messages before the first update -- time will be valid m_flTime = 1.0; m_Ammo.Init(); m_Health.Init(); m_SayText.Init(); m_Spectator.Init(); m_Geiger.Init(); m_Train.Init(); m_Battery.Init(); m_Flash.Init(); m_Message.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); m_Countdown.Init(); m_Crosshairs.Init(); m_CTF.Init(); m_Debug.Init(); m_Location.Init(); m_NextMap.Init(); m_PlayerId.Init(); m_Scores.Init(); m_Settings.Init(); m_Speedometer.Init(); m_SuddenDeath.Init(); m_Timeout.Init(); m_Timer.Init(); m_Vote.Init(); m_Watermark.Init(); GetClientVoiceMgr()->Init(&g_VoiceStatusHelper, (vgui::Panel**)&gViewPort); m_Menu.Init(); ServersInit(); MsgFunc_ResetHUD(0, 0, NULL ); }
// This is called every time the DLL is loaded void CHud :: Init( void ) { HOOK_MESSAGE( Logo ); HOOK_MESSAGE( ResetHUD ); HOOK_MESSAGE( GameMode ); HOOK_MESSAGE( InitHUD ); HOOK_MESSAGE( SetFOV ); HOOK_MESSAGE( Concuss ); HOOK_MESSAGE( ScoreInfo ); HOOK_MESSAGE( TeamScore ); HOOK_MESSAGE( TeamInfo ); // Discwar HOOK_MESSAGE( StartRnd ); HOOK_MESSAGE( EndRnd ); HOOK_MESSAGE( Powerup ); HOOK_MESSAGE( Reward ); HOOK_MESSAGE( Frozen ); HOOK_COMMAND( "+commandmenu", OpenCommandMenu ); HOOK_COMMAND( "-commandmenu", CloseCommandMenu ); m_iLogo = 0; m_iFOV = 0; CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 ); default_fov = CVAR_CREATE( "default_fov", "90", 0 ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); m_pSpriteList = NULL; // Clear any old HUD list if ( m_pHudList ) { HUDLIST *pList; while ( m_pHudList ) { pList = m_pHudList; m_pHudList = m_pHudList->pNext; free( pList ); } m_pHudList = NULL; } // In case we get messages before the first update -- time will be valid m_flTime = 1.0; m_Ammo.Init(); m_Health.Init(); m_Geiger.Init(); m_Train.Init(); m_Battery.Init(); m_Flash.Init(); m_Message.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); m_SayText.Init(); m_Menu.Init(); GetClientVoiceMgr()->Init(&g_VoiceStatusHelper, (vgui::Panel**)&gViewPort); ServersInit(); MsgFunc_ResetHUD(0, 0, NULL ); }
// This is called every time the DLL is loaded void CHud :: Init( void ) { #ifdef ENGINE_DEBUG CONPRINT("## CHud::Init\n"); #endif HOOK_MESSAGE( Logo ); HOOK_MESSAGE( ResetHUD ); HOOK_MESSAGE( GameMode ); HOOK_MESSAGE( InitHUD ); HOOK_MESSAGE( ViewMode ); HOOK_MESSAGE( SetFOV ); HOOK_MESSAGE( Concuss ); HOOK_MESSAGE( HUDColor ); //LRC HOOK_MESSAGE( SetFog ); //LRC HOOK_MESSAGE( KeyedDLight ); //LRC HOOK_MESSAGE( AddShine ); //LRC HOOK_MESSAGE( SetSky ); //LRC // TFFree CommandMenu HOOK_COMMAND( "+commandmenu", OpenCommandMenu ); HOOK_COMMAND( "-commandmenu", CloseCommandMenu ); HOOK_COMMAND( "ForceCloseCommandMenu", ForceCloseCommandMenu ); HOOK_COMMAND( "special", InputPlayerSpecial ); HOOK_COMMAND( "togglebrowser", ToggleServerBrowser ); HOOK_MESSAGE( ValClass ); HOOK_MESSAGE( TeamNames ); HOOK_MESSAGE( Feign ); HOOK_MESSAGE( Detpack ); HOOK_MESSAGE( MOTD ); HOOK_MESSAGE( BuildSt ); HOOK_MESSAGE( RandomPC ); HOOK_MESSAGE( ServerName ); HOOK_MESSAGE( ScoreInfo ); HOOK_MESSAGE( TeamScore ); HOOK_MESSAGE( TeamInfo ); HOOK_MESSAGE( Spectator ); HOOK_MESSAGE( AllowSpec ); // VGUI Menus HOOK_MESSAGE( VGUIMenu ); CVAR_CREATE( "hud_classautokill", "1", FCVAR_ARCHIVE | FCVAR_USERINFO ); // controls whether or not to suicide immediately on TF class switch CVAR_CREATE( "hud_takesshots", "0", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round m_iLogo = 0; m_iFOV = 0; m_iHUDColor = 0x00FFA000; //255,160,0 -- LRC CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 ); default_fov = CVAR_CREATE( "default_fov", "90", 0 ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); m_pSpriteList = NULL; m_pShinySurface = NULL; //LRC // Clear any old HUD list if ( m_pHudList ) { HUDLIST *pList; while ( m_pHudList ) { pList = m_pHudList; m_pHudList = m_pHudList->pNext; free( pList ); } m_pHudList = NULL; } // In case we get messages before the first update -- time will be valid m_flTime = 1.0; m_Ammo.Init(); m_Health.Init(); m_SayText.Init(); m_Spectator.Init(); m_Geiger.Init(); m_Train.Init(); m_Battery.Init(); m_Flash.Init(); m_Message.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); m_Particle.Init(); // (LRC) -- 30/08/02 November235: Particles to Order m_Menu.Init(); MsgFunc_ResetHUD(0, 0, NULL ); }
// This is called every time the DLL is loaded void CHud :: Init( void ) { HOOK_MESSAGE( Logo ); HOOK_MESSAGE( ResetHUD ); HOOK_MESSAGE( GameMode ); HOOK_MESSAGE( InitHUD ); HOOK_MESSAGE( ViewMode ); HOOK_MESSAGE( SetFOV ); HOOK_MESSAGE( Concuss ); // TFFree CommandMenu HOOK_COMMAND( "+commandmenu", OpenCommandMenu ); HOOK_COMMAND( "-commandmenu", CloseCommandMenu ); HOOK_COMMAND( "ForceCloseCommandMenu", ForceCloseCommandMenu ); HOOK_COMMAND( "special", InputPlayerSpecial ); HOOK_COMMAND( "togglebrowser", ToggleServerBrowser ); HOOK_MESSAGE( ValClass ); HOOK_MESSAGE( TeamNames ); HOOK_MESSAGE( Feign ); HOOK_MESSAGE( Detpack ); HOOK_MESSAGE( MOTD ); HOOK_MESSAGE( BuildSt ); HOOK_MESSAGE( RandomPC ); HOOK_MESSAGE( ServerName ); HOOK_MESSAGE( ScoreInfo ); HOOK_MESSAGE( TeamScore ); HOOK_MESSAGE( TeamInfo ); HOOK_MESSAGE( Spectator ); HOOK_MESSAGE( AllowSpec ); HOOK_MESSAGE( SpecFade ); HOOK_MESSAGE( ResetFade ); // VGUI Menus HOOK_MESSAGE( VGUIMenu ); CVAR_CREATE( "hud_classautokill", "1", FCVAR_ARCHIVE | FCVAR_USERINFO ); // controls whether or not to suicide immediately on TF class switch CVAR_CREATE( "hud_takesshots", "0", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round m_iLogo = 0; m_iFOV = 0; CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 ); default_fov = CVAR_CREATE( "default_fov", "90", 0 ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); m_pSpriteList = NULL; // Clear any old HUD list if ( m_pHudList ) { HUDLIST *pList; while ( m_pHudList ) { pList = m_pHudList; m_pHudList = m_pHudList->pNext; free( pList ); } m_pHudList = NULL; } // In case we get messages before the first update -- time will be valid m_flTime = 1.0; m_Ammo.Init(); m_Health.Init(); m_SayText.Init(); m_Spectator.Init(); m_Geiger.Init(); m_Train.Init(); m_Battery.Init(); m_Flash.Init(); m_Message.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); GetClientVoiceMgr()->Init(&g_VoiceStatusHelper, (vgui::Panel**)&gViewPort); m_Menu.Init(); ServersInit(); CSoundEngine::GetInstance()->Init(); MsgFunc_ResetHUD(0, 0, NULL ); }
// This is called every time the DLL is loaded void CHud :: Init( void ) { HOOK_MESSAGE( ResetHUD ); HOOK_MESSAGE( InitHUD ); HOOK_MESSAGE( ViewMode ); HOOK_MESSAGE( SetFOV ); HOOK_COMMAND( "special", SpecialDummy); HOOK_COMMAND( "_special", SpecialDummy); //prevent abuse HOOK_MESSAGE( TeamNames ); HOOK_MESSAGE( MOTD ); HOOK_MESSAGE( ServerName ); HOOK_MESSAGE( ScoreInfo ); HOOK_MESSAGE( TeamScore ); HOOK_MESSAGE( TeamInfo ); CVAR_CREATE( "hud_classautokill", "1", FCVAR_ARCHIVE | FCVAR_USERINFO ); // controls whether or not to suicide immediately on TF class switch CVAR_CREATE( "hud_takesshots", "0", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round #ifdef DEBUG CVAR_CREATE( "hud_hideview", "0", FCVAR_ARCHIVE ); #endif m_iLogo = 0; m_iFOV = 0; // tankefugl: duck toggle g_bDuckToggled = false; // :tankefugl CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 ); default_fov = CVAR_CREATE( "default_fov", "90", 0 ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); CVAR_CREATE( "cl_showspeed", "0", 0); CVAR_CREATE( kvLabelMaps, "1", FCVAR_ARCHIVE); CVAR_CREATE( kvGammaRamp, "1", FCVAR_ARCHIVE); m_pSpriteList = NULL; // Clear any old HUD list if ( m_pHudList ) { HUDLIST *pList; while ( m_pHudList ) { pList = m_pHudList; m_pHudList = m_pHudList->pNext; free( pList ); } m_pHudList = NULL; } // In case we get messages before the first update -- time will be valid m_flTime = 1.0; m_Ammo.Init(); m_Health.Init(); m_Spectator.Init(); m_SayText.Init(); m_Geiger.Init(); m_Train.Init(); m_Battery.Init(); m_Flash.Init(); m_Message.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); m_Spectator.m_chatEnabled = (m_SayText.m_HUD_saytext->value!=0); GetClientVoiceMgr()->Init(&g_VoiceStatusHelper, (vgui::Panel**)&gViewPort); m_Menu.Init(); ServersInit(); MsgFunc_ResetHUD(0, 0, NULL ); }
// This is called every time the DLL is loaded void CHud :: Init( void ) { //BP ParticleEmitter HOOK_MESSAGE( Particles ); HOOK_MESSAGE( Grass ); HOOK_MESSAGE( HintBox ); //BP CommanderMenu // HOOK_MESSAGE( ResComPoint ); HOOK_MESSAGE( Logo ); HOOK_MESSAGE( ResetHUD ); HOOK_MESSAGE( GameMode ); HOOK_MESSAGE( InitHUD ); HOOK_MESSAGE( ViewMode ); HOOK_MESSAGE( SetFog ); //Ben HOOK_MESSAGE( Dead ); HOOK_MESSAGE( SetFOV ); HOOK_MESSAGE( Concuss ); // TFFree CommandMenu HOOK_COMMAND( "+commandmenu", OpenCommandMenu ); HOOK_COMMAND( "-commandmenu", CloseCommandMenu ); HOOK_COMMAND( "ForceCloseCommandMenu", ForceCloseCommandMenu ); HOOK_COMMAND( "special", InputPlayerSpecial ); HOOK_COMMAND( "togglebrowser", ToggleServerBrowser ); HOOK_MESSAGE( ValClass ); HOOK_MESSAGE( TeamNames ); HOOK_MESSAGE( MOTD ); HOOK_MESSAGE( ServerName ); HOOK_MESSAGE( ScoreInfo ); HOOK_MESSAGE( TeamScore ); HOOK_MESSAGE( TeamInfo ); HOOK_MESSAGE( Spectator ); HOOK_MESSAGE( AllowSpec ); // VGUI Menus HOOK_MESSAGE( VGUIMenu ); HOOK_MESSAGE( ResetScores ); HOOK_MESSAGE( FullScore ); // Ben Addition to Raiko Contrib - Melee Only HOOK_MESSAGE( MeleeOnly ); // Ben End // Raiko Contrib - Stationary Reload HOOK_MESSAGE(SReload); // Raiko End CVAR_CREATE( "hud_takesshots", "0", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round m_iLogo = 0; m_iFOV = 0; CVAR_CREATE( "cl_msgs_captures", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); CVAR_CREATE( "cl_msgs_who_hit_me", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); CVAR_CREATE( "cl_msgs_who_i_hit", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); CVAR_CREATE( "cl_msgs_team_change", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); CVAR_CREATE( "cl_msgs_my_team_change", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); CVAR_CREATE( "cl_msgs_commands", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); CVAR_CREATE( "cl_msgs_round", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ) ; CVAR_CREATE( "cl_dynamicxhair", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); g_ShowFog = gEngfuncs.pfnRegisterVariable("cl_showfog", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); g_ParticleCount = gEngfuncs.pfnRegisterVariable("cl_particlecount", "100", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); g_ParticleDebug = gEngfuncs.pfnRegisterVariable("cl_particledebug", "0", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); g_ParticleSorts = gEngfuncs.pfnRegisterVariable("cl_particlesorts", "5", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); CVAR_CREATE( "cl_grassamount", "100", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); g_HintBoxLevel = gEngfuncs.pfnRegisterVariable("cl_hintboxlevel", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); g_ShowPoints = gEngfuncs.pfnRegisterVariable("cl_showpoints", "1", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); g_Text_ypos = gEngfuncs.pfnRegisterVariable("cl_text_ypos", "112", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); m_pSpriteList = NULL; // Clear any old HUD list if ( m_pHudList ) { HUDLIST *pList; while ( m_pHudList ) { pList = m_pHudList; m_pHudList = m_pHudList->pNext; free( pList ); } m_pHudList = NULL; } // In case we get messages before the first update -- time will be valid m_flTime = 1.0; //Ben m_Health.Init(); m_PredefinedMessage.Init(); m_Points.Init(); m_Clock.Init();//Baer m_ColourMessage.Init(); m_Crosshair.Init(); // m_CommanderMenu.Init(); // m_ArmLegShot.Init();//Myristate m_Ammo.Init(); m_SayText.Init(); m_Spectator.Init(); m_Geiger.Init(); m_Train.Init(); m_Message.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); GetClientVoiceMgr()->Init(&g_VoiceStatusHelper, (vgui::Panel**)&gViewPort); m_Menu.Init(); ServersInit(); MsgFunc_ResetHUD(0, 0, NULL ); }
// This is called every time the DLL is loaded void CHud :: Init( void ) { #ifdef ENGINE_DEBUG CONPRINT("## CHud::Init\n"); #endif HOOK_MESSAGE( Logo ); HOOK_MESSAGE( ResetHUD ); HOOK_MESSAGE( GameMode ); HOOK_MESSAGE( InitHUD ); HOOK_MESSAGE( ViewMode ); HOOK_MESSAGE( SetFOV ); HOOK_MESSAGE( Concuss ); HOOK_MESSAGE( HUDColor ); //LRC HOOK_MESSAGE( SetFog ); //LRC HOOK_MESSAGE( KeyedDLight ); //LRC HOOK_MESSAGE( AddShine ); //LRC HOOK_MESSAGE( Test ); //LRC HOOK_MESSAGE( SetSky ); //LRC HOOK_MESSAGE( CamData );//G-Cont. for new camera style HOOK_MESSAGE( RainData );//G-Cont. for rain control HOOK_MESSAGE( Inventory ); //AJH Inventory system HOOK_MESSAGE( ClampView ); //LRC 1.8 //KILLAR: MP3 if(gMP3.Initialize()) { HOOK_MESSAGE( PlayMP3 ); HOOK_COMMAND( "stopaudio", StopMP3 ); } // TFFree CommandMenu HOOK_COMMAND( "+commandmenu", OpenCommandMenu ); HOOK_COMMAND( "-commandmenu", CloseCommandMenu ); HOOK_COMMAND( "ForceCloseCommandMenu", ForceCloseCommandMenu ); HOOK_COMMAND( "special", InputPlayerSpecial ); HOOK_COMMAND( "togglebrowser", ToggleServerBrowser ); HOOK_MESSAGE( ValClass ); HOOK_MESSAGE( TeamNames ); HOOK_MESSAGE( Feign ); HOOK_MESSAGE( Detpack ); HOOK_MESSAGE( MOTD ); HOOK_MESSAGE( BuildSt ); HOOK_MESSAGE( RandomPC ); HOOK_MESSAGE( ServerName ); HOOK_MESSAGE( ScoreInfo ); HOOK_MESSAGE( TeamScore ); HOOK_MESSAGE( TeamInfo ); HOOK_MESSAGE( Spectator ); HOOK_MESSAGE( AllowSpec ); // VGUI Menus HOOK_MESSAGE( VGUIMenu ); CVAR_CREATE( "hud_classautokill", "1", FCVAR_ARCHIVE | FCVAR_USERINFO ); // controls whether or not to suicide immediately on TF class switch CVAR_CREATE( "hud_takesshots", "0", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round CVAR_CREATE("r_glow", "2", FCVAR_ARCHIVE ); CVAR_CREATE("r_glowstrength", "1", FCVAR_ARCHIVE ); CVAR_CREATE("r_glowblur", "6", FCVAR_ARCHIVE ); CVAR_CREATE("r_glowdark", "10", FCVAR_ARCHIVE ); viewEntityIndex = 0; // trigger_viewset stuff viewFlags = 0; m_iLogo = 0; m_iFOV = 0; numMirrors = 0; m_iHUDColor = 0x00FFA000; //255,160,0 -- LRC CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 ); default_fov = CVAR_CREATE( "default_fov", "90", 0 ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); RainInfo = gEngfuncs.pfnRegisterVariable( "cl_raininfo", "0", 0 ); m_pSpriteList = NULL; m_pShinySurface = NULL; //LRC // Clear any old HUD list if ( m_pHudList ) { HUDLIST *pList; while ( m_pHudList ) { pList = m_pHudList; m_pHudList = m_pHudList->pNext; free( pList ); } m_pHudList = NULL; } // In case we get messages before the first update -- time will be valid m_flTime = 1.0; m_Ammo.Init(); m_Health.Init(); m_SayText.Init(); m_Spectator.Init(); m_Geiger.Init(); m_Train.Init(); m_Battery.Init(); m_Flash.Init(); m_Message.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); GetClientVoiceMgr()->Init(&g_VoiceStatusHelper, (vgui::Panel**)&gViewPort); m_Particle.Init(); // (LRC) -- 30/08/02 November235: Particles to Order m_Lensflare.Init(); m_Menu.Init(); InitRain(); ServersInit(); MsgFunc_ResetHUD(0, 0, NULL ); }
// This is called every time the DLL is loaded void CHud :: Init( void ) { //BP ParticleEmitter HOOK_MESSAGE( Particles ); HOOK_MESSAGE( Grass ); HOOK_MESSAGE( Logo ); HOOK_MESSAGE( ResetHUD ); HOOK_MESSAGE( GameMode ); HOOK_MESSAGE( InitHUD ); HOOK_MESSAGE( ViewMode ); HOOK_MESSAGE( SetFOV ); HOOK_MESSAGE( Concuss ); HOOK_MESSAGE( SetFog ); //LRC HOOK_MESSAGE( AddShine ); //LRC HOOK_MESSAGE( Clcommand ); HOOK_MESSAGE( RainData );//G-Cont. for rain control HOOK_MESSAGE( SetSky ); //LRC HOOK_MESSAGE( AddRope ); //LRC HOOK_MESSAGE( SetBody );//change body for view weapon model HOOK_MESSAGE( SetSkin );//change skin for view weapon model HOOK_MESSAGE( PlayMP3 ); HOOK_COMMAND( "stopmusic", StopMP3 ); gMP3.Initialize(); // TFFree CommandMenu HOOK_COMMAND( "+commandmenu", OpenCommandMenu ); HOOK_COMMAND( "-commandmenu", CloseCommandMenu ); HOOK_COMMAND( "ForceCloseCommandMenu", ForceCloseCommandMenu ); HOOK_COMMAND( "special", InputPlayerSpecial ); HOOK_COMMAND( "togglebrowser", ToggleServerBrowser ); HOOK_MESSAGE( ValClass ); HOOK_MESSAGE( TeamNames ); HOOK_MESSAGE( Feign ); HOOK_MESSAGE( Detpack ); HOOK_MESSAGE( MOTD ); HOOK_MESSAGE( BuildSt ); HOOK_MESSAGE( RandomPC ); HOOK_MESSAGE( ServerName ); HOOK_MESSAGE( ScoreInfo ); HOOK_MESSAGE( TeamScore ); HOOK_MESSAGE( TeamInfo ); HOOK_MESSAGE( Spectator ); HOOK_MESSAGE( AllowSpec ); // VGUI Menus HOOK_MESSAGE( VGUIMenu ); // FGW HOOK_MESSAGE( BumpLight ); CVAR_CREATE( "hud_classautokill", "1", FCVAR_ARCHIVE | FCVAR_USERINFO ); // controls whether or not to suicide immediately on TF class switch CVAR_CREATE( "hud_takesshots", "0", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round CVAR_CREATE( "hud_red","255", FCVAR_ARCHIVE ); CVAR_CREATE( "hud_green", "160", FCVAR_ARCHIVE ); CVAR_CREATE( "hud_blue", "0", FCVAR_ARCHIVE ); //newc CVAR_CREATE( "hud_newcross", "1", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round CVAR_CREATE( "hud_newcross_size", "2", FCVAR_ARCHIVE ); CVAR_CREATE( "zz_framerate", "10", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round CVAR_CREATE( "zz_fadespeed", "10", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round CVAR_CREATE( "zz_life", "0.1", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round CVAR_CREATE( "zz_alpha", "1", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round CVAR_CREATE("r_shadows", "1", FCVAR_ARCHIVE );//on default CVAR_CREATE("r_paintball", "0", FCVAR_ARCHIVE ); CVAR_CREATE( "gl_texturedetail", "2", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round CVAR_CREATE( "cl_drawprops", "1", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round CVAR_CREATE( "cl_removeclienteffects", "1", FCVAR_ARCHIVE ); // controls whether or not to automatically take screenshots at the end of a round g_ParticleCount = gEngfuncs.pfnRegisterVariable("cl_particlecount", "100", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); g_ParticleDebug = gEngfuncs.pfnRegisterVariable("cl_particledebug", "0", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); g_ParticleSorts = gEngfuncs.pfnRegisterVariable("cl_particlesorts", "3", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); CVAR_CREATE( "cl_grassamount", "100", FCVAR_CLIENTDLL | FCVAR_ARCHIVE ); ProcessWeather = gEngfuncs.pfnRegisterVariable( "cl_weather", "1", 0 ); //sp m_iLogo = 0; m_iFOV = 0; CVAR_CREATE( "zoom_sensitivity_ratio", "1.2", 0 ); default_fov = CVAR_CREATE( "default_fov", "90", 0 ); m_pCvarStealMouse = CVAR_CREATE( "hud_capturemouse", "1", FCVAR_ARCHIVE ); m_pCvarDraw = CVAR_CREATE( "hud_draw", "1", FCVAR_ARCHIVE ); cl_lw = gEngfuncs.pfnGetCvarPointer( "cl_lw" ); RainInfo = gEngfuncs.pfnRegisterVariable( "cl_raininfo", "0", 0 ); m_pSpriteList = NULL; m_pShinySurface = NULL; //LRC gEngfuncs.Con_Printf( "Resetting iPlayerBodyTime\n"); // Clear any old HUD list if ( m_pHudList ) { HUDLIST *pList; while ( m_pHudList ) { pList = m_pHudList; m_pHudList = m_pHudList->pNext; free( pList ); } m_pHudList = NULL; } // In case we get messages before the first update -- time will be valid m_flTime = 1.0; m_Ammo.Init(); m_Health.Init(); m_SayText.Init(); m_Spectator.Init(); m_Geiger.Init(); m_Train.Init(); m_Battery.Init(); m_Flash.Init(); m_Message.Init(); m_StatusBar.Init(); m_DeathNotice.Init(); m_AmmoSecondary.Init(); m_TextMessage.Init(); m_StatusIcons.Init(); GetClientVoiceMgr()->Init(&g_VoiceStatusHelper, (vgui::Panel**)&gViewPort); m_Menu.Init(); // advanced NVG m_NVG.Init(); m_Cine.Init(); m_Ricardo.Init(); // advanced NVG m_HudRadar.Init(); m_LuzBar.Init(); m_FlashBar.Init(); InitRain(); m_Money.Init(); ServersInit(); //ryokeen // gRopeRender.StartRenderer(); m_Tbutton.Init(); MsgFunc_ResetHUD(0, 0, NULL ); CVAR_CREATE("xp_points", "0", FCVAR_ARCHIVE );//WHY HERE ??? // CVAR_CREATE("cl_tips", "0", FCVAR_ARCHIVE );//WHY HERE ??? // CVAR_CREATE("tip", "0", FCVAR_ARCHIVE );//WHY HERE ??? CVAR_CREATE("cl_ragdoll", "0", FCVAR_ARCHIVE );//WHY HERE ??? CVAR_CREATE("commentary", "0", FCVAR_ARCHIVE );//WHY HERE ??? CVAR_CREATE("dev_override_prethink", "0", FCVAR_ARCHIVE );//WHY HERE ??? CVAR_CREATE("score_killed", "0", FCVAR_ARCHIVE );//WHY HERE ??? CVAR_CREATE("score_head", "0", FCVAR_ARCHIVE );//WHY HERE ??? CVAR_CREATE("score_knifed", "0", FCVAR_ARCHIVE );//WHY HERE ??? CVAR_CREATE( "slowmo", "0", FCVAR_ARCHIVE );//send messages bwetween cldll and dll CVAR_CREATE( "r_particles", "1", FCVAR_ARCHIVE );//particles CVAR_CREATE("r_glow", "0", FCVAR_ARCHIVE ); //CVAR_CREATE("r_glowmode", "0", FCVAR_ARCHIVE ); //AJH this is now redundant CVAR_CREATE("r_glowstrength", "1", FCVAR_ARCHIVE ); CVAR_CREATE("r_glowblur", "4", FCVAR_ARCHIVE ); CVAR_CREATE("r_glowdark", "2", FCVAR_ARCHIVE ); CVAR_CREATE("r_bluralpha", "1", FCVAR_ARCHIVE ); CVAR_CREATE("r_blur", "0", FCVAR_ARCHIVE ); viewEntityIndex = 0; // trigger_viewset stuff viewFlags = 0; // Mazor - used for view rolling when strafing cl_rollangle = gEngfuncs.pfnRegisterVariable ( "cl_rollangle", "0.65", FCVAR_CLIENTDLL|FCVAR_ARCHIVE ); cl_rollspeed = gEngfuncs.pfnRegisterVariable ( "cl_rollspeed", "300", FCVAR_CLIENTDLL|FCVAR_ARCHIVE ); //new cvars cl_shelllife = gEngfuncs.pfnRegisterVariable ( "cl_shelllife", "2.5", FCVAR_ARCHIVE ); cl_pulso = gEngfuncs.pfnRegisterVariable ( "cl_pulso", "1", FCVAR_ARCHIVE ); cl_wallpuff = gEngfuncs.pfnRegisterVariable ( "cl_wallpuff", "1", FCVAR_ARCHIVE ); cl_expdetail = gEngfuncs.pfnRegisterVariable ( "cl_expdetail", "1", FCVAR_ARCHIVE ); cl_showplayer = gEngfuncs.pfnRegisterVariable ( "cl_showplayer", "0", FCVAR_ARCHIVE ); cl_detailsparks = gEngfuncs.pfnRegisterVariable ( "cl_detailsparks", "0", FCVAR_ARCHIVE ); cl_playmusic = gEngfuncs.pfnRegisterVariable ( "cl_playmusic", "0", FCVAR_USERINFO|FCVAR_ARCHIVE ); cl_detailfire = gEngfuncs.pfnRegisterVariable ( "cl_detailfire", "0", FCVAR_ARCHIVE ); cl_detailmuzz = gEngfuncs.pfnRegisterVariable ( "cl_detailmuzz", "0", FCVAR_ARCHIVE ); cl_autoswitch = gEngfuncs.pfnRegisterVariable ( "cl_autoswitch", "1", FCVAR_USERINFO|FCVAR_ARCHIVE ); cl_showparachute = gEngfuncs.pfnRegisterVariable ( "cl_showparachute", "0", FCVAR_ARCHIVE ); cl_fog = gEngfuncs.pfnRegisterVariable ( "cl_fog", "0", FCVAR_ARCHIVE ); // cl_overview = gEngfuncs.pfnRegisterVariable ( "cl_overview", "0", FCVAR_ARCHIVE ); cl_showheadcrab = gEngfuncs.pfnRegisterVariable ( "cl_showheadcrab", "0", FCVAR_ARCHIVE ); forward = gEngfuncs.pfnRegisterVariable ( "forward", "12", FCVAR_ARCHIVE ); cl_gunsmoke = gEngfuncs.pfnRegisterVariable ( "cl_gunsmoke", "1", FCVAR_ARCHIVE ); cl_nvghires = gEngfuncs.pfnRegisterVariable ( "cl_nvghires", "1", FCVAR_ARCHIVE ); cl_oldmodels = gEngfuncs.pfnRegisterVariable ( "cl_oldmodels", "0", FCVAR_ARCHIVE ); cl_luzbar_x = gEngfuncs.pfnRegisterVariable ( "cl_luzbar_x", "268", FCVAR_ARCHIVE ); cl_luzbar_y = gEngfuncs.pfnRegisterVariable ( "cl_luzbar_y", "455", FCVAR_ARCHIVE ); cl_hud_x = gEngfuncs.pfnRegisterVariable ( "cl_hud_x", "0", FCVAR_ARCHIVE ); cl_hud_y = gEngfuncs.pfnRegisterVariable ( "cl_hud_y", "2", FCVAR_ARCHIVE ); /* cl_list_x = gEngfuncs.pfnRegisterVariable ( "cl_list_x", "0", FCVAR_ARCHIVE ); cl_list_y = gEngfuncs.pfnRegisterVariable ( "cl_list_y", "0", FCVAR_ARCHIVE ); cl_bucket_x = gEngfuncs.pfnRegisterVariable ( "cl_bucket_x", "0", FCVAR_ARCHIVE ); cl_bucket_y = gEngfuncs.pfnRegisterVariable ( "cl_bucket_y", "0", FCVAR_ARCHIVE ); */ showtime = gEngfuncs.pfnRegisterVariable ( "showtime", "0", FCVAR_ARCHIVE ); value_1 = gEngfuncs.pfnRegisterVariable ( "value_1", "0", FCVAR_ARCHIVE ); value_2 = gEngfuncs.pfnRegisterVariable ( "value_2", "0", FCVAR_ARCHIVE ); value_3 = gEngfuncs.pfnRegisterVariable ( "value_3", "0", FCVAR_ARCHIVE ); dd_1 = gEngfuncs.pfnRegisterVariable ( "dd_1", "5", FCVAR_ARCHIVE ); dd_2 = gEngfuncs.pfnRegisterVariable ( "dd_2", "5", FCVAR_ARCHIVE ); cl_crosshair_ontarget = gEngfuncs.pfnRegisterVariable ( "cl_crosshair_ontarget", "0", FCVAR_ARCHIVE ); cl_autohelp = gEngfuncs.pfnRegisterVariable ( "cl_autohelp", "1", FCVAR_ARCHIVE ); neartalk = gEngfuncs.pfnRegisterVariable ( "neartalk", "0", FCVAR_ARCHIVE ); neardoor = gEngfuncs.pfnRegisterVariable ( "neardoor", "0", FCVAR_ARCHIVE ); nearweapon = gEngfuncs.pfnRegisterVariable ( "nearweapon", "0", FCVAR_ARCHIVE ); nearbutton = gEngfuncs.pfnRegisterVariable ( "nearbutton", "0", FCVAR_ARCHIVE ); game_tr_completed = gEngfuncs.pfnRegisterVariable ( "game_tr_completed", "0", FCVAR_ARCHIVE ); game_all_completed = gEngfuncs.pfnRegisterVariable ( "game_all_completed", "0", FCVAR_ARCHIVE ); }