当前位置: 首页>>代码示例>>C++>>正文


C++ MAKE_STRING函数代码示例

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


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

示例1: InitBodyQue

static void InitBodyQue(void)
{
	string_t	istrClassname = MAKE_STRING("bodyque");

	g_pBodyQueueHead = CREATE_NAMED_ENTITY( istrClassname );
	entvars_t *pev = VARS(g_pBodyQueueHead);
	
	// Reserve 3 more slots for dead bodies
	for ( int i = 0; i < 3; i++ )
	{
		pev->owner = CREATE_NAMED_ENTITY( istrClassname );
		pev = VARS(pev->owner);
	}
	
	pev->owner = g_pBodyQueueHead;
}
开发者ID:NoFreeWill,项目名称:MultiplayerSource,代码行数:16,代码来源:world.cpp

示例2: Precache

void AvHKnife::Spawn() 
{ 
    AvHMarineWeapon::Spawn(); 

	Precache();

	this->m_iId = AVH_WEAPON_KNIFE;
	//this->m_iDefaultAmmo = kKNMaxClip;
	
    // Set our class name
	this->pev->classname = MAKE_STRING(kwsKnife);
	
	SET_MODEL(ENT(this->pev), kNullModel);
	
	FallInit();// get ready to fall down.
} 
开发者ID:Arkshine,项目名称:NS,代码行数:16,代码来源:AvHKnife.cpp

示例3: httpapp_send_all_usage

static void httpapp_send_all_usage( tcp_sock sock )
{
    str_t content = { 0, 0 };
    str_t content_type = MAKE_STRING( "application/x-json" );
    user_t * u = 0;

    while( (u = get_next_user(u)) != 0 )
    {
        str_t usage = httpapp_user_usage(u, get_next_user(u) != 0);
        append_string( &content, &usage );
        free( usage.str );
    }

    httpserv_send_content(sock, content_type, content, 1, 0 );
    log_printf( "200 OK %d bytes\n", content.len );
}
开发者ID:chrisforbes,项目名称:ijwrouter,代码行数:16,代码来源:http_endpoints.c

示例4: httpapp_send_stat_counts

static void httpapp_send_stat_counts( tcp_sock sock )
{
    str_t content = { 0, 0 };
    str_t content_type = MAKE_STRING( "application/x-json" );

    void * c = 0;
    while( 0 != (c = stats_get_next_counter(c) ))
    {
        str_t counter = httpapp_make_counter_json(c, stats_get_next_counter(c) != 0);
        append_string( &content, &counter );
        free( counter.str );
    }

    httpserv_send_content(sock, content_type, content, 1, 0);
    log_printf( "200 OK %d bytes\n", content.len );
}
开发者ID:chrisforbes,项目名称:ijwrouter,代码行数:16,代码来源:http_endpoints.c

示例5: MAKE_STRING

void CAWP::Spawn( )
{
	pev->classname = MAKE_STRING( "weapon_awp" );
	Precache( );
	SET_MODEL( ENT(pev), "models/weapons/awp/w_awp.mdl" );
	m_iId = WEAPON_AWP;
	m_iDefaultAmmo = 120;
	FallInit();

	wepspread_s.MaxSpreadX = 5;
	wepspread_s.MaxSpreadY = 5;

	wepspread_s.SpreadX = 5;
	wepspread_s.SpreadY = 5;
	scope = false;
}
开发者ID:mittorn,项目名称:csdm,代码行数:16,代码来源:wpn_awp.cpp

示例6: MAKE_STRING

void CM249::Spawn(void)
{
	BINTRACE

	pev->classname = MAKE_STRING("weapon_m249");

	Precache();
	m_iId = WEAPON_M249;
	SET_MODEL(ENT(pev), "models/w_m249.mdl");

	m_iDefaultAmmo = M249_DEFAULT_GIVE;
	m_flAccuracy = 0.2;
	m_iShotsFired = 0;

	FallInit();
}
开发者ID:Sh1ft0x0EF,项目名称:CS_GameDLL,代码行数:16,代码来源:wpn_m249.cpp

示例7: GetClassPtr

void CBaseDelay::SUB_UseTargets(CBaseEntity *pActivator, USE_TYPE useType, float value)
{
	if (FStringNull(pev->target) && !m_iszKillTarget)
		return;

	if (m_flDelay != 0)
	{
		CBaseDelay *pTemp = GetClassPtr((CBaseDelay *)NULL);

		if (pTemp->pev->classname)
			RemoveEntityHashValue(pTemp->pev, STRING(pTemp->pev->classname), CLASSNAME);

		pTemp->pev->classname = MAKE_STRING("DelayedUse");
		AddEntityHashValue(pTemp->pev, STRING(pTemp->pev->classname), CLASSNAME);

		pTemp->pev->nextthink = gpGlobals->time + m_flDelay;
		pTemp->SetThink(&CBaseDelay::DelayThink);
		pTemp->pev->button = (int)useType;
		pTemp->m_iszKillTarget = m_iszKillTarget;
		pTemp->m_flDelay = 0;
		pTemp->pev->target = pev->target;

		if (pActivator && pActivator->IsPlayer())
			pTemp->pev->owner = pActivator->edict();
		else
			pTemp->pev->owner = NULL;

		return;
	}

	if (m_iszKillTarget)
	{
		ALERT(at_aiconsole, "KillTarget: %s\n", STRING(m_iszKillTarget));
		edict_t *pentKillTarget = FIND_ENTITY_BY_TARGETNAME(NULL, STRING(m_iszKillTarget));

		while (!FNullEnt(pentKillTarget))
		{
			UTIL_Remove(CBaseEntity::Instance(pentKillTarget));
			ALERT(at_aiconsole, "killing %s\n", STRING(pentKillTarget->v.classname));
			pentKillTarget = FIND_ENTITY_BY_TARGETNAME(pentKillTarget, STRING(m_iszKillTarget));
		}
	}

	if (!FStringNull(pev->target))
		FireTargets(STRING(pev->target), pActivator, this, useType, value);
}
开发者ID:AlexCSilva,项目名称:cs16-client,代码行数:46,代码来源:subs.cpp

示例8: httpapp_send_user_bindings

static void httpapp_send_user_bindings( tcp_sock sock )
{
    str_t content = { 0, 0 };
    str_t content_type = MAKE_STRING( "application/x-json" );

    user_t * u = 0;

    while( 0 != (u = get_next_user(u) ))
    {
        str_t binding = httpapp_user_binding(u, get_next_user(u) != 0);
        append_string( &content, &binding );
        free( binding.str );
    }

    httpserv_send_content(sock, content_type, content, 1, 0);
    log_printf( "200 OK %d bytes\n", content.len );
}
开发者ID:chrisforbes,项目名称:ijwrouter,代码行数:17,代码来源:http_endpoints.c

示例9: CreateHull

CXenHull *CXenHull :: CreateHull( CBaseEntity *source, const Vector &mins, const Vector &maxs, const Vector &offset )
{
	CXenHull *pHull = GetClassPtr( (CXenHull *)NULL );

	UTIL_SetOrigin( pHull->pev, source->pev->origin + offset );
	SET_MODEL( pHull->edict(), STRING(source->pev->model) );
	pHull->pev->solid = SOLID_BBOX;
	pHull->pev->classname = MAKE_STRING("xen_hull");
	pHull->pev->movetype = MOVETYPE_NONE;
	pHull->pev->owner = source->edict();
	UTIL_SetSize( pHull->pev, mins, maxs );
	pHull->pev->renderamt = 0;
	pHull->pev->rendermode = kRenderTransTexture;
	//	pHull->pev->effects = EF_NODRAW;

	return pHull;
}
开发者ID:Arkshine,项目名称:NS,代码行数:17,代码来源:xen.cpp

示例10: if

void CTeamSpawn::Spawn( void )
{
	pev->solid = SOLID_NOT;

	if( !stricmp( STRING( pev->classname ), "info_player_start" ) )
	{
		pev->team = TEAM_EARTH;
	}
	else if( !stricmp( STRING( pev->classname ), "info_player_deathmatch" ) )
	{
		pev->team = TEAM_SPACE;
	}

	pev->classname = MAKE_STRING( "info_team_spawn" );

//	ALERT( at_console, "SPAWNS %i\n", pev->team );
}
开发者ID:vermagav,项目名称:mechmod,代码行数:17,代码来源:team_spawns.cpp

示例11: Spawn

void CSquidSpit:: Spawn( void )
{
	pev->movetype = MOVETYPE_FLY;
	pev->classname = MAKE_STRING( "squidspit" );

	pev->solid = SOLID_BBOX;
	pev->rendermode = kRenderTransAlpha;
	pev->renderamt = 255;

	SET_MODEL(ENT(pev), "sprites/bigspit.spr");
	pev->frame = 0;
	pev->scale = 0.5;

	UTIL_SetSize( pev, Vector( 0, 0, 0), Vector(0, 0, 0) );

	m_maxFrame = (float) MODEL_FRAMES( pev->modelindex ) - 1;
}
开发者ID:Xash3DLinux,项目名称:xash3dlinux,代码行数:17,代码来源:bullsquid.cpp

示例12: Precache

void AvHFlameGun::Spawn() 
{ 
    AvHMarineWeapon::Spawn(); 

	Precache();

	//this->m_iId = AVH_WEAPON_FLAMER;
	ASSERT(false);
	this->m_iDefaultAmmo = kFGMaxClip;

    // Set our class name
	this->pev->classname = MAKE_STRING(kwsFlameGun);

	SET_MODEL(ENT(this->pev), kFGWModel);

	FallInit();// get ready to fall down.
} 
开发者ID:tschumann,项目名称:naturalselection,代码行数:17,代码来源:AvHFlameGun.cpp

示例13: MAKE_STRING

void CHostage::Precache(void)
{
	BINTRACE

	m_whichModel = 0;

	if (FStringNull(pev->model))
		pev->model = MAKE_STRING("models/scientist.mdl");

	PRECACHE_MODEL((char *)STRING(pev->model));
	PRECACHE_SOUND("hostage/hos1.wav");
	PRECACHE_SOUND("hostage/hos2.wav");
	PRECACHE_SOUND("hostage/hos3.wav");
	PRECACHE_SOUND("hostage/hos4.wav");
	PRECACHE_SOUND("hostage/hos5.wav");
	PRECACHE_MODEL("sprites/smoke.spr");
}
开发者ID:Sh1ft0x0EF,项目名称:CS_GameDLL,代码行数:17,代码来源:hostage.cpp

示例14: Save

	void Save( ISave *pSave )
	{
		pSave->StartBlock( "Squads" );
		short nSquads = (short)g_AI_SquadManager.NumSquads();
		pSave->WriteShort( &nSquads );
		
		AISquadsIter_t iter;
		string_t squadName;
		CAI_Squad* pSquad = g_AI_SquadManager.GetFirstSquad( &iter );
		while (pSquad)
		{
			squadName = MAKE_STRING( pSquad->GetName() );
			pSave->WriteString( "", &squadName ); // Strings require a header to be read properly
			pSave->WriteAll( pSquad );
			pSquad = g_AI_SquadManager.GetNextSquad( &iter );
		}
		
		pSave->EndBlock();

		//---------------------------------
		
		pSave->StartBlock( "Enemies" );
		short nMemories = 0;
		
		CAI_BaseNPC **ppAIs = g_AI_Manager.AccessAIs();
		int i;

		for ( i = 0; i < g_AI_Manager.NumAIs(); i++ )
		{
			if ( ppAIs[i]->GetEnemies() )
				nMemories++;
		}

		pSave->WriteShort( &nMemories );
		
		for ( i = 0; i < g_AI_Manager.NumAIs(); i++ )
		{
			if ( ppAIs[i]->GetEnemies() )
			{
				CBaseEntity *p = ppAIs[i];
				pSave->WriteEntityPtr( &p );
				pSave->WriteAll( ppAIs[i]->GetEnemies() );
			}
		}
		pSave->EndBlock();
	}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:46,代码来源:ai_saverestore.cpp

示例15: GenericCyclerSpawn

void CCycler :: GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax)
{
	if (!szModel || !*szModel)
	{
		ALERT(at_error, "cycler at %.0f %.0f %0.f missing modelname", pev->origin.x, pev->origin.y, pev->origin.z );
		REMOVE_ENTITY(ENT(pev));
		return;
	}

	pev->classname		= MAKE_STRING("cycler");
	PRECACHE_MODEL( szModel );
	SET_MODEL(ENT(pev),	szModel);

	CCycler::Spawn( );

	UTIL_SetSize(pev, vecMin, vecMax);
}
开发者ID:Hammermaps-DEV,项目名称:SOHL-V1.0-Refresh,代码行数:17,代码来源:h_cycler.cpp


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