Sentry crashfix, when users who joined whilst in progress shot at a sentry that was already there (closes #145)
This commit is contained in:
parent
668cec0332
commit
ec06fe0565
@ -102,11 +102,13 @@ function init_dmg_table(p_name, players, in_progress)
|
||||
|
||||
-- se in corso, aggiungo nuovə giocante per chi era già dentro
|
||||
if in_progress then
|
||||
for pl_name, pl_data in pairs(players) do
|
||||
for _, pl_data in pairs(players) do
|
||||
pl_data.dmg_received[p_name] = {timestamp = 99999, dmg = 0}
|
||||
|
||||
for ent_name, _ in pairs(pl_data.entities) do
|
||||
pl_data.dmg_received[pl_name .. "@" .. ent_name] = {timestamp = 99999, dmg = 0}
|
||||
for _, ent_obj in pairs(pl_data.entities) do
|
||||
if ent_obj:get_luaentity() then -- mi fido 0
|
||||
ent_obj:get_luaentity()._dmg_received[p_name] = {timestamp = 99999, dmg = 0}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user