rocket launcher shoots and explodes

This commit is contained in:
Derek
2024-07-31 23:27:22 -05:00
parent 30f8c138db
commit 6354dc2774
23 changed files with 2456 additions and 14 deletions

View File

@@ -75,11 +75,9 @@ func reload_finished():
if level_control.ammo_reserve[gun_index] >= max_ammo:
level_control.ammo_current[gun_index] += max_ammo
level_control.ammo_reserve[gun_index] -= max_ammo
#player.reloading = false
else:
level_control.ammo_current[gun_index] += level_control.ammo_reserve[gun_index]
level_control.ammo_reserve[gun_index] -= level_control.ammo_reserve[gun_index]
#player.reloading = false
func shoot(delta):
@@ -100,7 +98,7 @@ func shoot(delta):
else:
instance_bullet.transform.basis = barrel_raycast.global_transform.basis
instance_bullet.bullet_speed = bullet_speed
instance_bullet.player_velocity = player.velocity.length()
instance_bullet.player_velocity = player.velocity
instance_bullet.bullet_drop = bullet_drop
instance_bullet.random_spread_amt = random_spread_amt
instance_bullet.bullet_damage = bullet_damage