Hey,
I'm trying to render a simple model over a weapon spawn. It doesn't needs
any collissions or such, just being visible. I'm using this code, called
on Spawn() of the weapon spawner :
in header:
CBaseAnimating pWeaponModel;
in cpp:
//Weapon model display code goes here
void CWeaponSpawner::CreateWeaponModel( void )
{
// Create the object in the physics system
int nSolidFlags = GetSolidFlags() | FSOLID_NOT_SOLID |
FSOLID_NOT_STANDABLE | FSOLID_TRIGGER;
PrecacheModel( pWeaponPath );
pWeaponModel.Spawn();
pWeaponModel.SetModel( pWeaponPath );
pWeaponModel.SetMoveType( MOVETYPE_NONE );
pWeaponModel.SetSolid( SOLID_BBOX );
pWeaponModel.VPhysicsInitStatic();
pWeaponModel.AddSolidFlags( nSolidFlags );
pWeaponModel.SetAbsOrigin( GetAbsOrigin() + Vector( 0, 5 , 0) );
pWeaponModel.SetAbsAngles( GetAbsAngles() );
pWeaponModel.FollowEntity( this, "weapon_bone" ); // attach to player
model
pWeaponModel.RemoveEffects( EF_NODRAW);
}
However, nothing is drawn. The CBaseAnimating entity is shown in the
cl_showents.
An ideas?
Cheers,
Emiel Regis
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders