本文整理汇总了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);
}
示例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
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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 );
}
}
示例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;
}
示例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));
}
示例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
}
示例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;
}
示例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 );
}
示例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();
}
示例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();
}
示例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;
}