extends Node master func sendPlayerInputs(movementInput:int, jumpId:int, attackStateInput:int, mouseX:int, mouseY:int): # Get the input from a client and send it to the matching remote player var senderId:int = get_tree().get_rpc_sender_id() if gamestate.players.has(senderId): gamestate.get_node("/root/game/"+str(senderId)).getPlayerInputs(movementInput, jumpId, attackStateInput, mouseX, mouseY) # When the player exits the game area func _on_killingFallArea_body_exited(body:PhysicsBody): # Instant-kill if the body is a living player if body.get_collision_layer_bit(gamestate.PLAYER_LAYER): gamestate.players.erase(body.ownId) rpc_id(body.ownId, "backToLobby") #gamestate.disconnect_network_peer(body.ownId) body.die()