本文整理汇总了C++中SetBloodColor函数的典型用法代码示例。如果您正苦于以下问题:C++ SetBloodColor函数的具体用法?C++ SetBloodColor怎么用?C++ SetBloodColor使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetBloodColor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Precache
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CZombie::Spawn( void )
{
Precache();
if( FClassnameIs( this, "npc_zombie" ) )
{
m_fIsTorso = false;
}
else
{
// This was placed as an npc_zombie_torso
m_fIsTorso = true;
}
m_fIsHeadless = false;
#ifdef HL2_EPISODIC
SetBloodColor( BLOOD_COLOR_ZOMBIE );
#else
SetBloodColor( BLOOD_COLOR_GREEN );
#endif // HL2_EPISODIC
m_iHealth = sk_zombie_health.GetFloat();
m_flFieldOfView = 0.2;
CapabilitiesClear();
//GetNavigator()->SetRememberStaleNodes( false );
BaseClass::Spawn();
m_flNextMoanSound = gpGlobals->curtime + random->RandomFloat( 1.0, 4.0 );
}
示例2: Precache
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void CRebelZombie::Spawn( void )
{
Precache();
m_fIsHeadless = false;
m_iRebelZombieSkin = random->RandomInt(1,4);
#ifdef HL2_EPISODIC
SetBloodColor( BLOOD_COLOR_ZOMBIE );
#else
SetBloodColor( BLOOD_COLOR_GREEN );
#endif // HL2_EPISODIC
m_iHealth = sk_rebel_zombie_health.GetFloat();
m_flFieldOfView = 0.2;
CapabilitiesClear();
CapabilitiesAdd( bits_CAP_USE_WEAPONS );
CapabilitiesAdd( bits_CAP_MOVE_SHOOT );
//GetNavigator()->SetRememberStaleNodes( false );
BaseClass::Spawn();
m_flNextMoanSound = gpGlobals->curtime + random->RandomFloat( 1.0, 4.0 );
}
示例3: Precache
void CNPC_Zombine::Spawn( void )
{
Precache();
m_fIsTorso = false;
m_fIsHeadless = false;
#ifdef HL2_EPISODIC
SetBloodColor( BLOOD_COLOR_ZOMBIE );
#else
SetBloodColor( BLOOD_COLOR_GREEN );
#endif // HL2_EPISODIC
m_iHealth = sk_zombie_soldier_health.GetFloat();
SetMaxHealth( m_iHealth );
m_flFieldOfView = 0.2;
CapabilitiesClear();
BaseClass::Spawn();
m_flSprintTime = 0.0f;
m_flSprintRestTime = 0.0f;
m_flNextMoanSound = gpGlobals->curtime + random->RandomFloat( 1.0, 4.0 );
g_flZombineGrenadeTimes = gpGlobals->curtime;
m_flGrenadePullTime = gpGlobals->curtime;
m_iGrenadeCount = ZOMBINE_MAX_GRENADES;
}
示例4: RandomSkin
void CZombie::Spawn( void )
{
if(FClassnameIs( this, "npc_zombie_bisou"))
{
m_iZombieType = ZOMBIE_BISOU;
this->m_nSkin = RandomSkin();
}
else
m_iZombieType = ZOMBIE_EPICE;
Precache();
m_fIsTorso = false;
m_fIsHeadless = false;
SetBloodColor( BLOOD_COLOR_RED );
//La vie initiale du zombie peut varier
if(m_iZombieType == ZOMBIE_BISOU)
m_iHealth = sk_zombie_bisou_health.GetInt() + sk_zombie_bisou_health.GetInt() * RandomFloat(-0.10f, 0.10f);
else
m_iHealth = sk_zombie_health.GetInt() + sk_zombie_health.GetInt() * RandomFloat(-0.10f, 0.10f);
m_flFieldOfView = 0.2;
CapabilitiesClear();
//GetNavigator()->SetRememberStaleNodes( false );
BaseClass::Spawn();
m_flNextMoanSound = gpGlobals->curtime + random->RandomFloat( 1.0, 4.0 );
}
示例5: Precache
//=========================================================
// Spawn()
// Crear un nuevo
//=========================================================
void CNPC_Scient::Spawn()
{
Precache();
// Modelo y color de sangre.
SetModel(MODEL_BASE);
SetBloodColor(BLOOD);
// Tamaño
SetHullType(HULL_WIDE_SHORT);
SetHullSizeNormal();
// Navegación, estado físico y opciones extra.
SetSolid(SOLID_BBOX);
SetNavType(NAV_GROUND);
AddSolidFlags(FSOLID_NOT_STANDABLE);
SetMoveType(MOVETYPE_STEP);
SetRenderColor(255, 255, 255, 255);
SetDistLook(SEE_DIST);
// Reseteo de variables.
// Salud, estado del NPC y vista.
m_iHealth = sk_scient_health.GetFloat();
m_NPCState = NPC_STATE_NONE;
m_flFieldOfView = FOV;
// Capacidades
CapabilitiesClear();
CapabilitiesAdd(CAPABILITIES);
NPCInit();
BaseClass::Spawn();
}
示例6: Precache
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CNPC_Bug_Warrior::Spawn( void )
{
Precache();
SetModel( BUG_WARRIOR_MODEL );
SetHullType(HULL_WIDE_HUMAN);//HULL_WIDE_SHORT;
SetHullSizeNormal();
SetDefaultEyeOffset();
SetViewOffset( (WorldAlignMins() + WorldAlignMaxs()) * 0.5 ); // See from my center
SetDistLook( 1024.0 );
SetNavType(NAV_GROUND);
m_NPCState = NPC_STATE_NONE;
SetBloodColor( BLOOD_COLOR_YELLOW );
m_iHealth = npc_bug_warrior_health.GetFloat();
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_STANDABLE );
SetMoveType( MOVETYPE_STEP );
m_iszPatrolPathName = NULL_STRING;
// Only do this if a squadname appears in the entity
if ( m_SquadName != NULL_STRING )
{
CapabilitiesAdd( bits_CAP_SQUAD );
}
CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_INNATE_MELEE_ATTACK1 );
NPCInit();
BaseClass::Spawn();
}
示例7: Precache
//-----------------------------------------------------------------------------
// Purpose: This used to have something to do with bees flying, but
// now it only initializes moving furniture in scripted sequences
//-----------------------------------------------------------------------------
void CNPC_Furniture::Spawn( )
{
Precache();
SetModel( STRING(GetModelName()) );
SetMoveType( MOVETYPE_STEP );
SetSolid( SOLID_BBOX );
// Our collision, if needed, will be done through bone followers
AddSolidFlags( FSOLID_NOT_SOLID );
SetBloodColor( DONT_BLEED );
m_iHealth = TOO_MUCH_HEALTH_TO_DIE; //wow
m_takedamage = DAMAGE_AIM;
SetSequence( 0 );
SetCycle( 0 );
SetNavType( NAV_FLY );
AddFlag( FL_FLY );
CapabilitiesAdd( bits_CAP_MOVE_FLY | bits_CAP_TURN_HEAD | bits_CAP_ANIMATEDFACE );
AddEFlags( EFL_NO_MEGAPHYSCANNON_RAGDOLL );
// pev->nextthink += 1.0;
// SetThink (WalkMonsterDelay);
ResetSequenceInfo( );
SetCycle( 0 );
NPCInit();
// Furniture needs to block LOS
SetBlocksLOS( true );
}
示例8: Spawn
//-----------------------------------------------------------------------------
// Spawn
//-----------------------------------------------------------------------------
void CNPC_Eli :: Spawn()
{
Precache();
BaseClass::Spawn();
SetModel( "models/eli.mdl" );
SetHullType(HULL_HUMAN);
SetHullSizeNormal();
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_STANDABLE );
SetMoveType( MOVETYPE_STEP );
SetBloodColor( BLOOD_COLOR_RED );
m_iHealth = 8;
m_flFieldOfView = 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
m_NPCState = NPC_STATE_NONE;
CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );
NPCInit();
Relink();
}
示例9: Precache
//-----------------------------------------------------------------------------
// Purpose:
//
//
//-----------------------------------------------------------------------------
void CGoat::Spawn( void )
{
Precache();
SetModel( GOAT_MODEL );
SetHullType(HULL_MEDIUM);
SetHullSizeNormal();
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_STANDABLE );
SetMoveType( MOVETYPE_STEP );
SetBloodColor( BLOOD_COLOR_RED );
m_iHealth = sk_goat_health.GetFloat();
// m_iMaxHealth = m_iHealth;
m_flFieldOfView = 0.5; // indicates the width of this NPC's forward view cone ( as a dotproduct result )
m_NPCState = NPC_STATE_NONE;
CapabilitiesClear();
CapabilitiesAdd( bits_CAP_TURN_HEAD | bits_CAP_MOVE_GROUND );
// innate Range attack ( howling / shaking)
CapabilitiesAdd( bits_CAP_INNATE_RANGE_ATTACK1 | bits_CAP_INNATE_RANGE_ATTACK2 );
// innate Melee attack ( charge+head attack / bite attack (from fish bite or byte missed with event )
CapabilitiesAdd( bits_CAP_INNATE_MELEE_ATTACK1 | bits_CAP_INNATE_MELEE_ATTACK2 );
BaseClass::Spawn();
}
示例10: Precache
//=========================================================
// Spawn
//=========================================================
void CNPC_Houndeye::Spawn()
{
Precache( );
SetModel("models/houndeye.mdl");
SetHullType(HULL_WIDE_SHORT);
SetHullSizeNormal();
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_STANDABLE );
SetMoveType( MOVETYPE_STEP );
SetBloodColor( BLOOD_COLOR_YELLOW );
m_iHealth = sk_Houndeye_health.GetFloat();
m_flFieldOfView = 0.5;// indicates the width of this monster's forward view cone ( as a dotproduct result )
m_NPCState = NPC_STATE_NONE;
m_fAsleep = false; // everyone spawns awake
m_fDontBlink = false;
CapabilitiesAdd( bits_CAP_SQUAD );
CapabilitiesAdd( bits_CAP_MOVE_GROUND );
CapabilitiesAdd( bits_CAP_INNATE_RANGE_ATTACK1 );
CapabilitiesAdd( bits_CAP_TURN_HEAD );
m_flNextSecondaryAttack = 0;
m_bLoopClockwise = random->RandomInt(0,1) ? true : false;
m_pEnergyWave = NULL;
m_flEndEnergyWaveTime = 0;
SetCollisionGroup( HL2COLLISION_GROUP_HOUNDEYE );
NPCInit();
}
示例11: Precache
void CPhysicsCannister::Spawn( void )
{
Precache();
SetModel( STRING(GetModelName()) );
SetBloodColor( DONT_BLEED );
AddSolidFlags( FSOLID_CUSTOMRAYTEST );
m_takedamage = DAMAGE_YES;
SetNextThink( TICK_NEVER_THINK );
if ( m_iHealth <= 0 )
m_iHealth = 25;
m_flAnimTime = gpGlobals->curtime;
m_flPlaybackRate = 0.0;
SetCycle( 0 );
m_bFired = false;
// not thrusting
m_active = false;
CreateVPhysics();
if ( !VPhysicsGetObject() )
{
// must have a physics object or code will crash later
UTIL_Remove(this);
}
}
示例12: GetModelName
//-----------------------------------------------------------------------------
// Spawn
//-----------------------------------------------------------------------------
void CNPC_Kleiner::Spawn()
{
// Allow custom model usage (mostly for monitors)
char *szModel = (char *)STRING( GetModelName() );
if (!szModel || !*szModel)
{
szModel = "models/kleiner.mdl";
SetModelName( AllocPooledString(szModel) );
}
Precache();
SetModel( szModel );
BaseClass::Spawn();
SetHullType(HULL_HUMAN);
SetHullSizeNormal();
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_STANDABLE );
SetMoveType( MOVETYPE_STEP );
SetBloodColor( BLOOD_COLOR_RED );
m_iHealth = 8;
m_flFieldOfView = 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
m_NPCState = NPC_STATE_NONE;
CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );
CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );
AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL | EFL_NO_PHYSCANNON_INTERACTION );
NPCInit();
}
示例13: Precache
//-----------------------------------------------------------------------------
// Purpose:
//
//
//-----------------------------------------------------------------------------
void CNPC_Blob::Spawn( void )
{
Precache();
SetModel( NPC_BLOB_MODEL );
SetHullType(HULL_TINY);
SetHullSizeNormal();
SetSolid( SOLID_NONE );
AddSolidFlags( FSOLID_NOT_STANDABLE );
SetMoveType( MOVETYPE_STEP );
SetBloodColor( BLOOD_COLOR_RED );
m_iHealth = INT_MAX;
m_flFieldOfView = -1.0f;
m_NPCState = NPC_STATE_NONE;
CapabilitiesClear();
CapabilitiesAdd( bits_CAP_MOVE_GROUND );
m_Elements.RemoveAll();
NPCInit();
AddEffects( EF_NODRAW );
m_flMinElementDist = blob_mindist.GetFloat();
}
示例14: Precache
//-----------------------------------------------------------------------------
// Spawn
//-----------------------------------------------------------------------------
void CNPC_GMan::Spawn()
{
Precache();
BaseClass::Spawn();
SetModel( "models/gman.mdl" );
SetHullType(HULL_HUMAN);
SetHullSizeNormal();
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_STANDABLE );
SetMoveType( MOVETYPE_STEP );
SetBloodColor( BLOOD_COLOR_RED );
m_iHealth = 8;
m_flFieldOfView = 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
m_NPCState = NPC_STATE_NONE;
SetImpactEnergyScale( 0.0f ); // no physics damage on the gman
CapabilitiesAdd( bits_CAP_MOVE_GROUND | bits_CAP_OPEN_DOORS | bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );
CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );
AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL );
NPCInit();
}
示例15: Precache
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CNPC_Monk::Spawn()
{
Precache();
BaseClass::Spawn();
SetModel( "models/Monk.mdl" );
SetHullType(HULL_HUMAN);
SetHullSizeNormal();
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_STANDABLE );
SetMoveType( MOVETYPE_STEP );
SetBloodColor( BLOOD_COLOR_RED );
m_iHealth = 100;
m_flFieldOfView = m_flFieldOfView = -0.707; // 270`
m_NPCState = NPC_STATE_NONE;
m_HackedGunPos = Vector ( 0, 0, 55 );
CapabilitiesAdd( bits_CAP_TURN_HEAD | bits_CAP_DOORS_GROUP | bits_CAP_MOVE_GROUND );
CapabilitiesAdd( bits_CAP_USE_WEAPONS );
CapabilitiesAdd( bits_CAP_ANIMATEDFACE );
CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );
CapabilitiesAdd( bits_CAP_AIM_GUN );
CapabilitiesAdd( bits_CAP_MOVE_SHOOT );
NPCInit();
}