对战传输的玩家配置信息格式简化和修复一个问题(未使用所以从未触发)

This commit is contained in:
MrZ626
2021-04-10 22:24:12 +08:00
parent 7da178c5ec
commit 23bb6ac486
4 changed files with 14 additions and 16 deletions

View File

@@ -214,9 +214,9 @@ function Player:setRS(RSname)
end
function Player:setConf(confStr)
local _,conf=pcall(love.data.decode,"string","base64",confStr)
if _ then
for k,v in next,conf do
confStr=JSON.decode(confStr)
if confStr then
for k,v in next,confStr do
if not GAME.modeEnv[k]then
self.gameEnv[k]=v
end