2112 if Gear^.Health <= 0 then |
2112 if Gear^.Health <= 0 then |
2113 exBoom := true; |
2113 exBoom := true; |
2114 end |
2114 end |
2115 else |
2115 else |
2116 begin |
2116 begin |
2117 if Gear^.Timer = 0 then |
2117 if Gear^.Timer = 500 then |
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 sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1); |
2122 // Abuse a couple of gear values to track origin |
2123 if sparkles <> nil then |
2123 Gear^.Angle:= hwRound(Gear^.X); |
2124 begin |
2124 Gear^.Power:= hwRound(Gear^.Y); |
2125 sparkles^.Tint:= $FAB22CFF |
2125 Gear^.Tag:= random(2); |
2126 end |
2126 inc(Gear^.Timer) |
2127 end; |
2127 end; |
2128 if (GameTicks and $1 = 0) and (Gear^.Timer < 255) then inc(Gear^.Timer) |
2128 if Gear^.Timer < 1833 then inc(Gear^.Timer); |
|
2129 if Gear^.Timer = 1000 then |
|
2130 begin |
|
2131 sparkles:= AddVisualGear(Gear^.Angle, Gear^.Power, vgtDust, 1); |
|
2132 if sparkles <> nil then |
|
2133 begin |
|
2134 sparkles^.dX:= 0; |
|
2135 sparkles^.dY:= 0; |
|
2136 sparkles^.Angle:= 270; |
|
2137 if Gear^.Tag = 1 then |
|
2138 sparkles^.Tint:= $3744D7FF |
|
2139 else sparkles^.Tint:= $FAB22CFF |
|
2140 end; |
|
2141 end; |
|
2142 if Gear^.Timer < 1000 then exit; |
2129 end; |
2143 end; |
2130 |
2144 |
2131 if (Gear^.Damage > 0) or exBoom then |
2145 if (Gear^.Damage > 0) or exBoom then |
2132 begin |
2146 begin |
2133 x := hwRound(Gear^.X); |
2147 x := hwRound(Gear^.X); |