Compare commits

...

4 Commits

8 changed files with 12 additions and 4 deletions

View File

@ -35,9 +35,13 @@ end
commands.playerJoin = function(clientID, args)
local nickname, avatarEncoded = utils.nextStringRecord(args)
avatar = love.data.decode("string", "base64", avatarEncoded)
avatarHash = love.data.decode("string", "base64", avatarEncoded)
ui.addChatEntry("", nickname .. " Joined the game")
players[clientID] = player.newPlayer({name = nickname, avatar = gameloop.avatars[avatar].image})
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].label = love.graphics.newText(fonts.smallFont, nickname)
end
@ -70,9 +74,13 @@ commands.chatMessage = function(clientID, args)
if clientID == "0" then
name = ""
else
name = players[clientID].name
if players[clientID] and players[clientID].name then
name = players[clientID].name
else
name = "UNKNOWN?"
end
end
ui.addChatEntry(players[clientID].name, args)
ui.addChatEntry(name, args)
end
commands.deleteTexture = sharedCommands.deleteTexture

Binary file not shown.

BIN
ressources/Textures/mossBig Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 B

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B