Shotgun reload from WeaponPack[1]

Report bugs of MFPS 2.0 here
Post Reply
User avatar
MAC
Contributor
Contributor
Posts: 95
Joined: Sun May 27, 2018 7:59 am
Contact:

Hello

From 1.6 shotgun2 reload doesn't work anymore, its just reload 2 bullet and stop.
I tryed on MFPS forum and asset store version .

I get 2 errors message :

Object Bullet has not been register for pooling.
UnityEngine.Debug:LogError(Object)
bl_ObjectPooling:Instantiate(String, Vector3, Quaternion) (at Assets/MFPS/Scripts/Misc/Level/bl_ObjectPooling.cs:65)
<FireOneShot>d__113:MoveNext() (at Assets/MFPS/Scripts/Weapon/Main/bl_Gun.cs:1061)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
bl_Gun:ShotGun_Fire() (at Assets/MFPS/Scripts/Weapon/Main/bl_Gun.cs:937)
bl_Gun:InputUpdate() (at Assets/MFPS/Scripts/Weapon/Main/bl_Gun.cs:341)
bl_Gun:OnUpdate() (at Assets/MFPS/Scripts/Weapon/Main/bl_Gun.cs:278)
bl_UpdateManager:Update() (at Assets/MFPS/Scripts/Utility/bl_UpdateManager.cs:170)

NullReferenceException: Object reference not set to an instance of an object
bl_Gun+<FireOneShot>d__113.MoveNext () (at Assets/MFPS/Scripts/Weapon/Main/bl_Gun.cs:1062)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <94c5f4c38cdc42d2b006f8badef04394>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
bl_Gun:ShotGun_Fire() (at Assets/MFPS/Scripts/Weapon/Main/bl_Gun.cs:937)
bl_Gun:InputUpdate() (at Assets/MFPS/Scripts/Weapon/Main/bl_Gun.cs:341)
bl_Gun:OnUpdate() (at Assets/MFPS/Scripts/Weapon/Main/bl_Gun.cs:278)
bl_UpdateManager:Update() (at Assets/MFPS/Scripts/Utility/bl_UpdateManager.cs:170)

Unfortunaly the footstep system doesn't working for some weapons again, it was already reported for 1.5 but not fixed in WeaponPack[1] update.

Hope you can fix this

Cheer
MFPS on HDRP --) https://ka2studio.net/
User avatar
MAC
Contributor
Contributor
Posts: 95
Joined: Sun May 27, 2018 7:59 am
Contact:

Hello,

Well..for ppl have the same bug ..

Bl_gun.cs - line 379.

Comment these line and reloading will working correctly..

Code: Select all

             if (isReloading)//if try fire while reloading 
                {
                    if (Info.Type == GunType.Sniper || Info.Type == GunType.Shotgun)
                    {
              //      if (bulletsLeft > 0)//and has at least one bullet
                        {
              //      CancelReloading();
                        }
                    }
                }
            }
        }
If you have something better, Thank you
MFPS on HDRP --) https://ka2studio.net/
Post Reply