feat: implement BaseHitscanWeapon class with raycasting, ammo management, and penetration support

This commit is contained in:
DottsGit
2026-06-04 18:42:59 -04:00
parent bd04135dba
commit dcd0df2b2c
+6 -1
View File
@@ -147,7 +147,12 @@ func _shoot_hitscan() -> void:
result.collider.take_damage(damage, result.position, player)
# Add this hit to exclude so next loop goes through it
query.exclude.append(result.rid)
var exc = query.exclude
exc.append(result.rid)
# If the collider has multiple shapes, we should really exclude the whole collision object
# but RID of the body should be enough.
query.exclude = exc
hits_remaining -= 1
current_damage_mult *= penetration_damage_penalty