HaodongMo / ARC-9

The nineth weapon base for Gmod by Arctic
90 stars 51 forks source link

Weapon:GetPrimaryAmmoType() return pistol ammo on all weapons in server side #234

Closed Speedy-VonGofast closed 6 months ago

Speedy-VonGofast commented 6 months ago

Using Weapon:GetPrimaryAmmoType() return 3 (pistol ammo) on every Arc9 weapons from every packs in server side. This is not the intended behavior.

However this function works as intended in client side.

dar-su commented 6 months ago

Ammo type is dynamic stat and can be get through Weapon:GetValue("Ammo")

TheOnly8Z commented 6 months ago

This is still not intended behavior - GetPrimaryAmmoType() should return whatever is set at SWEP.Primary.Ammo, and ARC9 should be modifying that value whenever updating stats.

@Speedy-VonGofast Can you verify if SWEP.Primary.Ammo is the correct value serverside? (I'm assuming you are in a dedicated server environment, if not, let me know.)

Speedy-VonGofast commented 6 months ago

@Speedy-VonGofast Can you verify if SWEP.Primary.Ammo is the correct value serverside? (I'm assuming you are in a dedicated server environment, if not, let me know.)

Yes, the SWEP.Primary.Ammo is the correct value serverside.

littlebabyman commented 6 months ago

I can actually confirm this happens with other weapon bases too

TheOnly8Z commented 6 months ago

Might be a gmod issue then. Closing for now - check SWEP.Primary.Ammo or SWEP:GetValue("Ammo") instead of using the function.