# HG changeset patch # User Wuzzy # Date 1594047335 -7200 # Node ID 2aedd8ca836c763a3f0bf8a8b3c790663182c1a7 # Parent e55c4bad720a770e824f7ad4094eab630abb3385 AI: No longer afraid of heights if invulnerable diff -r e55c4bad720a -r 2aedd8ca836c hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Mon Jul 06 16:46:38 2020 +0200 +++ b/hedgewars/uAIMisc.pas Mon Jul 06 16:55:35 2020 +0200 @@ -1136,7 +1136,8 @@ begin inc(GoInfo.Ticks); Gear^.dY:= Gear^.dY + aiGravity; - if Gear^.dY > _0_4 then + // taking fall damage? + if (Gear^.dY > _0_4) and (Gear^.Hedgehog^.Effects[heInvulnerable] = 0) then begin GoInfo.FallPix:= 0; // try ljump instead of fall with damage