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

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

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

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

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

示例1: PlayLockSounds

/* <6a3b8> ../cstrike/dlls/doors.cpp:508 */void CBaseDoor::DoorTouch(CBaseEntity *pOther){	entvars_t *pevToucher = pOther->pev;	// Ignore touches by dead players	if (pevToucher->deadflag != DEAD_NO)		return;	// If door has master, and it's not ready to trigger,	// play 'locked' sound	if (!FStringNull(m_sMaster) && !UTIL_IsMasterTriggered(m_sMaster, pOther))	{		PlayLockSounds(pev, &m_ls, TRUE, FALSE);	}	// If door is somebody's target, then touching does nothing.	// You have to activate the owner (e.g. button).	if (!FStringNull(pev->targetname))	{		// play locked sound		PlayLockSounds(pev, &m_ls, TRUE, FALSE);		return;	}	// remember who activated the door	m_hActivator = pOther;	if (DoorActivate())	{		// Temporarily disable the touch function, until movement is finished.		SetTouch(NULL);	}}
开发者ID:Arkshine,项目名称:ReGameDLL_CS,代码行数:34,


示例2: MAKE_STRING

void CPython::Holster( int skiplocal /* = 0 */ ){	if (m_fInZoom == TRUE) 	{		m_pPlayer->b_EstaEnZoom = FALSE;		#ifndef CLIENT_DLL				if (!FStringNull (v_model) )				m_pPlayer->pev->viewmodel = v_model;				else				m_pPlayer->pev->viewmodel = MAKE_STRING("models/weapons/357/v_357.mdl");		#else				if (!FStringNull (v_model) )				m_pPlayer->pev->viewmodel = v_model;				else				LoadVModel ( "models/weapons/357/v_357.mdl", m_pPlayer );		#endif		m_pPlayer->pev->fov = m_pPlayer->m_iFOV = 0; // 0 means reset to default fov		m_fInZoom = FALSE;	}	m_fInReload = FALSE;// cancel any reload in progress.//	if ( m_fInZoom )//	{//		SecondaryAttack();//	}	m_pPlayer->m_flNextAttack = UTIL_WeaponTimeBase() + 1.0;	m_flTimeWeaponIdle = UTIL_SharedRandomFloat( m_pPlayer->random_seed, 10, 15 );	SendWeaponAnim( PYTHON_IDLE1 );//PYTHON_HOLSTER}
开发者ID:JoelTroch,项目名称:am_src_30jan2011,代码行数:32,


示例3: Spawn

void CCineMonster::Spawn(void){	// pev->solid = SOLID_TRIGGER;	// UTIL_SetSize(pev, Vector(-8, -8, -8), Vector(8, 8, 8));	pev->solid = SOLID_NOT;// REMOVE: The old side-effect#if 0	if ( m_iszIdle )		m_fMoveTo = 4;#endif	// if no targetname, start now	if(FStringNull(pev->targetname) || !FStringNull(m_iszIdle))	{		SetThink(&CCineMonster::CineThink);		pev->nextthink = gpGlobals->time + 1.0;		// Wait to be used?		if(pev->targetname)			m_startTime = gpGlobals->time + 1E6;	}	if(pev->spawnflags & SF_SCRIPT_NOINTERRUPT)		m_interruptable = FALSE;	else		m_interruptable = TRUE;}
开发者ID:Sh1ft0x0EF,项目名称:HLSDKRevamp,代码行数:26,


示例4: ChainTouch

void CBaseDoor::DoorTouch( CBaseEntity *pOther ){	if( !FStringNull( m_iChainTarget ))		ChainTouch( pOther );	m_bDoorTouched = true;	// ignore touches by anything but players and pushables	if( !pOther->IsPlayer() && !pOther->IsPushable()) return;	m_hActivator = pOther; // remember who activated the door	// If door has master, and it's not ready to trigger, 	// play 'locked' sound	if( IsLockedByMaster( ))		PlayLockSounds( pev, &m_ls, TRUE, FALSE );		// If door is somebody's target, then touching does nothing.	// You have to activate the owner (e.g. button).	// g-cont. but allow touch for chain doors	if( !FStringNull( pev->targetname ) && FStringNull( m_iChainTarget ))	{		// play locked sound		PlayLockSounds( pev, &m_ls, TRUE, FALSE );		return; 	}	if( DoorActivate( ))	{		// temporarily disable the touch function, until movement is finished.		SetTouch( NULL );	}}
开发者ID:XashDev,项目名称:XashXT,代码行数:33,


示例5: SUB_UseTargets

void CBaseDelay :: SUB_UseTargets( CBaseEntity *pActivator, USE_TYPE useType, float value ){	//	// exit immediatly if we don't have a target or kill target	//	if (FStringNull(pev->target) && !m_iszKillTarget)		return;	//	// check for a delay	//	if (m_flDelay != 0)	{		// create a temp object to fire at a later time		CBaseDelay *pTemp = GetClassPtr( (CBaseDelay *)NULL);		pTemp->pev->classname = MAKE_STRING("DelayedUse");		pTemp->SetNextThink( m_flDelay );		pTemp->SetThink(&CBaseDelay:: DelayThink );				// Save the useType		pTemp->pev->button = (int)useType;		pTemp->m_iszKillTarget = m_iszKillTarget;		pTemp->m_flDelay = 0; // prevent "recursion"		pTemp->pev->target = pev->target;		//LRC - Valve had a hacked thing here to avoid breaking		// save/restore. In Spirit that's not a problem.		// I've moved m_hActivator into this class, for the "elegant" fix.		pTemp->m_hActivator = pActivator;		return;	}	//	// kill the killtargets	//	if ( m_iszKillTarget )	{		edict_t *pentKillTarget = NULL;		ALERT( at_aiconsole, "KillTarget: %s/n", STRING(m_iszKillTarget) );		//LRC- now just USE_KILLs its killtarget, for consistency.		FireTargets( STRING(m_iszKillTarget), pActivator, this, USE_KILL, 0);	}		//	// fire targets	//	if (!FStringNull(pev->target))	{		FireTargets( STRING(pev->target), pActivator, this, useType, value );	}}
开发者ID:Hammermaps-DEV,项目名称:Spirit-of-Half-Life-1.8--VC2010,代码行数:56,


示例6: UTIL_TraceLine

//=========================================================// TryMakeMonster-  check that it's ok to drop a monster.//=========================================================void CMonsterMaker::TryMakeMonster( void ){	if ( m_iMaxLiveChildren > 0 && m_cLiveChildren >= m_iMaxLiveChildren )	{// not allowed to make a new one yet. Too many live ones out right now.		return;	}	if ( !m_flGround )	{		// set altitude. Now that I'm activated, any breakables, etc should be out from under me. 		TraceResult tr;		UTIL_TraceLine ( pev->origin, pev->origin - Vector ( 0, 0, 2048 ), ignore_monsters, ENT(pev), &tr );		m_flGround = tr.vecEndPos.z;	}	Vector mins = pev->origin - Vector( 34, 34, 0 );	Vector maxs = pev->origin + Vector( 34, 34, 0 );	maxs.z = pev->origin.z;	mins.z = m_flGround;	CBaseEntity *pList[2];	int count = UTIL_EntitiesInBox( pList, 2, mins, maxs, FL_CLIENT|FL_MONSTER );	if ( count )	{		// don't build a stack of monsters!		return;	}	if (m_fSpawnDelay)	{		// If I have a target, fire. (no locus)		if ( !FStringNull ( pev->target ) )		{			// delay already overloaded for this entity, so can't call SUB_UseTargets()			FireTargets( STRING(pev->target), this, this, USE_TOGGLE, 0 );		}//		ALERT(at_console,"Making Monster in %f seconds/n",m_fSpawnDelay);		SetThink(&CMonsterMaker:: MakeMonsterThink );		SetNextThink( m_fSpawnDelay );	}	else	{//		ALERT(at_console,"No delay. Making monster./n",m_fSpawnDelay);		CBaseMonster* pMonst = MakeMonster();		// If I have a target, fire! (the new monster is the locus)		if ( !FStringNull ( pev->target ) )		{			FireTargets( STRING(pev->target), pMonst, this, USE_TOGGLE, 0 );		}	}}
开发者ID:RichardRohac,项目名称:hl-amnesia-src,代码行数:57,


示例7: SetThink

void CLightning::Spawn( void ){	if ( FStringNull( m_iszSpriteName ) )	{		SetThink( SUB_Remove );		return;	}	pev->solid = SOLID_NOT;							// Remove model & collisions	Precache( );	pev->dmgtime = gpGlobals->time;	if ( ServerSide() )	{		SetThink( NULL );		if ( pev->dmg > 0 )		{			SetThink( DamageThink );			pev->nextthink = gpGlobals->time + 0.1;		}		if ( pev->targetname )		{			if ( !(pev->spawnflags & SF_BEAM_STARTON) )			{				pev->effects = EF_NODRAW;				m_active = 0;				pev->nextthink = 0;			}			else				m_active = 1;					SetUse( ToggleUse );		}	}	else	{		m_active = 0;		if ( !FStringNull(pev->targetname) )		{			SetUse( StrikeUse );		}		if ( FStringNull(pev->targetname) || FBitSet(pev->spawnflags, SF_BEAM_STARTON) )		{			SetThink( StrikeThink );			pev->nextthink = gpGlobals->time + 1.0;		}	}}
开发者ID:NoFreeWill,项目名称:MultiplayerSource,代码行数:48,


示例8: while

void CMultiSource::__MAKE_VHOOK(Use)(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value){	int i = 0;	// Find the entity in our list	while (i < m_iTotal)	{		if (m_rgEntities[i++] == pCaller)			break;	}	// if we didn't find it, report error and leave	if (i > m_iTotal)	{		ALERT(at_console, "MultiSrc:Used by non member %s./n", STRING(pCaller->pev->classname));		return;	}	// CONSIDER: a Use input to the multisource always toggles.	// Could check useType for ON/OFF/TOGGLE	m_rgTriggered[i - 1] ^= 1;	if (IsTriggered(pActivator))	{		ALERT(at_aiconsole, "Multisource %s enabled (%d inputs)/n", STRING(pev->targetname), m_iTotal);		USE_TYPE useType = USE_TOGGLE;		if (!FStringNull(m_globalstate))		{			useType = USE_ON;		}		SUB_UseTargets(NULL, useType, 0);	}}
开发者ID:Chuvi-w,项目名称:ReGameDLL_CS,代码行数:35,


示例9: Precache

void CAmbientGeneric :: Precache( void ){	char* szSoundFile = (char*) STRING(pev->message);	if ( !FStringNull( pev->message ) && strlen( szSoundFile ) > 1 )	{		if (*szSoundFile != '!')			PRECACHE_SOUND(szSoundFile);	}	// init all dynamic modulation parms	InitModulationParms();	if ( !FBitSet (pev->spawnflags, AMBIENT_SOUND_START_SILENT ) )	{		// start the sound ASAP		if (m_fLooping)			m_fActive = TRUE;	}	if ( m_fActive )	{		UTIL_EmitAmbientSound ( ENT(pev), pev->origin, szSoundFile, 				(m_dpv.vol * 0.01), m_flAttenuation, SND_SPAWNING, m_dpv.pitch);		pev->nextthink = gpGlobals->time + 0.1;	}}
开发者ID:6779660,项目名称:halflife,代码行数:26,


示例10: StudioFrameAdvance

void COsprey::FlyThink( void ){	StudioFrameAdvance( );	pev->nextthink = gpGlobals->time + 0.1;	if ( m_pGoalEnt == NULL && !FStringNull(pev->target) )// this monster has a target	{		m_pGoalEnt = CBaseEntity::Instance( FIND_ENTITY_BY_TARGETNAME ( NULL, STRING( pev->target ) ) );		UpdateGoal( );	}	if (gpGlobals->time > m_startTime + m_dTime)	{		if (m_pGoalEnt->pev->speed == 0)		{			SetThink( DeployThink );		}		do {			m_pGoalEnt = CBaseEntity::Instance( FIND_ENTITY_BY_TARGETNAME ( NULL, STRING( m_pGoalEnt->pev->target ) ) );		} while (m_pGoalEnt->pev->speed < 400 && !HasDead());		UpdateGoal( );	}	Flight( );	ShowDamage( );}
开发者ID:XashDev,项目名称:XashXT,代码行数:26,


示例11: Spawn

void CLaser::Spawn(void){	if(FStringNull(pev->model))	{		SetThink(&CLaser::SUB_Remove);		return;	}	pev->solid = SOLID_NOT; // Remove model & collisions	Precache();	SetThink(&CLaser::StrikeThink);	pev->flags |= FL_CUSTOMENTITY;	PointsInit(pev->origin, pev->origin);	if(!m_pSprite && m_iszSpriteName)		m_pSprite = CSprite::SpriteCreate(STRING(m_iszSpriteName), pev->origin, TRUE);	else		m_pSprite = NULL;	if(m_pSprite)		m_pSprite->SetTransparency(kRenderGlow, pev->rendercolor.x, pev->rendercolor.y, pev->rendercolor.z, pev->renderamt, pev->renderfx);	if(pev->targetname && !(pev->spawnflags & SF_BEAM_STARTON))		TurnOff();	else		TurnOn();}
开发者ID:Sh1ft0x0EF,项目名称:HLSDKRevamp,代码行数:28,


示例12: PlayLockSounds

//// Doors not tied to anything (e.g. button, another door) can be touched, to make them activate.//void CBaseDoor::DoorTouch( CBaseEntity *pOther ){	entvars_t*	pevToucher = pOther->pev;		// Ignore touches by anything but players	if (!FClassnameIs(pevToucher, "player"))		return;	// If door has master, and it's not ready to trigger, 	// play 'locked' sound	if (m_sMaster && !UTIL_IsMasterTriggered(m_sMaster, pOther))		PlayLockSounds(pev, &m_ls, TRUE, FALSE);		// If door is somebody's target, then touching does nothing.	// You have to activate the owner (e.g. button).	//LRC- allow flags to override this	if (!FStringNull(pev->targetname) && !FBitSet(pev->spawnflags,SF_DOOR_FORCETOUCHABLE))	{		// play locked sound		PlayLockSounds(pev, &m_ls, TRUE, FALSE);		return; 	}		m_hActivator = pOther;// remember who activated the door	if (DoorActivate( ))		SetTouch( NULL ); // Temporarily disable the touch function, until movement is finished.}
开发者ID:Hammermaps-DEV,项目名称:Spirit-of-Half-Life-1.8--VC2010,代码行数:32,


示例13: GiveAmmo

//=========================================================// CWeaponBox - GiveAmmo//=========================================================int CWeaponBox::GiveAmmo( int iCount, char *szName, int iMax, int *pIndex/* = NULL*/ ){	int i;	for (i = 1; i < MAX_AMMO_SLOTS && !FStringNull( m_rgiszAmmo[i] ); i++)	{		if (stricmp( szName, STRING( m_rgiszAmmo[i])) == 0)		{			if (pIndex)				*pIndex = i;			int iAdd = min( iCount, iMax - m_rgAmmo[i]);			if (iCount == 0 || iAdd > 0)			{				m_rgAmmo[i] += iAdd;				return i;			}			return -1;		}	}	if (i < MAX_AMMO_SLOTS)	{		if (pIndex)			*pIndex = i;		m_rgiszAmmo[i] = MAKE_STRING( szName );		m_rgAmmo[i] = iCount;		return i;	}	ALERT( at_console, "out of named ammo slots/n");	return i;}
开发者ID:vermagav,项目名称:mechmod,代码行数:37,


示例14: Link

void CPathTrack :: Link( void  ){	edict_t *pentTarget;	if ( !FStringNull(pev->target) )	{		pentTarget = FIND_ENTITY_BY_TARGETNAME( NULL, STRING(pev->target) );		if ( !FNullEnt(pentTarget) )		{			m_pnext = CPathTrack::Instance( pentTarget );			if ( m_pnext )		// If no next pointer, this is the end of a path			{				m_pnext->SetPrevious( this );			}		}		else			ALERT( at_console, "Dead end link %s/n", STRING(pev->target) );	}	// Find "alternate" path	if ( m_altName )	{		pentTarget = FIND_ENTITY_BY_TARGETNAME( NULL, STRING(m_altName) );		if ( !FNullEnt(pentTarget) )		{			m_paltpath = CPathTrack::Instance( pentTarget );			if ( m_paltpath )		// If no next pointer, this is the end of a path			{				m_paltpath->SetPrevious( this );			}		}	}}
开发者ID:6779660,项目名称:halflife,代码行数:35,


示例15: GetDoorMovementGroup

// lists all doors in the same movement group as this oneint CBaseDoor :: GetDoorMovementGroup( CBaseDoor *pDoorList[], int listMax ){	CBaseEntity *pTarget = NULL;	int count = 0;	// block all door pieces with the same targetname here.	if( !FStringNull( pev->targetname ))	{		while(( pTarget = UTIL_FindEntityByTargetname( pTarget, STRING( pev->targetname ))) != NULL )		{			if( pTarget != this && FClassnameIs( pTarget, GetClassname() ))			{				CBaseDoor *pDoor = (CBaseDoor *)pTarget;				if( pDoor && count < listMax )				{					pDoorList[count] = pDoor;					count++;				}			}		}	}	return count;}
开发者ID:XashDev,项目名称:XashXT,代码行数:26,


示例16: MAKE_STRING

void CAK74::Spawn( ){	pev->classname = MAKE_STRING("weapon_AK47"); // hack to allow for old names	Precache( );//	SET_MODEL(ENT(pev), "models/weapons/ak-47/w_AK47.mdl");		if (!FStringNull (v_model) )	SET_MODEL( ENT(pev), STRING(w_model) );	else	SET_MODEL(ENT(pev), "models/weapons/ak-47/w_AK47.mdl");	m_iId = WEAPON_AK74;	if (pev->armorvalue)	{ 		if ((pev->armorvalue > AK74_DEFAULT_AMMO) && (pev->armorvalue < 0))		pev->armorvalue = AK74_DEFAULT_AMMO;		m_iDefaultAmmo = pev->armorvalue;	}	else	m_iDefaultAmmo = AK74_DEFAULT_AMMO;	m_fDefaultAnim = 0;//not really necessary, I guess	FallInit();// get ready to fall down.}
开发者ID:JoelTroch,项目名称:am_src_30jan2011,代码行数:27,


示例17: GenericCyclerSpawn

void CInfoCommentary :: 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;	}	//ignored on subsequent calls	char* szSoundFile = (char*) STRING(pev->message);	if ( !FStringNull( pev->message ) && strlen( szSoundFile ) > 1 )	{		PRECACHE_SOUND(szSoundFile);	}	//ignored on subsequent calls	pev->classname		= MAKE_STRING("info_commentary");	PRECACHE_MODEL( szModel );	SET_MODEL(ENT(pev),	szModel);	CCycler::Spawn( );	UTIL_SetSize(pev, vecMin, vecMax);}
开发者ID:JoelTroch,项目名称:am_src_rebirth,代码行数:26,


示例18: STOP_SOUND

/* <694a5> ../cstrike/dlls/doors.cpp:791 */void CBaseDoor::DoorHitBottom(void){	if (!(pev->spawnflags & SF_DOOR_SILENT))	{		STOP_SOUND(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noiseMoving));		EMIT_SOUND(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noiseArrived), VOL_NORM, ATTN_NORM);	}	assert(m_toggle_state == TS_GOING_DOWN);	m_toggle_state = TS_AT_BOTTOM;	// Re-instate touch method, cycle is complete	if (pev->spawnflags & SF_DOOR_USE_ONLY)	{		// use only door		SetTouch(NULL);	}	else	{		// touchable door		SetTouch(&CBaseDoor::DoorTouch);	}	// this isn't finished	SUB_UseTargets(m_hActivator, USE_TOGGLE, 0);	// Fire the close target (if startopen is set, then "top" is closed) - netname is the close target	if (!FStringNull(pev->netname) && !(pev->spawnflags & SF_DOOR_START_OPEN))	{		FireTargets(STRING(pev->netname), m_hActivator, this, USE_TOGGLE, 0);	}}
开发者ID:Arkshine,项目名称:ReGameDLL_CS,代码行数:33,


示例19: ARRAYSIZE

int CBaseEntity::Restore( CRestore &restore ){	int status;	status = restore.ReadEntVars( "ENTVARS", pev );	if ( status )		status = restore.ReadFields( "BASE", this, m_SaveData, ARRAYSIZE(m_SaveData) );	//LLAPb begin	//Precache script	//if ( status )		//status = restore.ReadScriptVars( "SAMOGON" ... );	//Find function "LOAD", pass args to it, but don't call it!!!	//LLAPb end    if ( pev->modelindex != 0 && !FStringNull(pev->model) )	{		Vector mins, maxs;		mins = pev->mins;	// Set model is about to destroy these		maxs = pev->maxs;		PRECACHE_MODEL( (char *)STRING(pev->model) );		SET_MODEL(ENT(pev), STRING(pev->model));		UTIL_SetSize(pev, mins, maxs);	// Reset them	}	return status;}
开发者ID:mittorn,项目名称:hlwe_src,代码行数:32,


示例20: Use

void CRadiomsg :: Use( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ){	CBaseEntity *pPlayer = UTIL_FindEntityByClassname ( NULL,"player" );	char	txt [256];	sprintf ( txt, STRING(m_iszText));	int		len = strlen ( txt );	MESSAGE_BEGIN( MSG_ONE, gmsgRadioMsg, NULL, pPlayer->pev );		WRITE_COORD ( gpGlobals->time );		WRITE_LONG	( m_iHead );		WRITE_LONG	( len );		for ( int i=0; i<180; i++ ) {			WRITE_BYTE	( txt[i] );	}	MESSAGE_END();	if ( FStringNull ( m_iszSentence ) )		return;//	EMIT_SOUND_SUIT(pPlayer->edict(), STRING(m_iszSentence) );	EMIT_SOUND_DYN(pPlayer->edict(), CHAN_STATIC, STRING(m_iszSentence), 1.0, ATTN_NORM, 0, 100);}
开发者ID:jlecorre,项目名称:hlinvasion,代码行数:32,


示例21: ChangeSub

void CTriggerSubModel :: ChangeSub ( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ){	if ( FStringNull ( pev->target ) )		return;	edict_t *pentTarget = FIND_ENTITY_BY_TARGETNAME ( NULL, STRING(pev->target) );	if ( FNullEnt(pentTarget) )	{		ALERT ( at_console, "CTriggerSubModel : pas d'entite s appelant %s/n", STRING(pev->target) );		return;	}	CBaseEntity *pTarget = Instance( pentTarget );	if ( pTarget->MyMonsterPointer() == NULL )	{		ALERT ( at_console, "CTriggerSubModel : %s n est pas un monstre/n", STRING(pev->target) );		return;	}	CBaseMonster *pMonster = (CBaseMonster*)pTarget;		pMonster->SetBodygroup( m_iBodygroup, m_iSubmodel);}
开发者ID:jlecorre,项目名称:hlinvasion,代码行数:25,


示例22: SetSolidType

void CCineMonster::Spawn( void ){	// SetSolidType( SOLID_TRIGGER );	// SetSize( Vector(-8, -8, -8), Vector(8, 8, 8));	SetSolidType( SOLID_NOT );	// REMOVE: The old side-effect#if 0	if( m_iszIdle )		m_fMoveTo = 4;#endif	// if no targetname, start now	if( !HasTargetname() || !FStringNull( m_iszIdle ) )	{		SetThink( &CCineMonster::CineThink );		SetNextThink( gpGlobals->time + 1.0 );		// Wait to be used?		if( HasTargetname() )			m_startTime = gpGlobals->time + 1E6;	}	if( GetSpawnFlags().Any( SF_SCRIPT_NOINTERRUPT ) )		m_interruptable = false;	else		m_interruptable = true;}
开发者ID:oskarlh,项目名称:HLEnhanced,代码行数:27,


示例23: StartMonster

//=========================================================// StartMonster//=========================================================void CSquadMonster :: StartMonster( void ){    CBaseMonster :: StartMonster();    if ( ( m_afCapability & bits_CAP_SQUAD ) && !InSquad() )    {        if ( !FStringNull( pev->netname ) )        {            // if I have a groupname, I can only recruit if I'm flagged as leader            if ( !( pev->spawnflags & SF_SQUADMONSTER_LEADER ) )            {                return;            }        }        // try to form squads now.        int iSquadSize = SquadRecruit( 1024, 4 );        if ( iSquadSize )        {            ALERT ( at_aiconsole, "Squad of %d %s formed/n", iSquadSize, STRING( pev->classname ) );        }        if ( IsLeader() && FClassnameIs ( pev, "monster_human_grunt" ) )        {            SetBodygroup( 1, 1 ); // UNDONE: truly ugly hack            pev->skin = 0;        }    }}
开发者ID:jlecorre,项目名称:hlinvasion,代码行数:34,


示例24: MAKE_STRING

/*	BOOL				 m_bUspSilAdd;//usp	BOOL				 m_bMp5SilAdd;//mp5	BOOL				 m_bM16SilAdd;//m16*/void CMP5::Spawn( ){	pev->classname = MAKE_STRING("weapon_9mmAR"); // hack to allow for old names	Precache( );	if (!FStringNull (v_model) )	SET_MODEL( ENT(pev), STRING(w_model) );	else	SET_MODEL(ENT(pev), "models/weapons/MP5/w_MP5.mdl");	m_iId = WEAPON_MP5;    m_fDefaultAnim = SILENCER_OFF_FULLAUTO; //to define on startup if the silencer added or not//	m_iDefaultAmmo = 30; //SP: MP5_DEFAULT_GIVE;	if (pev->armorvalue)	{ 		if ((pev->armorvalue > MP5_MAX_CLIP) && (pev->armorvalue < 0))		pev->armorvalue = MP5_MAX_CLIP;		m_iDefaultAmmo = pev->armorvalue;	}	else m_iDefaultAmmo = MP5_DEFAULT_GIVE; //	m_bMp5SilAdd = FALSE;     // Have we been initialised	FallInit();// get ready to fall down.}
开发者ID:JoelTroch,项目名称:am_src_30jan2011,代码行数:36,


示例25: StudioFrameAdvance

void COsprey::FlyThink( void ){	StudioFrameAdvance( );	SetNextThink( 0.1 );	if ( m_pGoalEnt == NULL && !FStringNull(pev->target) )// this monster has a target	{		m_pGoalEnt = UTIL_FindEntityByTargetname( NULL, STRING( pev->target ) );		UpdateGoal( );	}	if (gpGlobals->time > m_startTime + m_dTime)	{		if (m_pGoalEnt->pev->speed == 0)		{			SetThink(&COsprey:: DeployThink );		}		int loopbreaker = 100; //LRC - <slap> don't loop indefinitely!		do {			m_pGoalEnt = UTIL_FindEntityByTargetname( NULL, STRING( m_pGoalEnt->pev->target ) );			loopbreaker--; //LRC		} while (m_pGoalEnt->pev->speed < 400 && !HasDead() && loopbreaker > 0);		UpdateGoal( );	}	Flight( );	ShowDamage( );}
开发者ID:Hammermaps-DEV,项目名称:Spirit-of-Half-Life-1.8--VC2010,代码行数:28,


示例26: ALERT

void CFuncVehicle::Restart(){	ALERT(at_console, "M_speed = %f/n", m_speed);	pev->speed = 0;	pev->velocity = g_vecZero;	pev->avelocity = g_vecZero;	pev->impulse = int(m_speed);	m_dir = 1;	m_flTurnStartTime = -1;	m_flUpdateSound = -1;	m_pDriver = nullptr;	if (FStringNull(pev->target))	{		ALERT(at_console, "Vehicle with no target");	}	UTIL_SetOrigin(pev, pev->oldorigin);	STOP_SOUND(ENT(pev), CHAN_STATIC, (char *)STRING(pev->noise));	NextThink(pev->ltime + 0.1f, FALSE);	SetThink(&CFuncVehicle::Find);}
开发者ID:s1lentq,项目名称:ReGameDLL_CS,代码行数:25,


示例27: CineSpawn

void CLegacyCineMonster :: CineSpawn( char *szModel ){    PRECACHE_MODEL(szModel);    SET_MODEL(ENT(pev), szModel);    UTIL_SetSize(pev, Vector(-16, -16, 0), Vector(16, 16, 64));    pev->solid			= SOLID_SLIDEBOX;    pev->movetype		= MOVETYPE_STEP;    pev->effects		= 0;    pev->health			= 1;    pev->yaw_speed		= 10;    // ugly alpha hack, can't set ints from the bsp.    pev->sequence		= (int)pev->impulse;    ResetSequenceInfo( );    pev->framerate = 0.0;    m_bloodColor = BLOOD_COLOR_RED;    // if no targetname, start now    if ( FStringNull(pev->targetname) )    {        SetThink( &CLegacyCineMonster::CineThink );        pev->nextthink += 1.0;    }}
开发者ID:puzl,项目名称:NS3.2,代码行数:26,


示例28: SET_MODEL

/* <2469b9> ../cstrike/dlls/wpn_shared/wpn_c4.cpp:50 */void CC4::__MAKE_VHOOK(Spawn)(void){	SET_MODEL(edict(), "models/w_backpack.mdl");	pev->frame = 0;	pev->body = 3;	pev->sequence = 0;	pev->framerate = 0;	m_iId = WEAPON_C4;	m_iDefaultAmmo = C4_DEFAULT_GIVE;	m_bStartedArming = false;	m_fArmedTime = 0;	if (!FStringNull(pev->targetname))	{		pev->effects |= EF_NODRAW;		DROP_TO_FLOOR(edict());		return;	}	FallInit();	SetThink(&CBasePlayerItem::FallThink);	pev->nextthink = UTIL_WeaponTimeBase() + 0.1;}
开发者ID:coolmans,项目名称:ReGameDLL_CS,代码行数:27,



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


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