Whatever lol
This commit is contained in:
@@ -23,12 +23,12 @@ func onMapChanged(newMap:PackedScene, playerDestinationNodeName:String) -> void:
|
||||
map.add_child(newMapInstance)
|
||||
|
||||
# Find Player.
|
||||
if playerDestinationNodeName:
|
||||
var player = newMapInstance.get_node("Player")
|
||||
var destNode = newMapInstance.get_node(playerDestinationNodeName)
|
||||
if player && player is Player && destNode:
|
||||
player.global_position = destNode.global_position
|
||||
player.global_rotation.y = destNode.global_rotation.y
|
||||
elif playerDestinationNodeName:
|
||||
push_error("Player, or destination node not found in new map.")
|
||||
pass
|
||||
# if playerDestinationNodeName:
|
||||
# var player = newMapInstance.get_node("Player")
|
||||
# var destNode = newMapInstance.get_node(playerDestinationNodeName)
|
||||
# if player && player is Player && destNode:
|
||||
# player.global_position = destNode.global_position
|
||||
# player.global_rotation.y = destNode.global_rotation.y
|
||||
# elif playerDestinationNodeName:
|
||||
# push_error("Player, or destination node not found in new map.")
|
||||
# pass
|
||||
|
||||
Reference in New Issue
Block a user