Loaded ammo count bug in demo scene

Cheo

Active member
Hello, it's curious if no one mentioned this before, but when starting the demo scene and scrolling the mouse wheel to equip the pistol its loaded ammo count displayed in the canvas under Slot0Item -> Count -> Loaded is set to 0 for more than a dozen frames. It's not a game breaking bug but it shouldn't be happening for sure, we never see this in any shooter game ! As far as I know this issue doesn't occur on other weapons. Could this please be looked into and fixed ? Thanks in advance.
 
Sorry for the delay.
So turns out the pistol was reloading correctly before it was equipped, it's just that the UI wasn't updating until the item was actually equipped (delayed because of the animation).

It will be fixed in the coming update. As you can see now the refresh is done on the same frame right after reload item.
1692629616024.png



I just added this function in the Opsive.UltimateCharacterController.Items.Actions.Modules.Shootable.SlotItemMonitorModule class within the ExtraModules.cs script (Shootable folder)

Code:
/// <summary>
/// Refresh the UI when it will equip.
/// </summary>
public override void WillEquip()
{
    base.WillEquip();
    
    RefreshSlotItemMonitor();
}
 
Top