blob: c560f456715d559bddd8fabe2cf8a3500ad59e08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
extends Spatial
var winddir = Vector3(1,0,0)
var map_rids
var client_id
var player_char: NetChar
var players_info = {}
var WORLD_MAP_RID : RID
# Called when the node enters the scene tree for the first time.
func _ready():
map_rids = NavigationServer.get_maps()
for rid in map_rids:
NavigationServer.map_set_edge_connection_margin(rid,1.5)
#merge all nav meshes onto the main map
yield(get_tree().create_timer(1.0), "timeout")
WORLD_MAP_RID = get_world().get_navigation_map()
CharacterAIManager.set_rid(WORLD_MAP_RID)
#find_path()
remotesync func update_players_info(info):
players_info = info
remotesync func _call_on_server(function, arguments):
print('Remote server call: ' + function)
$Server.call(function, arguments)
func get_client_id() -> int:
return client_id
|