本文整理汇总了C++中CreateVPhysics函数的典型用法代码示例。如果您正苦于以下问题:C++ CreateVPhysics函数的具体用法?C++ CreateVPhysics怎么用?C++ CreateVPhysics使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CreateVPhysics函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Precache
void CNewRecharge::Spawn()
{
Precache( );
SetMoveType( MOVETYPE_NONE );
SetSolid( SOLID_VPHYSICS );
CreateVPhysics();
SetModel( HEALTH_CHARGER_MODEL_NAME );
AddEffects( EF_NOSHADOW );
ResetSequence( LookupSequence( "idle" ) );
SetInitialCharge();
UpdateJuice( MaxJuice() );
m_nState = 0;
m_iCaps = FCAP_CONTINUOUS_USE;
CreateVPhysics();
m_flJuice = m_iJuice;
m_iReactivate = 0;
SetCycle( 1.0f - ( m_flJuice / MaxJuice() ) );
}
示例2: Precache
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CNewWallHealth::Spawn(void)
{
Precache( );
SetMoveType( MOVETYPE_NONE );
SetSolid( SOLID_VPHYSICS );
CreateVPhysics();
SetModel( HEALTH_CHARGER_MODEL_NAME );
AddEffects( EF_NOSHADOW );
ResetSequence( LookupSequence( "idle" ) );
m_iJuice = sk_healthcharger.GetInt();
m_nState = 0;
m_iReactivate = 0;
m_iCaps = FCAP_CONTINUOUS_USE;
CreateVPhysics();
m_flJuice = m_iJuice;
SetCycle( 1.0f - ( m_flJuice / sk_healthcharger.GetFloat() ) );
}
示例3: Precache
//------------------------------------------------
// Spawn
//------------------------------------------------
void CPropCannon::Spawn( void )
{
Precache();
SetModel( STRING( GetModelName() ) );
SetCollisionGroup( COLLISION_GROUP_VEHICLE );
BaseClass::Spawn();
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_SOLID );
SetMoveType( MOVETYPE_NOCLIP );
m_takedamage = DAMAGE_EVENTS_ONLY;
m_takedamage = DAMAGE_EVENTS_ONLY;
m_flTurn = 0;
m_flExtension = 0;
m_flFlyTime = 0.0f;
m_flNextAttackTime = gpGlobals->curtime;
InitCannonSpeeds();
SetPoseParameter( "armextensionpose", m_flExtension );
CreateVPhysics();
SetNextThink( gpGlobals->curtime );
}
示例4: Precache
//------------------------------------------------
// Spawn
//------------------------------------------------
void CPropCrane::Spawn( void )
{
Precache();
SetModel( STRING( GetModelName() ) );
SetCollisionGroup( COLLISION_GROUP_VEHICLE );
BaseClass::Spawn();
SetSolid( SOLID_BBOX );
AddSolidFlags( FSOLID_NOT_SOLID );
SetMoveType( MOVETYPE_NOCLIP );
m_takedamage = DAMAGE_EVENTS_ONLY;
m_flTurn = 0;
m_flExtension = 0;
m_flNextDangerSoundTime = 0;
m_flNextCreakSound = 0;
m_flNextDropAllowedTime = 0;
m_flSlowRaiseTime = 0;
m_bDropping = false;
m_bMagnetOn = false;
InitCraneSpeeds();
SetPoseParameter( "armextensionpose", m_flExtension );
CreateVPhysics();
SetNextThink( gpGlobals->curtime );
}
示例5: CreateVPhysics
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CNPC_Furniture::OnRestore( void )
{
// Recreate any bone followers we have
CreateVPhysics();
BaseClass::OnRestore();
}
示例6: Precache
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void Dota_Resupply::Spawn( void )
{
Precache();
BaseClass::Spawn();
SetModel( STRING( GetModelName() ) );
SetMoveType( MOVETYPE_NONE );
SetSolid( SOLID_VPHYSICS );
CreateVPhysics();
ResetSequence( LookupSequence( "Idle" ) );
SetBodygroup( 1, true );
m_flCloseTime = gpGlobals->curtime;
m_flAnimTime = gpGlobals->curtime;
m_flPlaybackRate = 0.0;
SetCycle( 0 );
m_takedamage = DAMAGE_EVENTS_ONLY;
// Issue #28: JMS - 2013-10-12 - ammobox needs to fire a new modevent letting all clients know that one is spawned
IGameEvent *pEvent = gameeventmanager->CreateEvent( "ammobox_spawn" );
if ( pEvent )
{
pEvent->SetInt( "entindex", entindex() );
gameeventmanager->FireEvent( pEvent );
}
}
示例7: 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);
}
}
示例8: SetMoveType
void CFuncBrush::Spawn( void )
{
SetMoveType( MOVETYPE_PUSH ); // so it doesn't get pushed by anything
SetSolid( SOLID_VPHYSICS );
AddEFlags( EFL_USE_PARTITION_WHEN_NOT_SOLID );
if ( m_iSolidity == BRUSHSOLID_NEVER )
{
AddSolidFlags( FSOLID_NOT_SOLID );
}
SetModel( STRING( GetModelName() ) );
if ( m_iDisabled )
TurnOff();
// If it can't move/go away, it's really part of the world
if ( !GetEntityName() || !m_iParent )
AddFlag( FL_WORLDBRUSH );
CreateVPhysics();
// Slam the object back to solid - if we really want it to be solid.
if ( m_bSolidBsp )
{
SetSolid( SOLID_BSP );
}
}
示例9: SetModel
void CFunc_LOD::Spawn()
{
// Bind to our bmodel.
SetModel( STRING( GetModelName() ) );
SetSolid( SOLID_BSP );
BaseClass::Spawn();
CreateVPhysics();
}
示例10: Precache
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CGrenadeHopwire::Spawn( void )
{
Precache();
SetModel( GRENADE_MODEL_CLOSED );
SetCollisionGroup( COLLISION_GROUP_PROJECTILE );
CreateVPhysics();
}
示例11: Precache
//------------------------------------------------------------------------------
// Purpose:
//------------------------------------------------------------------------------
void CPlayer_Control::Spawn( void )
{
Precache();
SetFriction( 0.55 ); // deading the bounce a bit
m_bActive = false;
CreateVPhysics();
}
示例12: Precache
void CArmorPiece::Spawn(void)
{
BaseClass::Spawn();
Precache();
SetModel(STRING(GetModelName()));
CreateVPhysics();
}
示例13: SetClassname
void CReplayBall::Spawn( void )
{
SetClassname("replay_ball");
Precache();
SetModelName(MAKE_STRING(BALL_MODEL));
CreateVPhysics();
//SetSolid(SOLID_NONE);
SetSimulatedEveryTick(true);
SetAnimatedEveryTick(true);
}
示例14: Precache
void CNPCWheatleyBoss::Spawn(void)
{
Precache();
SetModel(BOSS_MODEL);
SetSolid(SOLID_VPHYSICS);
CreateVPhysics();
BaseClass::Spawn();
}
示例15: SetMoveType
void CFuncVPhysicsClip::Spawn( void )
{
SetMoveType( MOVETYPE_PUSH ); // so it doesn't get pushed by anything
SetSolid( SOLID_VPHYSICS );
AddSolidFlags( FSOLID_NOT_SOLID );
SetModel( STRING( GetModelName() ) );
AddEffects( EF_NODRAW );
CreateVPhysics();
VPhysicsGetObject()->EnableCollisions( !m_bDisabled );
}