AutoReloadType.Equip Has Wrong Enum Value?

airoll

Member
Hi I was setting up my weapons with AutoReloadType.Pickup, and I noticed that every time I equipped the weapon, it was reloading. I then noticed that in ReloaderModule.cs, it does the following check in OnAllModulesPreInitialized and Equip:

C#:
if ((m_AutoReload & Reload.AutoReloadType.Equip) != 0) {
                ShootableAction.ReloadClip(true, true);
            }

Since AutoReloadType.Pickup has an enum value of 1, and AutoReloadType.Equip has an enum value of 3, then bitwise-and of 1 and 3 returns 1, which is non-zero. This causes the item to auto reload every time it's equipped, even if AutoReloadType is not set to Equip.
 
Are you running the latest version of the controller? AutoReloadType.Equip has a value of 4.
 
Top