Update .gitignore
This commit is contained in:
16
.gitignore
vendored
16
.gitignore
vendored
@@ -1,5 +1,21 @@
|
||||
# ---> Godot
|
||||
# Godot 4+ specific ignores
|
||||
.godot/
|
||||
|
||||
# Godot-specific ignores
|
||||
.import/
|
||||
export.cfg
|
||||
export_presets.cfg
|
||||
|
||||
# Imported translations (automatically generated from CSV files)
|
||||
*.translation
|
||||
|
||||
# Mono-specific ignores
|
||||
.mono/
|
||||
data_*/
|
||||
mono_crash.*.json
|
||||
|
||||
#Custom
|
||||
*.sh
|
||||
*.x86_64
|
||||
*.pck
|
||||
|
||||
@@ -46,9 +46,11 @@ func _Peer_Connected(client_id):
|
||||
print("User " + str(client_id) + " has conected")
|
||||
var puppet = player_model.instantiate()
|
||||
var internal_id = clients.size() + 2
|
||||
puppet.find_child("CharacterBody3D").set_is_playable(false)
|
||||
puppet.find_child("CharacterBody3D").set_internal_id(internal_id)
|
||||
puppet.find_child("CharacterBody3D").set_player_name("player" + str(internal_id))
|
||||
var CB3D = puppet.find_child("CharacterBody3D")
|
||||
CB3D.set_is_playable(false)
|
||||
CB3D.set_internal_id(internal_id)
|
||||
CB3D.set_player_name("player" + str(internal_id))
|
||||
|
||||
|
||||
clients[str(client_id)] = player_script.new().properties.duplicate()
|
||||
clients[str(client_id)]["internal_id"] = internal_id
|
||||
@@ -71,8 +73,9 @@ func get_character_properties(client_id):
|
||||
func move_client(client_id, position):
|
||||
#if(settings["enableAntiCheat"]): if(position > 10): return # нормально допилить надо
|
||||
var client = clients[str(client_id)]
|
||||
var internal_id = client["internal_id"]
|
||||
client["position"] = position
|
||||
send_everyone_except(client_id, [get_node("player" + str(client["internal_id"])).find_child("CharacterBody3D").move_puppet, position, client["internal_id"]])
|
||||
send_everyone_except(client_id, [get_node("player" + str(internal_id)).find_child("CharacterBody3D").move_puppet, position, internal_id])
|
||||
|
||||
@rpc ("any_peer", "call_remote", "reliable")
|
||||
func get_client_list(client_id):
|
||||
|
||||
Reference in New Issue
Block a user