1088 if not cLaserSighting then |
1088 if not cLaserSighting then |
1089 // game does not have default laser sight. turn it on and give them a chance to aim |
1089 // game does not have default laser sight. turn it on and give them a chance to aim |
1090 begin |
1090 begin |
1091 cLaserSighting := true; |
1091 cLaserSighting := true; |
1092 HHGear^.Message := 0; |
1092 HHGear^.Message := 0; |
1093 if (HHGear^.Angle - 32 >= 0) then |
1093 if (HHGear^.Angle >= 32) then |
1094 dec(HHGear^.Angle,32) |
1094 dec(HHGear^.Angle,32) |
1095 end; |
1095 end; |
1096 |
1096 |
1097 if (HHGear^.Message and gmAttack) <> 0 then |
1097 if (HHGear^.Message and gmAttack) <> 0 then |
1098 begin |
1098 begin |
2836 begin |
2836 begin |
2837 sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1); |
2837 sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1); |
2838 if sparkles <> nil then |
2838 if sparkles <> nil then |
2839 begin |
2839 begin |
2840 sparkles^.Tint:= ((random(210)+45) shl 24) or ((random(210)+45) shl 16) or ((random(210)+45) shl 8) or $FF; |
2840 sparkles^.Tint:= ((random(210)+45) shl 24) or ((random(210)+45) shl 16) or ((random(210)+45) shl 8) or $FF; |
2841 sparkles^.Angle:= random * 360; |
2841 sparkles^.Angle:= random(360); |
2842 end |
2842 end |
2843 end; |
2843 end; |
2844 |
2844 |
2845 i := 2; |
2845 i := 2; |
2846 repeat |
2846 repeat |
2891 sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtStraightShot); |
2891 sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtStraightShot); |
2892 if sparkles <> nil then |
2892 if sparkles <> nil then |
2893 with sparkles^ do |
2893 with sparkles^ do |
2894 begin |
2894 begin |
2895 Tint:= ((random(210)+45) shl 24) or ((random(210)+45) shl 16) or ((random(210)+45) shl 8) or $FF; |
2895 Tint:= ((random(210)+45) shl 24) or ((random(210)+45) shl 16) or ((random(210)+45) shl 8) or $FF; |
2896 Angle:= random * 360; |
2896 Angle:= random(360); |
2897 dx:= 0.001 * (random(200)); |
2897 dx:= 0.001 * (random(200)); |
2898 dy:= 0.001 * (random(200)); |
2898 dy:= 0.001 * (random(200)); |
2899 if random(2) = 0 then |
2899 if random(2) = 0 then |
2900 dx := -dx; |
2900 dx := -dx; |
2901 if random(2) = 0 then |
2901 if random(2) = 0 then |
4557 doMakeExplosion(hwRound(Gear^.X) - 30 - r0, hwRound(Gear^.Y) + 40, 40 + r1, Gear^.Hedgehog, 0); |
4557 doMakeExplosion(hwRound(Gear^.X) - 30 - r0, hwRound(Gear^.Y) + 40, 40 + r1, Gear^.Hedgehog, 0); |
4558 doMakeExplosion(hwRound(Gear^.X) + 30 + r1, hwRound(Gear^.Y) + 40, 40 + r0, Gear^.Hedgehog, 0); |
4558 doMakeExplosion(hwRound(Gear^.X) + 30 + r1, hwRound(Gear^.Y) + 40, 40 + r0, Gear^.Hedgehog, 0); |
4559 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 80 + r0, Gear^.Hedgehog, EXPLAutoSound); |
4559 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 80 + r0, Gear^.Hedgehog, EXPLAutoSound); |
4560 for r0:= 0 to 4 do |
4560 for r0:= 0 to 4 do |
4561 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtNote); |
4561 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtNote); |
4562 Gear^.dY := odY * -1 + cGravity * 2; |
4562 Gear^.dY := cGravity * 2 - odY; |
4563 Gear^.Pos := Gear^.Pos + 1; |
4563 Gear^.Pos := Gear^.Pos + 1; |
4564 end |
4564 end |
4565 else |
4565 else |
4566 Gear^.dY := Gear^.dY + cGravity * 2; |
4566 Gear^.dY := Gear^.dY + cGravity * 2; |
4567 // let it fall faster so itdoesn't take too long for the whole attack |
4567 // let it fall faster so itdoesn't take too long for the whole attack |