Skip to content

Commit

Permalink
have angry ghost errors less
Browse files Browse the repository at this point in the history
  • Loading branch information
bgkillas committed Dec 15, 2024
1 parent a8ac58b commit 87d8d87
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions quant.ew/files/system/angry_ghost_memory/angry_ghost_memory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ local ghost = {}

function rpc.send_ghost_data(ghosts_memory)
for i, entity in ipairs(EntityGetAllChildren(ctx.rpc_player_data.entity, "angry_ghost") or {}) do
local memory = EntityGetFirstComponentIncludingDisabled(entity, "VariableStorageComponent", "angry_ghost_projectile_memory")
ComponentSetValue2(memory, "value_string", ghosts_memory[i][1])
EntitySetTransform(entity, ghosts_memory[i][2], ghosts_memory[i][3])
ComponentSetValue2(EntityGetFirstComponentIncludingDisabled(entity, "VariableStorageComponent", "ew_ghost_rnd"), "value_float", ghosts_memory[i][4])
if ghosts_memory[i] ~= nil then
local memory = EntityGetFirstComponentIncludingDisabled(entity, "VariableStorageComponent", "angry_ghost_projectile_memory")
ComponentSetValue2(memory, "value_string", ghosts_memory[i][1])
EntitySetTransform(entity, ghosts_memory[i][2], ghosts_memory[i][3])
ComponentSetValue2(EntityGetFirstComponentIncludingDisabled(entity, "VariableStorageComponent", "ew_ghost_rnd"), "value_float", ghosts_memory[i][4])
end
end
end

Expand Down

0 comments on commit 87d8d87

Please sign in to comment.