equal
deleted
inserted
replaced
131 dec(Gear^.Timer); |
131 dec(Gear^.Timer); |
132 if Gear^.Timer = 0 then |
132 if Gear^.Timer = 0 then |
133 begin |
133 begin |
134 case Gear^.Kind of |
134 case Gear^.Kind of |
135 gtAmmo_Bomb: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound); |
135 gtAmmo_Bomb: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound); |
|
136 gtBall: doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 15, EXPLAutoSound); |
136 gtClusterBomb: begin |
137 gtClusterBomb: begin |
137 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLAutoSound); |
138 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 20, EXPLAutoSound); |
138 for i:= 0 to 4 do |
139 for i:= 0 to 4 do |
139 begin |
140 begin |
140 dX:= rndSign(GetRandom * _0_1); |
141 dX:= rndSign(GetRandom * _0_1); |
1897 end |
1898 end |
1898 else |
1899 else |
1899 Gear^.Timer:= 0 |
1900 Gear^.Timer:= 0 |
1900 end |
1901 end |
1901 end; |
1902 end; |
|
1903 |
|
1904 procedure doStepBallgunWork(Gear: PGear); |
|
1905 var HHGear: PGear; |
|
1906 begin |
|
1907 AllInactive:= false; |
|
1908 dec(Gear^.Timer); |
|
1909 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
|
1910 HedgehogChAngle(HHGear); |
|
1911 if (Gear^.Timer mod 100) = 0 then |
|
1912 begin |
|
1913 AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtBall, 0, SignAs(AngleSin(HHGear^.Angle) * _0_8, HHGear^.dX)+ rndSign(getRandom * _0_1), AngleCos(HHGear^.Angle) * ( - _0_8) + rndSign(getRandom * _0_1), 0); |
|
1914 |
|
1915 PlaySound(sndGun, false); |
|
1916 end; |
|
1917 |
|
1918 if (Gear^.Timer = 0) then |
|
1919 begin |
|
1920 DeleteGear(Gear); |
|
1921 AfterAttack; |
|
1922 end |
|
1923 end; |
|
1924 |
|
1925 procedure doStepBallgun(Gear: PGear); |
|
1926 var HHGear: PGear; |
|
1927 begin |
|
1928 HHGear:= PHedgehog(Gear^.Hedgehog)^.Gear; |
|
1929 HHGear^.Message:= HHGear^.Message and not (gm_Up or gm_Down); |
|
1930 HHGear^.State:= HHGear^.State or gstNotKickable; |
|
1931 Gear^.doStep:= @doStepBallgunWork |
|
1932 end; |