• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ MAKE_STRING函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Spawn

// UNDONE: right now this is pretty much a copy of the squid spit with minor changes to the way it does damage
void CBMortar:: Spawn( void )
{
	pev->movetype = MOVETYPE_TOSS;
	pev->classname = MAKE_STRING( "bmortar" );
	
	pev->solid = SOLID_BBOX;
	pev->rendermode = kRenderTransAlpha;
	pev->renderamt = 255;

	SET_MODEL(ENT(pev), "sprites/mommaspit.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;
	pev->dmgtime = gpGlobals->time + 0.4;
}
开发者ID:FaucetDC,项目名称:HLDC_SDK,代码行数:19,代码来源:bigmomma.cpp


示例17: CREATE_NAMED_ENTITY

// NOTE: szName must be a pointer to constant memory, e.g. "monster_class" because the entity
// will keep a pointer to it after this call.
CBaseEntity *CBaseEntity::Create(char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner)
{
	edict_t *    pent;
	CBaseEntity *pEntity;

	pent = CREATE_NAMED_ENTITY(MAKE_STRING(szName));
	if(FNullEnt(pent))
	{
		ALERT(at_console, "NULL Ent in Create!\n");
		return NULL;
	}
	pEntity              = Instance(pent);
	pEntity->pev->owner  = pentOwner;
	pEntity->pev->origin = vecOrigin;
	pEntity->pev->angles = vecAngles;
	DispatchSpawn(pEntity->edict());
	return pEntity;
}
开发者ID:Sh1ft0x0EF,项目名称:HLSDKRevamp,代码行数:20,代码来源:cbase.cpp


示例18: SpawnCommonCode

//=========================================================
//=========================================================
void CFlockingFlyer :: SpawnCommonCode( )
{
	pev->deadflag	= DEAD_NO;
	pev->classname	= MAKE_STRING("monster_flyer");
	pev->solid		= SOLID_SLIDEBOX;
	pev->movetype	= MOVETYPE_FLY;
	pev->takedamage	= DAMAGE_NO;
	pev->health		= 1;

	m_fPathBlocked	= FALSE;// obstacles will be detected
	m_flFieldOfView	= 0.2;

	//SET_MODEL(ENT(pev), "models/aflock.mdl");
	SET_MODEL(ENT(pev), "models/boid.mdl");

//	UTIL_SetSize(pev, Vector(0,0,0), Vector(0,0,0));
	UTIL_SetSize(pev, Vector(-5,-5,0), Vector(5,5,2));
}
开发者ID:Hammermaps-DEV,项目名称:opposing-force-rebuilded-sdk,代码行数:20,代码来源:aflock.cpp


示例19: Spawn

void CBaseTrigger :: Spawn( void )
{
	pev->solid = SOLID_TRIGGER;
	pev->movetype = MOVETYPE_NONE;
	pev->takedamage = DAMAGE_NO;
	UTIL_SetModel( ENT( pev ), pev->model );    // set size and link into world
	SetObjectClass( ED_TRIGGER );
          
	// create a null-terminator for the registry
	m_pRegister = GetClassPtr(( CInOutRegister *)NULL );
	m_pRegister->m_hValue = NULL;
	m_pRegister->m_pNext = NULL;
	m_pRegister->m_pField = this;
	m_pRegister->pev->classname = MAKE_STRING("zoneent");
	m_pRegister->SetObjectClass( ED_STATIC );

	SetThink( Update );
}
开发者ID:a1batross,项目名称:Xash3D_ancient,代码行数:18,代码来源:basetrigger.cpp


示例20: MAKE_STRING

void CSmokeGrenade::Spawn( void )
{
    pev->classname = MAKE_STRING( "weapon_smokegrenade" );

    Precache();
    m_iId = WEAPON_SMOKEGRENADE;
    SET_MODEL( edict(), "models/w_smokegrenade.mdl" );

    pev->dmg = 4;

    ClearBits( m_iWeaponState, WPNSTATE_SHIELD_DRAWN );

    m_iDefaultAmmo   = SMOKEGRENADE_DEFAULT_GIVE;
    m_flStartThrow   = 0;
    m_flReleaseThrow = -1;

    FallInit();
}
开发者ID:Chuvi-w,项目名称:CSSDK,代码行数:18,代码来源:wpn_smokegrenade.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MAKE_TIMER_TICKS函数代码示例发布时间:2022-05-30
下一篇:
C++ MAKE_STD_ZVAL函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap