changeset 11511 | 24bef86e3f3a |
parent 11317 | 62287d4044e7 |
child 11534 | 58b4e357bcbf |
11510:32bad5758df6 | 11511:24bef86e3f3a |
---|---|
844 defaultPos:= false |
844 defaultPos:= false |
845 end; |
845 end; |
846 |
846 |
847 end else // not gstHHDriven |
847 end else // not gstHHDriven |
848 begin |
848 begin |
849 // check if hedgehog is sliding/rolling |
|
849 if (Gear^.Damage > 0) and (HH^.Effects[heFrozen] = 0) |
850 if (Gear^.Damage > 0) and (HH^.Effects[heFrozen] = 0) |
850 and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then |
851 and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then |
851 begin |
852 begin |
852 defaultPos:= false; |
853 defaultPos:= false; |
853 DrawHedgehog(sx, sy, |
854 DrawHedgehog(sx, sy, |
854 sign, |
855 sign, |
855 2, |
856 2, |
856 1, |
857 1, |
857 Gear^.DirAngle); |
858 Gear^.DirAngle); |
859 |
|
860 // dust effect |
|
861 // TODO fix: this gives different results based on framerate |
|
862 if (sx mod 8) = 0 then |
|
863 begin |
|
864 if Gear^.dX.isNegative then |
|
865 tx := hwRound(Gear^.X) + cHHRadius |
|
866 else |
|
867 tx := hwRound(Gear^.X) - cHHRadius; |
|
868 ty:= hwRound(Gear^.Y) + cHHRadius + 2; |
|
869 if ((tx and LAND_WIDTH_MASK) = 0) and |
|
870 ((ty and LAND_HEIGHT_MASK) = 0) and |
|
871 (Land[ty, tx] <> 0) then |
|
872 AddVisualGear(tx - 2 + Random(4), ty - 8, vgtDust); |
|
873 end; |
|
874 |
|
875 // draw april's fool hat |
|
858 if AprilOne and (curhat <> nil) then |
876 if AprilOne and (curhat <> nil) then |
859 DrawTextureRotatedF(curhat, 1.0, -1.0, 0, sx, sy, 18, sign, 32, 32, |
877 DrawTextureRotatedF(curhat, 1.0, -1.0, 0, sx, sy, 18, sign, 32, 32, |
860 sign*Gear^.DirAngle) |
878 sign*Gear^.DirAngle) |
861 end; |
879 end; |
862 |
880 |