CBasePlayer *pOwner = ToBasePlayer( /*--*/ );
to

CBasePlayer *pOwner = this;

Should work, if I understand the problem.

2009/4/20 Jean Marcel Knapp dos Santos <[email protected]>

> Hi, I'm Xblah, and I'm the programmer of Offline: Source. I'm trying
> to build a corner-shot system. The player just leans the screen, so he
> has better cover.
>
> This is what I coded into void CHL2_Player::ItemPostFrame()
>
>        CBasePlayer *pOwner = ToBasePlayer( /*--*/ );   //HELP HELP HELP:
> FIX ME!!!
>
>        if ( pOwner == NULL )
>                return;
>
>        if ( pOwner->m_nButtons & IN_LEANLEFT )
>
>        {
>                QAngle viewPunch;
>
>                viewPunch.x = 0.0f;
>                viewPunch.y = 0.0f;
>                viewPunch.z = 1.0f;
>
>                //Add it to the view punch
>                ViewPunch( viewPunch );
>        }
>
>        if ( pOwner->m_nButtons & IN_LEANRIGHT )
>        {
>                QAngle viewPunch;
>
>                viewPunch.x = 0.0f;
>                viewPunch.y = 0.0f;
>                viewPunch.z = -1.0f;
>
>                //Add it to the view punch
>                ViewPunch( viewPunch );
>        }
>
> I need to check if the player is pressing the IN_LEANRIGHT or
> IN_LEANLEFT buttons. What should I put in the place of the /*--*/
> Or is there another way to use m_nButtons?
>
> --
> __________________________________
> Jean Marcel Knapp dos Santos
> [email protected]
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
Sent from Olly's SEGA Game Gear
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to