From 8fb0b2e6001bc9c38ff7c956c3e7972947aca5e4 Mon Sep 17 00:00:00 2001 From: MrZ_26 <1046101471@qq.com> Date: Sat, 22 Oct 2022 02:08:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=A0=B9=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E7=A7=8D=E5=AD=90=E9=9A=8F=E6=9C=BA=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=AF=8F=E4=B8=AA=E7=8E=A9=E5=AE=B6=E7=9A=84sid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/modes/netBattle.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/parts/modes/netBattle.lua b/parts/modes/netBattle.lua index a29d445f..51e82661 100644 --- a/parts/modes/netBattle.lua +++ b/parts/modes/netBattle.lua @@ -19,6 +19,13 @@ return{ GAME.modeEnv.task=marginTask local L=TABLE.shift(NETPLY.list,0) + math.randomseed(GAME.seed) + for i=#L,1,-1 do + table.insert(NETPLY.list,table.remove(NETPLY.list,math.random(i))) + end + TABLE.clear(NET.uid_sid) + for i=1,#L do NET.uid_sid[L[i].uid]=i end + local N=1 for i,p in next,L do if p.uid==USER.uid then