MoD
Newbie
- Joined
- May 16, 2003
- Messages
- 202
- Reaction score
- 0
Inspiration
being a newbie coder as I am, it took me a lot of trial and error, and eventually hellcat_ from #hl2coding figured it out for me, still was a fun project...
being a newbie coder as I am, it took me a lot of trial and error, and eventually hellcat_ from #hl2coding figured it out for me, still was a fun project...
Code:
//-----------------------------------------------------------------------------
// Purpose:
// Input : *pObject -
//-----------------------------------------------------------------------------
bool CWeaponPhysCannon::AttachObject( CBaseEntity *pObject, const Vector &vPosition )
{
...
...
...
// make it 50% transparent - MoD
pObject->m_nRenderMode = kRenderTransColor;
pObject->SetRenderColor( 255, 255, 255, 128 );
pObject->m_nRenderFX = kRenderFxNone; ;
return true;
}
Code:
void CWeaponPhysCannon::DetachObject( bool playSound, bool wasLaunched )
{
...
...
...
// MoD - make it visible again
pObject->m_nRenderMode = kRenderNormal;
pObject->SetRenderColor( 255, 255, 255, 255 );
pObject->m_nRenderFX = kRenderFxNone; ;
}