fix fire desyncing(i hope)

This commit is contained in:
bgkillas 2024-09-03 09:03:59 -04:00
parent 9c82b00a4c
commit 4e0a17a9c1
2 changed files with 9 additions and 9 deletions

View file

@ -22,8 +22,8 @@ function rpc.send_present_stains(present_stains)
local current_stains = ComponentGetValue2(effect_data, "stain_effects")
for index, is_present in ipairs(present_stains) do
if not is_present and current_stains[index+1] > 0.05 then
GamePrint("Removing "..effect_by_index[index])
if not is_present and current_stains[index+1] > 0.1 then
--GamePrint("Removing "..effect_by_index[index])
EntityRemoveStainStatusEffect(entity, effect_by_index[index])
end
end
@ -43,10 +43,10 @@ function module.on_world_update()
local present_stains = {}
-- For some reason whatever value is at index 1 isn't used?
for i=2, #stains do
table.insert(present_stains, stains[i] > 0.05)
if stains[i] > 0.05 then
table.insert(present_stains, stains[i] > 0.1)
--[[if stains[i] > 0.1 then
GamePrint(effect_by_index[i-1])
end
end]]
end
rpc.send_present_stains(present_stains)
end

View file

@ -92,7 +92,7 @@ local function load_modules()
ctx.load_system("flag_sync")
ctx.load_system("essence_sync")
ctx.load_system("spectate")
-- ctx.load_system("effect_data_sync")
ctx.load_system("effect_data_sync")
end
local function is_suitable_target(entity)