Secure-Cast
Secure-Cast copied to clipboard
NextRecord can be nil when accessed
Line 212 of https://github.com/1Axen/Secure-Cast/blob/main/src/Simulation/init.lua can sometimes error if NextRecord is null.
Line 218's null check should come first i.e.
--> Previous record is guaranteed to exist due to it being in the grid
if not NextRecord then
continue
end
--> Avoid checking teammates
local Player = NextRecord.Player or PreviousRecord.Player
if Player and IsPlayerFriendly(Caster, Player) then
continue
end