diff options
Diffstat (limited to 'godot/scripts/ballistics/Cannonball.gd')
| -rw-r--r-- | godot/scripts/ballistics/Cannonball.gd | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/godot/scripts/ballistics/Cannonball.gd b/godot/scripts/ballistics/Cannonball.gd index 241fc7d..b41f104 100644 --- a/godot/scripts/ballistics/Cannonball.gd +++ b/godot/scripts/ballistics/Cannonball.gd @@ -15,6 +15,10 @@ 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 is_network_master() and body.has_method("load_cannonball") and !body.loaded: + body.rpc("load_cannonball") + rpc("net_remove") + return if is_network_master() and oldvel.length() > 20 and !damage_exceptions.has(body) and body.has_method("damage"): body.rpc("damage", oldvel.length(), "BLUNT", [shooter_id, shooter], "using 'cannon'") damage_exceptions.append(body) |
