Fixed a OCScript runtime error for the lightning strike

stable-5.4
Maikel de Vries 2013-10-07 19:10:25 +02:00
parent 9e8dd57dbb
commit 1118a31752
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ protected func FxLightningMoveTimer()
// Strike objects on the line.
for (var obj in FindObjects(Find_OnLine(oldx, oldy, newx, newy), Find_NoContainer(), Find_Layer(GetObjectLayer())))
{
if (!obj->~LightningStrike(3 + strength / 10))
if (obj && !obj->~LightningStrike(3 + strength / 10))
{
if (GetOCF() & OCF_Alive)
Punch(obj, 3 + strength / 10);

View File

@ -41,5 +41,5 @@ MapHeight=200
Climate=0
StartSeason=0
YearSpeed=0
Wind=0,0,100,100
Wind=0,100,-100,100