updating this

found where I could probably do what I wanna do, but inexperienced as I 
am and without examples I have no idea how to do it
let's take a look

if( m_fDrawbackFinished )
    {
        CBasePlayer *pOwner = ToBasePlayer( GetOwner() );

        if (pOwner)
        {
            switch( m_AttackPaused )
            {
            case GRENADE_PAUSED_PRIMARY:
                if( !(pOwner->m_nButtons & IN_ATTACK) )
                {
                    SendWeaponAnim( ACT_VM_THROW );
                    m_fDrawbackFinished = false;
                }
                break;

            case GRENADE_PAUSED_SECONDARY:
                if( !(pOwner->m_nButtons & IN_ATTACK2) )
                {
                    SendWeaponAnim( ACT_VM_THROW );
                    m_fDrawbackFinished = false;
                }
                break;

            default:
                break;
            }
        }
    }

now at both grenade paused primary and secondary the same animation is 
used and its just the same attack, there's no alternate attack so I just 
made it the same rather then pushing the secondary button and nothing 
happens.

I think code I would need to add would probably be specifically placed 
in here:
                {
                    SendWeaponAnim( ACT_VM_THROW );
                    m_fDrawbackFinished = false;
                }

but don't know what exactly, basically just something that PREVENTS 
throwing the grenade while the animation is playing, so throwing 
disabled until the actual ready throw animation is done(I think its 
ACT_VM_PULLBACK_HIGH which is placed in the functions PrimaryAttack and 
SecondaryAttack)
once the animation is done it can still be held paused for as long as 
the player wants like the standard grenades.
> so moved on and now trying to prevent people from throwing the grenade 
> DURING the ready animation, for standard hl2 grenades the pin is pulled 
> when you draw the grenade and you can throw it without even fully 
> raising your arm.
> In my mod the pins gonna be pulled at the actual animation when you 
> press lmb or rmb, I've been looking at the actual draw code but it seems 
> I can't use that to get the same effect for the actual animation just 
> before the throw.
>
> Also tried taking a look at bugbait, I think there's a small delay 
> before you can squeeze again with bugbait so I though I might be able to 
> use that somehow, but no luck on that either.
>
> So wondering if anyone else know some unused grenade like weapons that 
> may have an example of this?
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please 
> visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.138 / Virus Database: 270.6.7/1632 - Release Date: 25-8-2008 7:05
>
>
>
>   


_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to