feat: implement BaseHitscanWeapon class with raycasting, ammo management, and penetration support
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user