hedgewars/GSHandlers.inc
changeset 7339 5984b749ad9b
parent 7335 3c6f08af7dac
child 7341 d70478d265ec
equal deleted inserted replaced
7337:c224cd2d32f3 7339:5984b749ad9b
  2118             begin
  2118             begin
  2119 (* Can't make sparkles team coloured without working out what the next team is going to be. This should be solved, really, since it also screws up
  2119 (* Can't make sparkles team coloured without working out what the next team is going to be. This should be solved, really, since it also screws up
  2120    voices. Reinforcements voices is heard for active team, not team-to-be.  Either that or change crate spawn from end of turn to start, although that
  2120    voices. Reinforcements voices is heard for active team, not team-to-be.  Either that or change crate spawn from end of turn to start, although that
  2121    has its own complexities. *)
  2121    has its own complexities. *)
  2122             // Abuse a couple of gear values to track origin
  2122             // Abuse a couple of gear values to track origin
  2123             Gear^.Angle:= hwRound(Gear^.X);
  2123             Gear^.Angle:= hwRound(Gear^.Y);
  2124             Gear^.Power:= hwRound(Gear^.Y);
       
  2125             Gear^.Tag:= random(2);
  2124             Gear^.Tag:= random(2);
  2126             inc(Gear^.Timer)
  2125             inc(Gear^.Timer)
  2127             end;
  2126             end;
  2128         if Gear^.Timer < 1833 then inc(Gear^.Timer);
  2127         if Gear^.Timer < 1833 then inc(Gear^.Timer);
  2129         if Gear^.Timer = 1000 then
  2128         if Gear^.Timer = 1000 then
  2130             begin
  2129             begin
  2131             sparkles:= AddVisualGear(Gear^.Angle, Gear^.Power, vgtDust, 1);
  2130             sparkles:= AddVisualGear(hwRound(Gear^.X), Gear^.Angle, vgtDust, 1);
  2132             if sparkles <> nil then
  2131             if sparkles <> nil then
  2133                 begin
  2132                 begin
  2134                 sparkles^.dX:= 0;
  2133                 sparkles^.dX:= 0;
  2135                 sparkles^.dY:= 0;
  2134                 sparkles^.dY:= 0;
  2136                 sparkles^.Angle:= 270;
  2135                 sparkles^.Angle:= 270;