Skip to content

Commit

Permalink
#127 further improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
EdgarVerona committed May 2, 2020
1 parent a31b883 commit 71b5bf6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/game/mode/fugitive/FugitiveGame.gd
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ func spawn_player(playerId: int, hiderSpawns: Array, seekerSpawns: Array):
var localPlayerId := get_tree().get_network_unique_id()
var localPlayerType: int
if GameData.players.has(localPlayerId):
localPlayerType = GameData.players[localPlayerId].get_type()
localPlayerType = GameData.get_player(localPlayerId).get_type()
else:
localPlayerType = FugitiveTeamResolver.PlayerType.Unset

# Extract the player data
var player := GameData.players[playerId] as PlayerData
var player := GameData.get_player(playerId)
var playerName := player.get_name()
var playerType := player.get_type()

Expand Down
4 changes: 2 additions & 2 deletions common/lobby/Lobby.gd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func create_player(playerId: int):

print("Creating player in lobby")

var player := GameData.players[playerId] as PlayerData
var player := GameData.get_player(playerId)
var mode = Maps.get_mode_for_map(GameData.general[GameData.GENERAL_MAP])

var playerListItem = preload("res://common/lobby/PlayerListItem.tscn")
Expand Down Expand Up @@ -76,7 +76,7 @@ func remove_player(playerId: int):


func repopulate_player(playerId: int):
var player := GameData.players[playerId] as PlayerData
var player := GameData.get_player(playerId)
var mode = Maps.get_mode_for_map(GameData.general[GameData.GENERAL_MAP])

var node := find_player_node(playerId)
Expand Down
2 changes: 1 addition & 1 deletion networking/ServerNetwork.gd
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ remote func on_register_self(playerId: int, playerName: String, gameVersion: int
# Catch the new player up on who is already here
for curPlayerId in GameData.players:
if curPlayerId != playerId:
var player = GameData.players[curPlayerId]
var player := GameData.get_player(curPlayerId)
ClientNetwork.register_player(playerId, player)

ClientNetwork.update_game_data()
Expand Down

0 comments on commit 71b5bf6

Please sign in to comment.