summaryrefslogtreecommitdiff
path: root/scripts/ballistics/Cannonball.gd
diff options
context:
space:
mode:
authorAnson Bridges <bridges.anson@gmail.com>2022-09-07 14:16:17 -0400
committerAnson Bridges <bridges.anson@gmail.com>2022-09-07 14:16:17 -0400
commit366761197034a20d444282431e4a8edeb7882840 (patch)
tree63d7b11eccbb499aef8f5afc3634945c63c14ff5 /scripts/ballistics/Cannonball.gd
parentc232b92e2dde1277324d1f89d0e75ae641e4ac3b (diff)
whoops, fixed reorg
Diffstat (limited to 'scripts/ballistics/Cannonball.gd')
-rw-r--r--scripts/ballistics/Cannonball.gd17
1 files changed, 0 insertions, 17 deletions
diff --git a/scripts/ballistics/Cannonball.gd b/scripts/ballistics/Cannonball.gd
deleted file mode 100644
index 14de00c..0000000
--- a/scripts/ballistics/Cannonball.gd
+++ /dev/null
@@ -1,17 +0,0 @@
-extends "res://scripts/ballistics/NetworkedProjectile.gd"
-
-export var drag_constant = 0.3
-var damage_exceptions = []
-var oldvel
-
-func _physics_process(_delta):
- oldvel = linear_velocity
- add_force(-1*linear_velocity*drag_constant, Vector3.ZERO)
-
-func get_init_info():
- return {"linear_velocity" : linear_velocity, "angular_velocity" : angular_velocity, "oldvel" : oldvel, "shooter" : shooter, "shooter_id" : shooter_id}
-
-func _on_collision(body):
- if oldvel.length() > 20 and !damage_exceptions.has(body) and body.has_method("damage"):
- body.rpc("damage", oldvel.length(), "blunt", shooter, "using 'cannon'")
- damage_exceptions.append(body)