# HG changeset patch # User nemo # Date 1265170708 0 # Node ID 7a84ce33f52f11fd5096fd1279198f3f0c00d1ea # Parent 03df0573a9fd6b9d423db1d38167e2e1c613507b Fix crash in DrawTunnel diff -r 03df0573a9fd -r 7a84ce33f52f hedgewars/uGears.pas --- a/hedgewars/uGears.pas Wed Feb 03 03:01:44 2010 +0000 +++ b/hedgewars/uGears.pas Wed Feb 03 04:18:28 2010 +0000 @@ -2066,7 +2066,7 @@ *) i:= _1; if (CurrentHedgehog <> nil) and CurrentHedgehog^.King then i:= _1_5; -if (PHedgehog(Gear^.Hedgehog) <> nil) and (PHedgehog(Gear^.Hedgehog)^.King) then +if (Gear^.Hedgehog <> nil) and (PHedgehog(Gear^.Hedgehog)^.King) then ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent * _0_5) else ModifyDamage:= hwRound(_0_01 * cDamageModifier * dmg * i * cDamagePercent) diff -r 03df0573a9fd -r 7a84ce33f52f hedgewars/uLandGraphics.pas --- a/hedgewars/uLandGraphics.pas Wed Feb 03 03:01:44 2010 +0000 +++ b/hedgewars/uLandGraphics.pas Wed Feb 03 04:18:28 2010 +0000 @@ -394,7 +394,7 @@ Y:= Y + dY; tx:= hwRound(X); ty:= hwRound(Y); - if (Land[ty, tx] <> COLOR_INDESTRUCTIBLE) and ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) then + if ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) and (Land[ty, tx] <> COLOR_INDESTRUCTIBLE) then begin if Land[ty, tx] = COLOR_LAND then LandPixels[ty, tx]:= LandBackPixel(tx, ty)