您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetClientVoiceMgr函数代码示例

51自学网 2021-06-01 21:05:08
  C++
这篇教程C++ GetClientVoiceMgr函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GetClientVoiceMgr函数的典型用法代码示例。如果您正苦于以下问题:C++ GetClientVoiceMgr函数的具体用法?C++ GetClientVoiceMgr怎么用?C++ GetClientVoiceMgr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GetClientVoiceMgr函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: HUD_CreateEntities

/*=========================HUD_CreateEntities	Gives us a chance to add additional entities to the render this frame=========================*/void EXPORT HUD_CreateEntities( void ){	// e.g., create a persistent cl_entity_t somewhere.	// Load an appropriate model into it ( gEngfuncs.CL_LoadModel )	// Call gEngfuncs.CL_CreateVisibleEntity to add it to the visedicts list/*#if defined( TEST_IT )	MoveModel();#endif#if defined( TRACE_TEST )	TraceModel();#endif*//*	Particles();*//*	TempEnts();*/	// Add in any game specific objects	Game_AddObjects();	GetClientVoiceMgr()->CreateEntities();}
开发者ID:6779660,项目名称:halflife,代码行数:32,


示例2: HUD_Frame

void EXPORT HUD_Frame( double time ){    IN_Commands();    ServersThink( time );    GetClientVoiceMgr()->Frame(time);}
开发者ID:ChunHungLiu,项目名称:halflife,代码行数:8,


示例3: HUD_Frame

void CL_DLLEXPORT HUD_Frame( double time ){	gEngfuncs.VGui_ViewportPaintBackground(HUD_GetRect());	ServersThink( time );	GetClientVoiceMgr()->Frame(time);}
开发者ID:Hammermaps-DEV,项目名称:SOHL-V1.0-Refresh,代码行数:8,


示例4: HUD_Frame

void DLLEXPORT HUD_Frame( double time ){	ServersThink( time );#ifndef NO_VGUI	GetClientVoiceMgr()->Frame(time);#endif}
开发者ID:HoLyCoWzOrZ,项目名称:sing-engine,代码行数:8,


示例5: HUD_Frame

void CL_DLLEXPORT HUD_Frame( double time ){//	RecClHudFrame(time);	ServersThink( time );	GetClientVoiceMgr()->Frame(time);}
开发者ID:Chuvi-w,项目名称:CSSDK,代码行数:8,


示例6: GetClientVoiceMgr

bool ScorePanel::SetSquelchMode(bool inMode){	bool theSuccess = false;	if(inMode && !GetClientVoiceMgr()->IsInSquelchMode())	{		GetClientVoiceMgr()->StartSquelchMode();		m_HitTestPanel.setVisible(false);		theSuccess = true;	}	else if(!inMode && GetClientVoiceMgr()->IsInSquelchMode())	{		GetClientVoiceMgr()->StopSquelchMode();		theSuccess = true;	}	return theSuccess;}
开发者ID:Arkshine,项目名称:NS,代码行数:18,


示例7: IN_ScoreUp

void IN_ScoreUp(void){    KeyUp(&in_score);    if ( gViewPortInterface )    {        gViewPortInterface->ShowPanel( PANEL_SCOREBOARD, false );        GetClientVoiceMgr()->StopSquelchMode();    }}
开发者ID:xsopher,项目名称:VinHax,代码行数:9,


示例8: IN_ScoreUp

void IN_ScoreUp( const CCommand &args ){	KeyUp( &in_score, args[1] );	if ( gViewPortInterface )	{		gViewPortInterface->ShowPanel( PANEL_SCOREBOARD, false );		GetClientVoiceMgr()->StopSquelchMode();	}}
开发者ID:jimbomcb,项目名称:BirdPoop-Src,代码行数:9,


示例9: HUD_CreateEntities

/*=========================HUD_CreateEntities	Gives us a chance to add additional entities to the render this frame=========================*/void DLLEXPORT HUD_CreateEntities( void ){	// e.g., create a persistent cl_entity_t somewhere.	// Load an appropriate model into it ( gEngfuncs.CL_LoadModel )	// Call gEngfuncs.CL_CreateVisibleEntity to add it to the visedicts list	// Add in any game specific objects	Game_AddObjects();	GetClientVoiceMgr()->CreateEntities();}
开发者ID:NoFreeWill,项目名称:MultiplayerSource,代码行数:18,


示例10: GetClientModeNormal

void CTFModeManager::Init(){	g_pClientMode = GetClientModeNormal();		PanelMetaClassMgr()->LoadMetaClassDefinitionFile( SCREEN_FILE );	// Load the objects.txt file.	LoadObjectInfos( ::filesystem );	GetClientVoiceMgr()->SetHeadLabelOffset( 40 );}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:11,


示例11: ACTIVE_SPLITSCREEN_PLAYER_GUARD

void CSDKModeManager::Init(){    for( int i = 0; i < MAX_SPLITSCREEN_PLAYERS; ++i )    {        ACTIVE_SPLITSCREEN_PLAYER_GUARD( i );        g_pClientMode[ i ] = GetClientModeNormal();    }    PanelMetaClassMgr()->LoadMetaClassDefinitionFile( SCREEN_FILE );    GetClientVoiceMgr()->SetHeadLabelOffset( 40 );}
开发者ID:gamenew09,项目名称:SourceSDK2010,代码行数:12,


示例12: ShouldDraw

bool CHudVoiceSelfStatus::ShouldDraw(){	C_BasePlayer *player = C_BasePlayer::GetLocalPlayer();	if ( !player )		return false;	if ( GetClientVoiceMgr()->IsLocalPlayerSpeaking( player->GetSplitScreenPlayerSlot() ) == false )		return false;	return CHudElement::ShouldDraw();	}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:12,


示例13: HUD_CreateEntities

/*=========================HUD_CreateEntities	Gives us a chance to add additional entities to the render this frame=========================*/void DLLEXPORT HUD_CreateEntities( void ){#if defined( BEAM_TEST )	Beams();#endif	Bench_AddObjects();	// Add in any game specific objects	Game_AddObjects();	GetClientVoiceMgr()->CreateEntities();}
开发者ID:oskarlh,项目名称:HLEnhanced,代码行数:20,


示例14: GetClientVoiceMgr

//-----------------------------------------------------------------------------// Purpose: Called when shared data gets changed, allows dll to modify data// Input  : bActive - //-----------------------------------------------------------------------------void CHLClient::HudUpdate( bool bActive ){	float frametime = gpGlobals->frametime;	GetClientVoiceMgr()->Frame( frametime );	gHUD.UpdateHud( bActive );	IGameSystem::UpdateAllSystems( frametime );	// I don't think this is necessary any longer, but I will leave it until	// I can check into this further.	C_BaseTempEntity::CheckDynamicTempEnts();}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:18,


示例15: cursorMoved

void ScorePanel::cursorMoved(int x, int y, Panel *panel){	if (GetClientVoiceMgr()->IsInSquelchMode())	{		// look for which cell the mouse is currently over		for (int i = 0; i < NUM_ROWS; i++)		{			int row, col;			if (m_PlayerGrids[i].getCellAtPoint(x, y, row, col))			{				MouseOverCell(i, col);				return;			}		}	}}
开发者ID:Arkshine,项目名称:NS,代码行数:16,


示例16: GetBounds

void CHudVoiceSelfStatus::Paint(){   if( !m_pVoiceIcon )		return;		int x, y, w, h;	GetBounds( x, y, w, h );	C_BasePlayer *player = C_BasePlayer::GetLocalPlayer();	if ( player &&		GetClientVoiceMgr()->IsLocalPlayerSpeakingAboveThreshold( player->GetSplitScreenPlayerSlot() ) )	{		m_clrIcon[3] = 255;	}	else	{		// NOTE: Merge issue. This number should either be 0 or 255, dunno!		m_clrIcon[3] = 0;	}	m_pVoiceIcon->DrawSelf( 0, 0, w, h, m_clrIcon );}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:22,


示例17: getApp

void ScorePanel::FillGrid(){	CSchemeManager *pSchemes = gViewPort->GetSchemeManager();	SchemeHandle_t hScheme = pSchemes->getSchemeHandle("Scoreboard Text");	SchemeHandle_t hTitleScheme = pSchemes->getSchemeHandle("Scoreboard Title Text");	SchemeHandle_t hSmallScheme = pSchemes->getSchemeHandle("Scoreboard Small Text");	SchemeHandle_t hTinyScheme = pSchemes->getSchemeHandle("Scoreboard Tiny Text");	Font *sfont = pSchemes->getFont(hScheme);	Font *tfont = pSchemes->getFont(hTitleScheme);	Font *smallfont = pSchemes->getFont(hSmallScheme);	Font *tinyfont = pSchemes->getFont(hTinyScheme);	// update highlight position	int x, y;	getApp()->getCursorPos(x, y);	cursorMoved(x, y, this);		// remove highlight row if we're not in squelch mode	if (!GetClientVoiceMgr()->IsInSquelchMode())	{		m_iHighlightRow = -1;	}		bool bNextRowIsGap = false;		for(int row=0; row < NUM_ROWS; row++)	{		CGrid *pGridRow = &m_PlayerGrids[row];		pGridRow->SetRowUnderline(0, false, 0, 0, 0, 0, 0);				if(row >= m_iRows)		{			for(int col=0; col < NUM_COLUMNS; col++)				m_PlayerEntries[col][row].setVisible(false);						continue;		}				bool bRowIsGap = false;		if (bNextRowIsGap)		{			bNextRowIsGap = false;			bRowIsGap = true;		}				// Get the player's data		int theSortedRow = m_iSortedRows[row];		hud_player_info_t* pl_info = &g_PlayerInfoList[theSortedRow];		extra_player_info_t* theExtraPlayerInfo = &g_PlayerExtraInfo[theSortedRow];		int thePlayerClass = theExtraPlayerInfo->playerclass;		short theTeamNumber = theExtraPlayerInfo->teamnumber;		string theCustomIcon = (string)theExtraPlayerInfo->customicon;// puzl: 0001073		short thePlayerAuthentication = theExtraPlayerInfo->auth;		bool thePlayerIsDead = false;		switch( thePlayerClass )		{		case PLAYERCLASS_DEAD_MARINE:		case PLAYERCLASS_DEAD_ALIEN:		case PLAYERCLASS_REINFORCING:			thePlayerIsDead = true;			break;		}		// Code to test DEBUG#if 0		#ifdef DEBUG		extern int gGlobalDebugAuth;		thePlayerAuthentication = 1;		thePlayerAuthentication <<= gGlobalDebugAuth;		#endif#endif		team_info_t* team_info = &g_TeamInfo[m_iSortedRows[row]];		int theColorIndex = theTeamNumber % iNumberOfTeamColors;        int theLocalPlayerTeam = 0;        if(gEngfuncs.GetLocalPlayer())        {            theLocalPlayerTeam = gEngfuncs.GetLocalPlayer()->curstate.team;        }				for(int col=0; col < NUM_COLUMNS; col++)		{			CLabelHeader *pLabel = &m_PlayerEntries[col][row];			pLabel->setVisible(true);			pLabel->setText2("");			pLabel->setImage(NULL);			pLabel->setFont(sfont);			pLabel->setTextOffset(0, 0);						int rowheight = 13;			if (ScreenHeight() > 480)			{				rowheight = YRES(rowheight);			}			else			{//.........这里部分代码省略.........
开发者ID:Arkshine,项目名称:NS,代码行数:101,


示例18: Init

// This is called every time the DLL is loadedvoid 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 );}
开发者ID:NoFreeWill,项目名称:MultiplayerSource,代码行数:72,


示例19: InitCRTMemDebug

//.........这里部分代码省略.........		)	{		return false;	}	g_pMaterialSystemHardwareConfig = materials->GetHardwareConfig( MATERIALSYSTEM_HARDWARECONFIG_INTERFACE_VERSION, NULL );	if( !g_pMaterialSystemHardwareConfig )	{		return false;	}	SetScreenSize();	// Hook up the gaussian random number generator	s_GaussianRandomStream.AttachToStream( random );	// Initialize the console variables.	ConCommandBaseMgr::OneTimeInit(&g_ConVarAccessor);	if(!Initializer::InitializeAllObjects())		return false;	if(!g_ParticleMgr.Init(8192, materials))		return false;	// load used game events  	gameeventmanager->LoadEventsFromFile("resource/gameevents.res");	if(!VGui_Startup( appSystemFactory ))		return false;	g_pMatSystemSurface = (IMatSystemSurface*)vgui::surface()->QueryInterface( MAT_SYSTEM_SURFACE_INTERFACE_VERSION ); 	if (!g_pMatSystemSurface)		return false;	// Add the client systems.			// Client Leaf System has to be initialized first, since DetailObjectSystem uses it	IGameSystem::Add( GameStringSystem() );	IGameSystem::Add( ClientLeafSystem() );	IGameSystem::Add( DetailObjectSystem() );	IGameSystem::Add( ViewportClientSystem() );	IGameSystem::Add( ClientEffectPrecacheSystem() );	IGameSystem::Add( g_pClientShadowMgr );	IGameSystem::Add( ClientThinkList() );	IGameSystem::Add( ClientSoundscapeSystem() );#if defined( CLIENT_DLL ) && defined( COPY_CHECK_STRESSTEST )	IGameSystem::Add( GetPredictionCopyTester() );#endif	modemanager->Init( );	gHUD.Init();	g_pClientMode->Init();	if( !IGameSystem::InitAllSystems() )		return false;	g_pClientMode->Enable();	view->Init();	vieweffects->Init();	C_BaseTempEntity::PrecacheTempEnts();	input->Init_All();	VGui_CreateGlobalPanels();	InitSmokeFogOverlay();	C_TerrainMod_Init();	// Register user messages..	CUserMessageRegister::RegisterAll();	ClientVoiceMgr_Init();	// Embed voice status icons inside chat element	{		CHudChat *chatElement = GET_HUDELEMENT( CHudChat );		vgui::VPANEL parent = enginevgui->GetPanel( PANEL_CLIENTDLL );		if ( chatElement )		{			parent = chatElement->GetVoiceArea()->GetVPanel();		}				GetClientVoiceMgr()->Init( &g_VoiceStatusHelper, parent );	}	if ( !PhysicsDLLInit( physicsFactory ) )		return false;	g_pGameSaveRestoreBlockSet->AddBlockHandler( GetEntitiySaveRestoreBlockHandler() );	g_pGameSaveRestoreBlockSet->AddBlockHandler( GetPhysSaveRestoreBlockHandler() );	return true;}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:101,


示例20: getApp

void ScorePanel::FillGrid(){	CSchemeManager *pSchemes = gViewPort->GetSchemeManager();	SchemeHandle_t hScheme = pSchemes->getSchemeHandle("Scoreboard Text");	SchemeHandle_t hTitleScheme = pSchemes->getSchemeHandle("Scoreboard Title Text");	SchemeHandle_t hSmallScheme = pSchemes->getSchemeHandle("Scoreboard Small Text");	Font *sfont = pSchemes->getFont(hScheme);	Font *tfont = pSchemes->getFont(hTitleScheme);	/* Font *smallfont = */	pSchemes->getFont(hSmallScheme);	int i = 0;	// update highlight position	int x, y;	getApp()->getCursorPos(x, y);	cursorMoved(x, y, this);	// remove highlight row if we're not in squelch mode	if (!GetClientVoiceMgr()->IsInSquelchMode())	{		m_iHighlightRow = -1;	}	for(int row=0; row < NUM_ROWS; row++)	{		CGrid *pGridRow = &m_PlayerGrids[row];		pGridRow->SetRowUnderline(0, false, 0, 0, 0, 0, 0);		if(row >= m_iRows)		{			for(int col=0; col < NUM_COLUMNS; col++)				m_PlayerEntries[col][row].setVisible(false);					continue;		}		for(int col=0; col < NUM_COLUMNS; col++)		{			CLabelHeader *pLabel = &m_PlayerEntries[col][row];			pLabel->setVisible(true);			pLabel->setText2("");			pLabel->setImage(NULL);			pLabel->setFont(sfont);			pLabel->setTextOffset(0, 0);						int rowheight = 13;			if (ScreenHeight > 480)			{				rowheight = YRES(rowheight);			}			else			{				// more tweaking, make sure icons fit at low res				rowheight = 15;			}			pLabel->setSize(pLabel->getWide(), rowheight);			pLabel->setBgColor(0, 0, 0, 255);						char sz[128];			hud_player_info_t *pl_info = NULL;			team_info_t *team_info = NULL;			if (m_iIsATeam[row] == TEAM_SPECTATORS)			{				pLabel->setText(" ");				continue;			}			else if ( m_iIsATeam[row] == TEAM_YES )			{				// Get the team's data				team_info = &g_TeamInfo[ m_iSortedRows[row] ];				// team color text for team names				pLabel->setFgColor(	iTeamColors[team_info->teamnumber % 5][0],									iTeamColors[team_info->teamnumber % 5][1],									iTeamColors[team_info->teamnumber % 5][2],									0 );				// different height for team header rows				rowheight = 20;				if (ScreenHeight >= 480)				{					rowheight = YRES(rowheight);				}				pLabel->setSize(pLabel->getWide(), rowheight);				pLabel->setFont(tfont);				pGridRow->SetRowUnderline(	0,											true,											YRES(3),											iTeamColors[team_info->teamnumber % 5][0],											iTeamColors[team_info->teamnumber % 5][1],											iTeamColors[team_info->teamnumber % 5][2],											0 );			}			else if ( m_iIsATeam[row] == TEAM_SPECTATORS )			{				// grey text for spectators//.........这里部分代码省略.........
开发者ID:Skumek,项目名称:hlsdk,代码行数:101,


示例21: HUD_Frame

void DLLEXPORT HUD_Frame( double time ){	ServersThink( time );	GetClientVoiceMgr()->Frame(time);}
开发者ID:JoelTroch,项目名称:am_src_30jan2011,代码行数:6,


示例22: HUD_VoiceStatus

void DLLEXPORT HUD_VoiceStatus(int entindex, qboolean bTalking){	GetClientVoiceMgr()->UpdateSpeakerStatus(entindex, bTalking);}
开发者ID:JoelTroch,项目名称:am_src_30jan2011,代码行数:4,


示例23: VidInit

//.........这里部分代码省略.........	// Only load this once	if ( !m_pSpriteList )	{		// we need to load the hud.txt, and all sprites within		m_pSpriteList = SPR_GetList("sprites/hud.txt", &m_iSpriteCountAllRes);		if (m_pSpriteList)		{			// count the number of sprites of the appropriate res			m_iSpriteCount = 0;			client_sprite_t *p = m_pSpriteList;			int j;			for ( j = 0; j < m_iSpriteCountAllRes; j++ )			{				if ( p->iRes == m_iRes )					m_iSpriteCount++;				p++;			}			// allocated memory for sprite handle arrays 			m_rghSprites = new HSPRITE[m_iSpriteCount];			m_rgrcRects = new wrect_t[m_iSpriteCount];			m_rgszSpriteNames = new char[m_iSpriteCount * MAX_SPRITE_NAME_LENGTH];			p = m_pSpriteList;			int index = 0;			for ( j = 0; j < m_iSpriteCountAllRes; j++ )			{				if ( p->iRes == m_iRes )				{					char sz[256];					sprintf(sz, "sprites/%s.spr", p->szSprite);					m_rghSprites[index] = SPR_Load(sz);					m_rgrcRects[index] = p->rc;					strncpy( &m_rgszSpriteNames[index * MAX_SPRITE_NAME_LENGTH], p->szName, MAX_SPRITE_NAME_LENGTH );					index++;				}				p++;			}		}	}	else	{		// we have already have loaded the sprite reference from hud.txt, but		// we need to make sure all the sprites have been loaded (we've gone through a transition, or loaded a save game)		client_sprite_t *p = m_pSpriteList;		int index = 0;		for ( int j = 0; j < m_iSpriteCountAllRes; j++ )		{			if ( p->iRes == m_iRes )			{				char sz[256];				sprintf( sz, "sprites/%s.spr", p->szSprite );				m_rghSprites[index] = SPR_Load(sz);				index++;			}			p++;		}	}	// assumption: number_1, number_2, etc, are all listed and loaded sequentially	m_HUD_number_0 = GetSpriteIndex( "number_0" );	m_iFontHeight = m_rgrcRects[m_HUD_number_0].bottom - m_rgrcRects[m_HUD_number_0].top;	m_Ammo.VidInit();	m_Health.VidInit();	m_Spectator.VidInit();	m_Geiger.VidInit();	m_Train.VidInit();	m_Battery.VidInit();	m_Flash.VidInit();	m_Message.VidInit();	m_StatusBar.VidInit();	m_DeathNotice.VidInit();	m_SayText.VidInit();	m_Menu.VidInit();	m_AmmoSecondary.VidInit();	m_TextMessage.VidInit();	m_StatusIcons.VidInit();	m_Countdown.VidInit();	m_Crosshairs.VidInit();	m_CTF.VidInit();	m_Debug.VidInit();	m_Location.VidInit();	m_NextMap.VidInit();	m_PlayerId.VidInit();	m_Scores.VidInit();	m_Settings.VidInit();	m_Speedometer.VidInit();	m_SuddenDeath.VidInit();	m_Timeout.VidInit();	m_Timer.VidInit();	m_Vote.VidInit();	m_Watermark.VidInit();	GetClientVoiceMgr()->VidInit();}
开发者ID:YaLTeR,项目名称:OpenAG,代码行数:101,


示例24: GetClientVoiceMgr

bool CHudVoiceSelfStatus::ShouldDraw(){	return GetClientVoiceMgr()->IsLocalPlayerSpeaking();}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:4,


示例25: Init

//.........这里部分代码省略.........	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 );}
开发者ID:YaLTeR,项目名称:OpenAG,代码行数:101,


示例26: IsPlayerGameVoiceMuted

	// ingame voice manipulation	virtual bool IsPlayerGameVoiceMuted(int playerIndex)	{		if (GetClientVoiceMgr())			return GetClientVoiceMgr()->IsPlayerBlocked(playerIndex);		return false;	}
开发者ID:Chuvi-w,项目名称:CSSDK,代码行数:7,


示例27: Init

// This is called every time the DLL is loadedvoid 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 );}
开发者ID:RichardRohac,项目名称:hl-amnesia-src,代码行数:94,


示例28: getApp

void ScorePanel::FillGrid(){	CSchemeManager *pSchemes = gViewPort->GetSchemeManager();	SchemeHandle_t hScheme = pSchemes->getSchemeHandle("Scoreboard Text");	SchemeHandle_t hTitleScheme = pSchemes->getSchemeHandle("Scoreboard Title Text");	SchemeHandle_t hSmallScheme = pSchemes->getSchemeHandle("Scoreboard Small Text");	Font *sfont = pSchemes->getFont(hScheme);	Font *tfont = pSchemes->getFont(hTitleScheme);	Font *smallfont = pSchemes->getFont(hSmallScheme);	// update highlight position	int x, y;	getApp()->getCursorPos(x, y);	cursorMoved(x, y, this);	// remove highlight row if we're not in squelch mode	if (!GetClientVoiceMgr()->IsInSquelchMode())	{		m_iHighlightRow = -1;	}	bool bNextRowIsGap = false;	for(int row=0; row < NUM_ROWS; row++)	{		CGrid *pGridRow = &m_PlayerGrids[row];		pGridRow->SetRowUnderline(0, false, 0, 0, 0, 0, 0);		if(row >= m_iRows)		{			for(int col=0; col < NUM_COLUMNS; col++)				m_PlayerEntries[col][row].setVisible(false);					continue;		}		bool bRowIsGap = false;		if (bNextRowIsGap)		{			bNextRowIsGap = false;			bRowIsGap = true;		}		for(int col=0; col < NUM_COLUMNS; col++)		{			CLabelHeader *pLabel = &m_PlayerEntries[col][row];			pLabel->setVisible(true);			pLabel->setText2("");			pLabel->setImage(NULL);			pLabel->setFont(sfont);			pLabel->setTextOffset(0, 0);						int rowheight = 13;			if (ScreenHeight > 480)			{				rowheight = YRES(rowheight);			}			else			{				// more tweaking, make sure icons fit at low res				rowheight = 15;			}			pLabel->setSize(pLabel->getWide(), rowheight);			pLabel->setBgColor(0, 0, 0, 255);						char sz[128];			hud_player_info_t *pl_info = NULL;			team_info_t *team_info = NULL;			if (m_iIsATeam[row] == TEAM_BLANK)			{				pLabel->setText(" ");				continue;			}			else if ( m_iIsATeam[row] == TEAM_YES )			{				// Get the team's data				team_info = &g_TeamInfo[ m_iSortedRows[row] ];				// team color text for team names				pLabel->setFgColor(	iTeamColors[team_info->teamnumber % iNumberOfTeamColors][0],									iTeamColors[team_info->teamnumber % iNumberOfTeamColors][1],									iTeamColors[team_info->teamnumber % iNumberOfTeamColors][2],									0 );				// different height for team header rows				rowheight = 20;				if (ScreenHeight >= 480)				{					rowheight = YRES(rowheight);				}				pLabel->setSize(pLabel->getWide(), rowheight);				pLabel->setFont(tfont);				pGridRow->SetRowUnderline(	0,											true,											YRES(3),											iTeamColors[team_info->teamnumber % iNumberOfTeamColors][0],//.........这里部分代码省略.........
开发者ID:ET-NiK,项目名称:amxxgroup,代码行数:101,


示例29: demos

/*================CL_CreateMoveSend the intended movement message to the serverif active == 1 then we are 1) not playing back demos ( where our commands are ignored ) and2 ) we have finished signing on to server================*/void DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int active ){		float spd;	vec3_t viewangles;	static vec3_t oldangles;	if ( active )	{		//memset( viewangles, 0, sizeof( vec3_t ) );		//viewangles[ 0 ] = viewangles[ 1 ] = viewangles[ 2 ] = 0.0;		gEngfuncs.GetViewAngles( (float *)viewangles );		CL_AdjustAngles ( frametime, viewangles );		memset (cmd, 0, sizeof(*cmd));				gEngfuncs.SetViewAngles( (float *)viewangles );		if ( in_strafe.state & 1 )		{			cmd->sidemove += cl_sidespeed->value * CL_KeyState (&in_right);			cmd->sidemove -= cl_sidespeed->value * CL_KeyState (&in_left);		}		cmd->sidemove += cl_sidespeed->value * CL_KeyState (&in_moveright);		cmd->sidemove -= cl_sidespeed->value * CL_KeyState (&in_moveleft);		cmd->upmove += cl_upspeed->value * CL_KeyState (&in_up);		cmd->upmove -= cl_upspeed->value * CL_KeyState (&in_down);		if ( !(in_klook.state & 1 ) )		{				cmd->forwardmove += cl_forwardspeed->value * CL_KeyState (&in_forward);			cmd->forwardmove -= cl_backspeed->value * CL_KeyState (&in_back);		}			// adjust for speed key		if ( in_speed.state & 1 )		{			cmd->forwardmove *= cl_movespeedkey->value;			cmd->sidemove *= cl_movespeedkey->value;			cmd->upmove *= cl_movespeedkey->value;		}		// clip to maxspeed		spd = gEngfuncs.GetClientMaxspeed();		if ( spd != 0.0 )		{			// scale the 3 speeds so that the total velocity is not > cl.maxspeed			float fmov = sqrt( (cmd->forwardmove*cmd->forwardmove) + (cmd->sidemove*cmd->sidemove) + (cmd->upmove*cmd->upmove) );			if ( fmov > spd )			{				float fratio = spd / fmov;				cmd->forwardmove *= fratio;				cmd->sidemove *= fratio;				cmd->upmove *= fratio;			}		}		// Allow mice and other controllers to add their inputs		IN_Move ( frametime, cmd );	}	cmd->impulse = in_impulse;	in_impulse = 0;	cmd->weaponselect = g_weaponselect;	g_weaponselect = 0;	//	// set button and flag bits	//	cmd->buttons = CL_ButtonBits( 1 );	// If they're in a modal dialog, ignore the attack button.	if(GetClientVoiceMgr()->IsInSquelchMode())		cmd->buttons &= ~IN_ATTACK;	// Using joystick?	if ( in_joystick->value )	{		if ( cmd->forwardmove > 0 )		{			cmd->buttons |= IN_FORWARD;		}		else if ( cmd->forwardmove < 0 )		{			cmd->buttons |= IN_BACK;		}	}//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:csclassic,代码行数:101,



注:本文中的GetClientVoiceMgr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GetClientWindow函数代码示例
C++ GetClientSize函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。