← Back to context Comment by MBCook 6 days ago I’m surprised to hear the ammo calculation code would use floats. 3 comments MBCook Reply bakugo 6 days ago The game has ammo pickups that refill 20% and 50% of whatever your max ammo is, so floats have to be involved in there somewhere. manwe150 6 days ago Dividing by 5 or 2, respectively, are integers, if the game developers wanted them to be. More so because the actual units of ammo need to be integers if they are to render as full bullets each shultays 5 days ago Or more generalized "ammo += (maxAmmo * percentageToFill) / 100"
bakugo 6 days ago The game has ammo pickups that refill 20% and 50% of whatever your max ammo is, so floats have to be involved in there somewhere. manwe150 6 days ago Dividing by 5 or 2, respectively, are integers, if the game developers wanted them to be. More so because the actual units of ammo need to be integers if they are to render as full bullets each shultays 5 days ago Or more generalized "ammo += (maxAmmo * percentageToFill) / 100"
manwe150 6 days ago Dividing by 5 or 2, respectively, are integers, if the game developers wanted them to be. More so because the actual units of ammo need to be integers if they are to render as full bullets each shultays 5 days ago Or more generalized "ammo += (maxAmmo * percentageToFill) / 100"
The game has ammo pickups that refill 20% and 50% of whatever your max ammo is, so floats have to be involved in there somewhere.
Dividing by 5 or 2, respectively, are integers, if the game developers wanted them to be. More so because the actual units of ammo need to be integers if they are to render as full bullets each
Or more generalized "ammo += (maxAmmo * percentageToFill) / 100"