67 GearsList: PGear = nil; |
67 GearsList: PGear = nil; |
68 KilledHHs: Longword = 0; |
68 KilledHHs: Longword = 0; |
69 |
69 |
70 implementation |
70 implementation |
71 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, |
71 uses uWorld, uMisc, uStore, uConsole, uSound, uTeams, uRandom, uCollisions, |
72 uLand, uIO, uLandGraphics, uAIMisc, uLocale, uAI, uAmmos; |
72 uLand, uIO, uLandGraphics, uAIMisc, uLocale, uAI, uAmmos, uTriggers; |
73 var RopePoints: record |
73 var RopePoints: record |
74 Count: Longword; |
74 Count: Longword; |
75 HookAngle: LongInt; |
75 HookAngle: LongInt; |
76 ar: array[0..300] of record |
76 ar: array[0..300] of record |
77 X, Y: hwFloat; |
77 X, Y: hwFloat; |
606 gtParachute: DrawSprite(sprParachute, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 48 + WorldDy, 0, Surface); |
609 gtParachute: DrawSprite(sprParachute, hwRound(Gear^.X) - 24 + WorldDx, hwRound(Gear^.Y) - 48 + WorldDy, 0, Surface); |
607 gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 0, Surface) |
610 gtAirAttack: if Gear^.Tag > 0 then DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 0, Surface) |
608 else DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 1, Surface); |
611 else DrawSprite(sprAirplane, hwRound(Gear^.X) - 60 + WorldDx, hwRound(Gear^.Y) - 25 + WorldDy, 1, Surface); |
609 gtAirBomb: DrawSprite(sprAirBomb , hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, DxDy2Angle32(Gear^.dY, Gear^.dX), Surface); |
612 gtAirBomb: DrawSprite(sprAirBomb , hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, DxDy2Angle32(Gear^.dY, Gear^.dX), Surface); |
610 gtSwitcher: DrawSprite(sprSwitch, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 56 + WorldDy, 0, Surface); |
613 gtSwitcher: DrawSprite(sprSwitch, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 56 + WorldDy, 0, Surface); |
|
614 gtTarget: DrawSprite(sprTarget, hwRound(Gear^.X) - 16 + WorldDx, hwRound(Gear^.Y) - 16 + WorldDy, 0, Surface); |
611 end; |
615 end; |
612 Gear:= Gear^.NextGear |
616 Gear:= Gear^.NextGear |
613 end; |
617 end; |
614 end; |
618 end; |
615 |
619 |
715 dmg:= min(Gear^.Radius + t^.Radius - hwRound(Distance(Gear^.X - t^.X, Gear^.Y - t^.Y)), 25); |
720 dmg:= min(Gear^.Radius + t^.Radius - hwRound(Distance(Gear^.X - t^.X, Gear^.Y - t^.Y)), 25); |
716 if dmg > 0 then |
721 if dmg > 0 then |
717 case t^.Kind of |
722 case t^.Kind of |
718 gtHedgehog, |
723 gtHedgehog, |
719 gtMine, |
724 gtMine, |
720 gtCase: begin |
725 gtCase, |
|
726 gtTarget: begin |
721 inc(t^.Damage, dmg); |
727 inc(t^.Damage, dmg); |
722 if t^.Kind = gtHedgehog then |
728 if t^.Kind = gtHedgehog then |
723 begin |
729 begin |
724 AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), dmg, t); |
730 AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), dmg, t); |
725 inc(hh^.DamageGiven, dmg) |
731 inc(hh^.DamageGiven, dmg) |
754 dec(i); |
760 dec(i); |
755 if (t^.ar[i]^.State and gstNoDamage) = 0 then |
761 if (t^.ar[i]^.State and gstNoDamage) = 0 then |
756 case t^.ar[i]^.Kind of |
762 case t^.ar[i]^.Kind of |
757 gtHedgehog, |
763 gtHedgehog, |
758 gtMine, |
764 gtMine, |
|
765 gtTarget, |
759 gtCase: begin |
766 gtCase: begin |
760 inc(t^.ar[i]^.Damage, Damage); |
767 inc(t^.ar[i]^.Damage, Damage); |
761 if t^.ar[i]^.Kind = gtHedgehog then |
768 if t^.ar[i]^.Kind = gtHedgehog then |
762 begin |
769 begin |
763 AddDamageTag(hwRound(t^.ar[i]^.X), hwRound(t^.ar[i]^.Y), Damage, t^.ar[i]); |
770 AddDamageTag(hwRound(t^.ar[i]^.X), hwRound(t^.ar[i]^.Y), Damage, t^.ar[i]); |