Burst fire mode bug

Thanks. It looks like this was more of a general problem with the ShootableWeapon not restarting during a reload. You can fix this by changing the top of Use.OnItemAbilityAcitve from:
Code:
            if (!IsActive || !(itemAbility is Reload)) {
                return;
            }
to:
Code:
            if (!(itemAbility is Reload)) {
                return;
            }

            // Use currently is not active, but it may have to start if the Use ability is trying to be started.
            if (!IsActive && !active && InputIndex != -1 && m_PlayerInput != null) {
                // Change the start type so the button up won't affect if the ability can start.
                var startType = m_StartType;
                if (startType == AbilityStartType.ButtonDown) {
                    m_StartType = AbilityStartType.ButtonDownContinuous;
                }
                if (CanInputStartAbility(m_PlayerInput)) {
                    StartAbility();
                }
                m_StartType = startType;
                return;
            }

Version 2.2 is in the process of being released and I'm not sure if this will be included in that. I'll edit my post if it is, otherwise it'll be in the next update.
 
There are also big problems with grenades. If you throw a grenade before the end of the animation, the grenade explodes in your hands, after which you can’t use grenades at all, this is also found in the demo project and inside the editor,
but if the shooting problem is not so critical for our project, then the use of grenades put us in a dead end.


I tried to record this problem on video
 
For the grenade are you running version 2.2? From your video it looks like the grenade is going backwards and that was fixed in 2.2.

The code above mostly fixed the burst issue, but I tried it again and there was one case that it didn't cover. You'll want to change the above to:

Code:
            if (!active && InputIndex != -1 && m_PlayerInput != null) {
                // Change the start type so the button up won't affect if the ability can start.
                var startType = m_StartType;
                if (startType == AbilityStartType.ButtonDown) {
                    m_StartType = AbilityStartType.ButtonDownContinuous;
                }
                if (CanInputStartAbility(m_PlayerInput)) {
                    if (IsActive) {
                        // The use state should be reset if the ability is currently active.
                        for (int i = 0; i < m_UsableItems.Length; ++i) {
                            if (m_UsableItems[i] == null) {
                                continue;
                            }
                            m_UsableItems[i].StartItemUse(this);
                            ResetCanStopEvent(i);
                        }
                        InputIndex = -1;
                    } else {
                        // The ability isn't active, but it should be.
                        StartAbility();
                    }
                }
                m_StartType = startType;
                return;
            }

I also added the following to ShoootableWeapon.StartItemUse:
Code:
            BurstReset();
 
Top