The musket simply didn't call bullet_spawn_offset.y, no big deal.
The machine gun animation would get frozen when dropped. Had to add an "else" for when the item is not being held, because items_dropped.get is called only when in fact the item got dropped, and if the player gets killed while shooting, the animation would still froze, as it wouldn't be IN FACT dropped.
It even made me think about the ammunition reload system of all guns.
if items_dropped.get(entity).is_some() {
// reload gun
gun.ammo = *max_ammo;
}
Here, reloading will only take place if the item is dropped. This means that if you die holding a musket with half the ammo, the next player to pick it up will get it with half the ammo. Is that what we really want? Or do we want the ammo to be reloaded?
The musket simply didn't call
bullet_spawn_offset.y
, no big deal.The machine gun animation would get frozen when dropped. Had to add an "else" for when the item is not being held, because
items_dropped.get
is called only when in fact the item got dropped, and if the player gets killed while shooting, the animation would still froze, as it wouldn't be IN FACT dropped.It even made me think about the ammunition reload system of all guns.
Here, reloading will only take place if the item is dropped. This means that if you die holding a musket with half the ammo, the next player to pick it up will get it with half the ammo. Is that what we really want? Or do we want the ammo to be reloaded?