Fix: crash in remove_hits func
parent
24525e14a1
commit
f9511d38fe
|
@ -316,7 +316,7 @@ Used to multiply wear from any tool blocking or shielding.
|
|||
pvp_revamped.block_wear_mul = 9000
|
||||
```
|
||||
|
||||
#### Effects
|
||||
#### effects
|
||||
Value is used to decrease the chance of disarming another player.
|
||||
``` lua
|
||||
pvp_revamped.disarm_chance_mul = 2
|
||||
|
|
16
init.lua
16
init.lua
|
@ -806,14 +806,16 @@ if sscsm then
|
|||
local function remove_hits(name)
|
||||
local hit_data = get_player_data(name).hit
|
||||
|
||||
for i = #hit_data, 1, -1 do
|
||||
local data = hit_data[i]
|
||||
if hit_data then
|
||||
for i = #hit_data, 1, -1 do
|
||||
local data = hit_data[i]
|
||||
|
||||
if not data.resolved then
|
||||
local count = #hit_data
|
||||
|
||||
hit_data[i] = hit_data[count]
|
||||
hit_data[count] = nil
|
||||
if not data.resolved then
|
||||
local count = #hit_data
|
||||
|
||||
hit_data[i] = hit_data[count]
|
||||
hit_data[count] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue