equal
deleted
inserted
replaced
2075 i, x, y: LongInt; |
2075 i, x, y: LongInt; |
2076 k: TGearType; |
2076 k: TGearType; |
2077 exBoom: boolean; |
2077 exBoom: boolean; |
2078 dX, dY: HWFloat; |
2078 dX, dY: HWFloat; |
2079 hog: PHedgehog; |
2079 hog: PHedgehog; |
|
2080 sparkles: PVisualGear; |
2080 begin |
2081 begin |
2081 k := Gear^.Kind; |
2082 k := Gear^.Kind; |
2082 exBoom := false; |
2083 exBoom := false; |
2083 |
2084 |
2084 if (Gear^.Message and gmDestroy) > 0 then |
2085 if (Gear^.Message and gmDestroy) > 0 then |
2106 AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmokeWhite); |
2107 AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmokeWhite); |
2107 dec(Gear^.Health, Gear^.Damage); |
2108 dec(Gear^.Health, Gear^.Damage); |
2108 Gear^.Damage := 0; |
2109 Gear^.Damage := 0; |
2109 if Gear^.Health <= 0 then |
2110 if Gear^.Health <= 0 then |
2110 exBoom := true; |
2111 exBoom := true; |
|
2112 end |
|
2113 else |
|
2114 begin |
|
2115 if Gear^.Timer = 0 then |
|
2116 begin |
|
2117 (* 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 |
|
2118 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 |
|
2119 has its own complexities. *) |
|
2120 sparkles:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtDust, 1); |
|
2121 if sparkles <> nil then |
|
2122 begin |
|
2123 sparkles^.Tint:= $FAB22CFF |
|
2124 end |
|
2125 end; |
|
2126 if (GameTicks and $1 = 0) and (Gear^.Timer < 255) then inc(Gear^.Timer) |
2111 end; |
2127 end; |
2112 |
2128 |
2113 if (Gear^.Damage > 0) or exBoom then |
2129 if (Gear^.Damage > 0) or exBoom then |
2114 begin |
2130 begin |
2115 x := hwRound(Gear^.X); |
2131 x := hwRound(Gear^.X); |