Flaw in design

This design with pickups has one flaw that can be considered a bug… if you get pickup with different ammo type that is currently being shown in the ammo label (you have equipped a weapon that is not using the ammo you just picked up) the ammo label shows the amount of ammo you just picked up and not the ammo your weapon uses… it will show the right amount when you shoot or change the weapon.

2 Likes

You are right!

My simple solution is a variable current_ammo_type of type ammo_type in the ammo handler. On equip it is updated to the new weapon’s ammo type. The func update_ammo_label does nothing if it is called with an ammo type that is not the current ammo type.

1 Like

Bramwell fixes this in the “Finishing touches” section of Robo Rampage, right at the end. :slightly_smiling_face:

3 Likes

Privacy & Terms