summaryrefslogtreecommitdiff
path: root/scripts/machines/NetworkedMachine.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/machines/NetworkedMachine.gd
parentc232b92e2dde1277324d1f89d0e75ae641e4ac3b (diff)
whoops, fixed reorg
Diffstat (limited to 'scripts/machines/NetworkedMachine.gd')
-rw-r--r--scripts/machines/NetworkedMachine.gd54
1 files changed, 0 insertions, 54 deletions
diff --git a/scripts/machines/NetworkedMachine.gd b/scripts/machines/NetworkedMachine.gd
deleted file mode 100644
index d4ccb61..0000000
--- a/scripts/machines/NetworkedMachine.gd
+++ /dev/null
@@ -1,54 +0,0 @@
-extends RigidBody
-
-var in_use : bool = false
-var user = null
-var world = null
-
-func _ready():
- world = get_tree().get_root().find_node("GAMEWORLD", true, false)
-
-remote func update_phys_transform(t, lv, av):
- transform = t
- linear_velocity = lv
- angular_velocity = av
-
-remotesync func net_apply_impulse(impulse_v):
- apply_central_impulse(impulse_v)
-
-func _integrate_forces(state):
- if is_network_master() and mode == MODE_RIGID:
- rpc("update_phys_transform", transform, linear_velocity, angular_velocity)
-
-remotesync func set_net_owner(id, char_name):
- set_network_master(id)
- if id == 1 and char_name == "NONE": #not under control
- on_no_control()
- if user != null:
- user.lose_machine()
- user = null
- in_use = false
- else:
- in_use = true
- user = world.get_node("PLAYERS/"+char_name)
- user.take_control_of_machine(self)
- if is_network_master():
- on_new_control()
-
-func relinquish_control():
- rpc("set_net_owner", 1, "NONE")
-
-#TO BE OVERRIDDEN BY CHILDREN
-func on_new_control():
- pass
-
-func on_no_control():
- pass
-
-func attack1():
- pass
-
-func attack2():
- pass
-
-func direction_input(fwd,bwd,left,right,_left,_right):
- pass