Fixed sync with server after setup to prevent issues with medical check

This commit is contained in:
ZioPao
2024-05-05 00:14:37 +02:00
parent 20bed84910
commit aadbe02df4
3 changed files with 22 additions and 6 deletions

View File

@@ -29,12 +29,18 @@ function ServerDataHandler.AddTable(key, table)
--TOC_DEBUG.printTable(table)
-- Set that the data has been modified and it's updated on the server
table.isUpdateFromServer = true
table.isUpdateFromServer = true -- FIX this is useless
ModData.add(key, table) -- Add it to the server mod data
ServerDataHandler.modData[key] = table
-- if table.isInitializing == true then
-- TOC_DEBUG.print("Applied data after setup")
-- table.isInitializing = false
-- end
-- Since this could be triggered by a different client than the one referenced in the key, we're gonna
-- apply the changes back to the key client again to be sure that everything is in sync
local username = CommandsData.GetUsername(key)