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,12 +129,13 @@ global func FxHitCheckTimer(object target, proplist effect, int time)
|
||||||
{
|
{
|
||||||
var ready = true;
|
var ready = true;
|
||||||
// We search for all objects with the id of our shooter.
|
// 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 its the shooter...
|
if (FindObject(Find_AtPoint(target->GetX(), target->GetY()), Find_InArray([shooter])))
|
||||||
if(foo == shooter)
|
{
|
||||||
// we may not switch to "live" yet.
|
// we may not switch to "live" yet.
|
||||||
ready = false;
|
ready = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Otherwise, the shot will be live.
|
// Otherwise, the shot will be live.
|
||||||
if (ready)
|
if (ready)
|
||||||
|
|
Loading…
Reference in New Issue