Compare commits
No commits in common. "ae6e7171a845782c277c86207fcedd32a84502ff" and "d6015ef15533bfe42ff0bd8b4092817d8b2be982" have entirely different histories.
ae6e7171a8
...
d6015ef155
|
@ -35,13 +35,9 @@ end
|
|||
|
||||
commands.playerJoin = function(clientID, args)
|
||||
local nickname, avatarEncoded = utils.nextStringRecord(args)
|
||||
avatarHash = love.data.decode("string", "base64", avatarEncoded)
|
||||
avatar = love.data.decode("string", "base64", avatarEncoded)
|
||||
ui.addChatEntry("", nickname .. " Joined the game")
|
||||
local avatar = { image = love.graphics.newImage("textures/player/nephele/fallback.png") }
|
||||
if gameloop.avatars[avatarHash] then
|
||||
avatar = gameloop.avatars[avatarHash]
|
||||
end
|
||||
players[clientID] = player.newPlayer({name = nickname, avatar = avatar.image})
|
||||
players[clientID] = player.newPlayer({name = nickname, avatar = gameloop.avatars[avatar].image})
|
||||
players[clientID].label = love.graphics.newText(fonts.smallFont, nickname)
|
||||
end
|
||||
|
||||
|
@ -74,13 +70,9 @@ commands.chatMessage = function(clientID, args)
|
|||
if clientID == "0" then
|
||||
name = ""
|
||||
else
|
||||
if players[clientID] and players[clientID].name then
|
||||
name = players[clientID].name
|
||||
else
|
||||
name = "UNKNOWN?"
|
||||
end
|
||||
name = players[clientID].name
|
||||
end
|
||||
ui.addChatEntry(name, args)
|
||||
ui.addChatEntry(players[clientID].name, args)
|
||||
end
|
||||
|
||||
commands.deleteTexture = sharedCommands.deleteTexture
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 363 B |
Binary file not shown.
Before Width: | Height: | Size: 235 B |
Binary file not shown.
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 404 B |
Binary file not shown.
Before Width: | Height: | Size: 598 B |
Loading…
Reference in New Issue