StartControl( )
and add the following to the sub
SET_VIEW( m_pController->edict(), ENT(pev));
This will set the view of the player ( m_pController
) to the view of me. Then go down to StopControl( )
and add the following
SET_VIEW( m_pController->edict(), m_pController->edict());
This should work a treat, then you have a small cosmetic issue. The flash of the gun barrel gets in the way, so go to Fire ( )
and remove or comment out..
if ( m_iszSpriteSmoke )
{
CSprite *pSprite = CSprite::SpriteCreate( STRING(m_iszSpriteSmoke),
barrelEnd, TRUE );
pSprite->AnimateAndDie( RANDOM_FLOAT( 15.0, 20.0 ) );
pSprite->SetTransparency( kRenderTransAlpha, pev->rendercolor.x,
pev->rendercolor.y, pev->rendercolor.z, 255, kRenderFxNone );
pSprite->pev->velocity.z = RANDOM_FLOAT(40, 80);
pSprite->SetScale( m_spriteScale );
}
if ( m_iszSpriteFlash )
{
CSprite *pSprite = CSprite::SpriteCreate( STRING(m_iszSpriteFlash),
barrelEnd, TRUE );
pSprite->AnimateAndDie( 60 );
pSprite->SetTransparency( kRenderTransAdd, 255, 255, 255, 255,
kRenderFxNoDissipation );
pSprite->SetScale( m_spriteScale );
// Hack Hack, make it stick around for at least 100 ms.
pSprite->pev->nextthink += 0.1;
}
Thats it, now compile the dll and admire all your hard work.
You must log in to post a comment. You can login or register a new account.