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


C++ UTIL_SetSize函数代码示例

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


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

示例1: Warning

void CCycler::GenericCyclerSpawn(char *szModel, Vector vecMin, Vector vecMax)
{
	if (!szModel || !*szModel)
	{
		Warning( "cycler at %.0f %.0f %0.f missing modelname\n", GetAbsOrigin().x, GetAbsOrigin().y, GetAbsOrigin().z );
		UTIL_Remove( this );
		return;
	}

	PrecacheModel( szModel );
	SetModel( szModel );

	m_bloodColor = DONT_BLEED;

	CCycler::Spawn( );

	UTIL_SetSize(this, vecMin, vecMax);
}
开发者ID:paralin,项目名称:hl2sdk,代码行数:18,代码来源:h_cycler.cpp

示例2: UTIL_SetOrigin

void AvHBasePlayerWeapon::Spawn()
{
	CBasePlayerWeapon::Spawn();

	this->pev->solid = SOLID_BBOX;
	this->pev->movetype = MOVETYPE_TOSS;
	UTIL_SetOrigin(this->pev, this->pev->origin);
	UTIL_SetSize(this->pev, kMarineItemMinSize, kMarineItemMaxSize);
	
	this->pev->iuser3 = AVH_USER3_MARINEITEM;

	#ifdef AVH_SERVER
	if(!this->GetIsPersistent())
	{
		this->mLifetime = AvHSUGetWeaponStayTime();
	}
	#endif
}
开发者ID:Arkshine,项目名称:NS,代码行数:18,代码来源:AvHBasePlayerWeapon.cpp

示例3: Precache

//=========================================================
// Spawn
//=========================================================
void CBloater::Spawn()
{
    Precache();

    SET_MODEL(ENT(pev), "models/floater.mdl");
    UTIL_SetSize(pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX);

    pev->solid    = SOLID_SLIDEBOX;
    pev->movetype = MOVETYPE_FLY;
    pev->spawnflags |= FL_FLY;
    m_bloodColor    = BLOOD_COLOR_GREEN;
    pev->health     = 40;
    pev->view_ofs   = VEC_VIEW; // position of the eyes relative to monster's origin.
    m_flFieldOfView = 0.5;      // indicates the width of this monster's forward view cone ( as a dotproduct result )
    m_MonsterState  = MONSTERSTATE_NONE;

    MonsterInit();
}
开发者ID:Sh1ft0x0EF,项目名称:HLSDKRevamp,代码行数:21,代码来源:bloater.cpp

示例4: UTIL_SetSize

void CFuncMachinegun::RealReSpawn( void )
{
	pev->armorvalue = pev->armortype;
	pev->health 	= pev->max_health;
	pev->takedamage = DAMAGE_AIM;
	pev->movetype	= MOVETYPE_FLY;
	pev->solid	= SOLID_BBOX;
	pev->angles.x	= 0;
	pev->renderfx 	= 51;
	pev->origin 	= pev->oldorigin;
	pev->effects 	= 0;
	m_iAmmo         = pev->weapons;
	UTIL_SetSize( pev, Vector(-25,-25,0), Vector(25,25,35));

	ResetSequenceInfo();
	m_fSequenceLoops = TRUE;
	InitBoneControllers();
}
开发者ID:mittorn,项目名称:hlwe_src,代码行数:18,代码来源:func_turret.cpp

示例5: Spawn

//=========================================================
// Spawn
//=========================================================
void CZombie :: Spawn()
{
	Precache( );

	SET_MODEL(ENT(pev), "models/zombie.mdl");
	UTIL_SetSize( pev, VEC_HUMAN_HULL_MIN, VEC_HUMAN_HULL_MAX );

	pev->solid			= SOLID_SLIDEBOX;
	pev->movetype		= MOVETYPE_STEP;
	m_bloodColor		= BLOOD_COLOR_GREEN;
	pev->health			= gSkillData.zombieHealth;
	pev->view_ofs		= VEC_VIEW;// position of the eyes relative to monster's origin.
	m_flFieldOfView		= 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result )
	m_MonsterState		= MONSTERSTATE_NONE;
	m_afCapability		= bits_CAP_DOORS_GROUP;

	MonsterInit();
}
开发者ID:Solexid,项目名称:halflife,代码行数:21,代码来源:zombie.cpp

示例6: Precache

void CMiniTurret::Spawn()
{ 
	Precache( );
	SET_MODEL(ENT(pev), "models/miniturret.mdl");
	pev->health			= gSkillData.miniturretHealth;
	m_HackedGunPos		= Vector( (float)0, (float)0, (float)12.75 );
	m_flMaxSpin = 0;
	pev->view_ofs.z = 12.75;

	CBaseTurret::Spawn( );
	m_iRetractHeight = 16;
	m_iDeployHeight = 32;
	m_iMinPitch	= -15;
	UTIL_SetSize(pev, Vector(-16, -16, -m_iRetractHeight), Vector(16, 16, m_iRetractHeight));

	SetThink(&CMiniTurret::Initialize);	
	pev->nextthink = gpGlobals->time + 0.3; 
}
开发者ID:Arkshine,项目名称:NS,代码行数:18,代码来源:turret.cpp

示例7: SetSolid

void CRagGib::Spawn( const char *szModel, const Vector &vecOrigin, const Vector &vecForce, float flFadeTime = 0.0 )
{
	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_NOT_SOLID );
	SetModel( szModel );
	UTIL_SetSize(this, vec3_origin, vec3_origin);
	UTIL_SetOrigin( this, vecOrigin );
	if ( !BecomeRagdollOnClient( vecForce ) )
	{
		AddSolidFlags( FSOLID_NOT_STANDABLE );
		RemoveSolidFlags( FSOLID_NOT_SOLID );
	}

	if( flFadeTime > 0.0 )
	{
		SUB_StartFadeOut( flFadeTime );
	}
}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:18,代码来源:gib.cpp

示例8: Precache

void CWeapon_SLAM::Spawn( )
{
	BaseClass::Spawn();

	Precache( );

	UTIL_SetSize(this, Vector(-4,-4,-2),Vector(4,4,2));

	FallInit();// get ready to fall down

	SetThink( NULL );

	m_tSlamState		= SLAM_TRIPMINE_READY;
	m_flWallSwitchTime	= 0;

	// Give 1 piece of default ammo when first picked up
	m_iClip2 = 1;
}
开发者ID:DreikVal,项目名称:nicksproject,代码行数:18,代码来源:weapon_slam.cpp

示例9: 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

示例10: Precache

void CXenHair::Spawn( void )
{
	Precache();
	SET_MODEL( edict(), "models/hair.mdl" );
	UTIL_SetSize( pev, Vector(-4,-4,0), Vector(4,4,32));
	pev->sequence = 0;
	
	if ( !(pev->spawnflags & SF_HAIR_SYNC) )
	{
		pev->frame = RANDOM_FLOAT(0,255);
		pev->framerate = RANDOM_FLOAT( 0.7, 1.4 );
	}
	ResetSequenceInfo( );

	pev->solid = SOLID_NOT;
	pev->movetype = MOVETYPE_NONE;
	pev->nextthink = gpGlobals->time + RANDOM_FLOAT( 0.1, 0.4 );	// Load balance these a bit
}
开发者ID:Arkshine,项目名称:NS,代码行数:18,代码来源:xen.cpp

示例11: 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:ET-NiK,项目名称:amxxgroup,代码行数:19,代码来源:bigmomma.cpp

示例12: SetMoveType

//-----------------------------------------------------------------------------
// Purpose: Setup basic values for Thrown grens
//-----------------------------------------------------------------------------
void CThrownGrenade::Spawn( void )
{
	// point sized, solid, bouncing
	SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_BOUNCE );
	SetSolid( SOLID_BBOX );
	UTIL_SetSize(this, vec3_origin, vec3_origin);

	// Movement
	SetGravity( UTIL_ScaleForGravity( 648 ) );
	SetFriction(0.6);
	QAngle angles;
	VectorAngles( GetAbsVelocity(), angles );
	SetLocalAngles( angles );
	QAngle vecAngVel( random->RandomFloat ( -100, -500 ), 0, 0 );
	SetLocalAngularVelocity( vecAngVel );
	
	SetTouch( &CThrownGrenade::BounceTouch );
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:21,代码来源:grenadethrown.cpp

示例13: Spawn

//=========================================================
// Spawn
//=========================================================
void CController :: Spawn()
{
	Precache( );

	SET_MODEL(ENT(pev), "models/controller.mdl");
	UTIL_SetSize( pev, Vector( -32, -32, 0 ), Vector( 32, 32, 64 ));

	pev->solid			= SOLID_SLIDEBOX;
	pev->movetype		= MOVETYPE_FLY;
	pev->flags			|= FL_FLY;
	m_bloodColor		= BLOOD_COLOR_GREEN;
	pev->health			= gSkillData.controllerHealth;
	pev->view_ofs		= Vector( 0, 0, -2 );// position of the eyes relative to monster's origin.
	m_flFieldOfView		= VIEW_FIELD_FULL;// indicates the width of this monster's forward view cone ( as a dotproduct result )
	m_MonsterState		= MONSTERSTATE_NONE;

	MonsterInit();
}
开发者ID:NonPIayerCharacter,项目名称:hlsdk-xash3d,代码行数:21,代码来源:controller.cpp

示例14: Spawn

//=========================================================
// Spawn
//=========================================================
void CRat :: Spawn()
{
    Precache( );

    SET_MODEL(ENT(pev), "models/bigrat.mdl");
    //SET_MODEL(ENT(pev), "models/w_isotopebox.mdl");
    UTIL_SetSize( pev, Vector( 0, 0, 0 ), Vector( 0, 0, 0 ) );

    pev->solid			= SOLID_SLIDEBOX;
    pev->movetype		= MOVETYPE_STEP;
    m_bloodColor		= BLOOD_COLOR_RED;
    pev->health			= 8;
    pev->view_ofs		= Vector ( 0, 0, 6 );// position of the eyes relative to monster's origin.
    m_flFieldOfView		= 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result )
    m_MonsterState		= MONSTERSTATE_NONE;

    MonsterInit();
}
开发者ID:jlecorre,项目名称:hlinvasion,代码行数:21,代码来源:rat.cpp

示例15: Spawn

void COsprey :: Spawn( void )
{
	Precache( );
	// motor
	pev->movetype = MOVETYPE_FLY;
	pev->solid = SOLID_BBOX;

	if (pev->model)
		SET_MODEL(ENT(pev), STRING(pev->model)); //LRC
	else
		SET_MODEL(ENT(pev), "models/osprey.mdl");
	UTIL_SetSize(pev, Vector( -400, -400, -100), Vector(400, 400, 32));
	UTIL_SetOrigin( this, pev->origin );

	//ALERT(at_console, "Osprey origin %f %f %f\n", pev->origin.x, pev->origin.y, pev->origin.z);

	pev->flags |= FL_MONSTER;
	pev->takedamage		= DAMAGE_YES;
	m_flRightHealth		= 200;
	m_flLeftHealth		= 200;
	pev->health			= 400;

	pev->speed = 80; //LRC - default speed, in case path corners don't give a speed.

	m_flFieldOfView = 0; // 180 degrees

	pev->sequence = 0;
	ResetSequenceInfo( );
	pev->frame = RANDOM_LONG(0,0xFF);

	InitBoneControllers();

	SetThink(&COsprey :: FindAllThink );
	SetUse(&COsprey :: CommandUse );

	if (!(pev->spawnflags & SF_WAITFORTRIGGER))
	{
		SetNextThink( 1.0 );
	}

	m_pos2 = pev->origin;
	m_ang2 = pev->angles;
	m_vel2 = pev->velocity;
}
开发者ID:Hammermaps-DEV,项目名称:Spirit-of-Half-Life-1.8--VC2010,代码行数:44,代码来源:npc_osprey.cpp


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