hedgewars/uAIMisc.pas
changeset 13463 f1d349a52bc7
parent 11046 47a8c19ecb60
child 13470 0d27f0c21b71
equal deleted inserted replaced
13462:4c47a480009b 13463:f1d349a52bc7
   370 function TestColl(x, y, r: LongInt): boolean; inline;
   370 function TestColl(x, y, r: LongInt): boolean; inline;
   371 begin
   371 begin
   372     if not CheckBounds(x, y, r) then
   372     if not CheckBounds(x, y, r) then
   373         exit(false);
   373         exit(false);
   374 
   374 
   375     if (Land[y-r, x-r] and lfNotCurrentMask <> 0) or
   375     if (Land[y-r, x-r] and lfNotCurHogCrate <> 0) or
   376        (Land[y+r, x-r] and lfNotCurrentMask <> 0) or
   376        (Land[y+r, x-r] and lfNotCurHogCrate <> 0) or
   377        (Land[y+r, x-r] and lfNotCurrentMask <> 0) or
   377        (Land[y+r, x-r] and lfNotCurHogCrate <> 0) or
   378        (Land[y+r, x+r] and lfNotCurrentMask <> 0) then
   378        (Land[y+r, x+r] and lfNotCurHogCrate <> 0) then
   379        exit(true);
   379        exit(true);
   380 
   380 
   381     TestColl:= false;
   381     TestColl:= false;
   382 end;
   382 end;
   383 
   383 
   925 
   925 
   926 function HHGo(Gear, AltGear: PGear; var GoInfo: TGoInfo): boolean;
   926 function HHGo(Gear, AltGear: PGear; var GoInfo: TGoInfo): boolean;
   927 var pX, pY, tY: LongInt;
   927 var pX, pY, tY: LongInt;
   928 begin
   928 begin
   929 HHGo:= false;
   929 HHGo:= false;
   930 Gear^.CollisionMask:= lfNotCurrentMask;
   930 Gear^.CollisionMask:= lfNotCurHogCrate;
   931 AltGear^:= Gear^;
   931 AltGear^:= Gear^;
   932 
   932 
   933 GoInfo.Ticks:= 0;
   933 GoInfo.Ticks:= 0;
   934 GoInfo.FallPix:= 0;
   934 GoInfo.FallPix:= 0;
   935 GoInfo.JumpType:= jmpNone;
   935 GoInfo.JumpType:= jmpNone;