forked from Mirrors/openclonk
Fix nil pointer in hit check if shooter gets deleted during no-selfkill-check.
Also rewrite the check using Find_InArray.shapetextures
parent
16683c0d1d
commit
4d7033718b
|
@ -129,13 +129,14 @@ global func FxHitCheckTimer(object target, proplist effect, int time)
|
|||
{
|
||||
var ready = true;
|
||||
// We search for all objects with the id of our shooter.
|
||||
for (var foo in FindObjects(Find_AtPoint(target->GetX(), target->GetY()), Find_ID(shooter->GetID())))
|
||||
if (shooter)
|
||||
{
|
||||
if (FindObject(Find_AtPoint(target->GetX(), target->GetY()), Find_InArray([shooter])))
|
||||
{
|
||||
// If its the shooter...
|
||||
if(foo == shooter)
|
||||
// we may not switch to "live" yet.
|
||||
ready = false;
|
||||
}
|
||||
}
|
||||
// Otherwise, the shot will be live.
|
||||
if (ready)
|
||||
effect.live = true;
|
||||
|
|
Loading…
Reference in New Issue