diff --git a/parts/player/init.lua b/parts/player/init.lua index 26010a9f..82c264d2 100644 --- a/parts/player/init.lua +++ b/parts/player/init.lua @@ -201,11 +201,11 @@ local function _loadGameEnv(P)-- Load gameEnv end if ENV.allowMod then if GAME.modPatch then - GAME.modCodeList={} + if not GAME.modCodeList then GAME.modCodeList={} end + if not GAME.modCodeList[P.id] then GAME.modCodeList[P.id]={} end for i=1,#GAME.mod do if GAME.mod[i]>0 then local M=MODOPT[i] - if not GAME.modCodeList[P.id] then GAME.modCodeList[P.id]={} end table.insert(GAME.modCodeList[P.id], function() M.func(P,M.list and M.list[GAME.mod[i]],true) end) end end @@ -518,4 +518,4 @@ function PLY.newPlayer(id,mini,p) _applyGameEnv(P) end ---------------------------------------------------- -return PLY +return PLY \ No newline at end of file