From Valve Developer Community
Revision as of 06:58, 22 July 2006 by Ts2do (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

void C_BaseEntity::FollowEntity( CBaseEntity *pBaseEntity, bool bBoneMerge = true )

This function is used to control the parent of this entity.

FollowEntity( NULL )

This call makes this entity stop following its parent.

FollowEntity( pBaseEntity )

This call sets this entity's parent to pBaseEntity; it also zeroes this entity's origin and angles, sets its move type to MOVETYPE_NONE and adds the solid flag FSOLID_NOT_SOLID.

FollowEntity( pBaseEntity, false )

The only difference between the settings of bBoneMerge is having it set to false makes this entity not follow pBaseEntity's animations. This is the call to use if the entity should be in a static position relative to pBaseEntity.