equal
deleted
inserted
replaced
98 |
98 |
99 startAnim = {} |
99 startAnim = {} |
100 fleeAnim = {} |
100 fleeAnim = {} |
101 finalAnim = {} |
101 finalAnim = {} |
102 leaderDeadAnim = {} |
102 leaderDeadAnim = {} |
|
103 |
|
104 nativeAwaitingDeletion = nil |
103 -----------------------------Animations-------------------------------- |
105 -----------------------------Animations-------------------------------- |
104 function EmitDenseClouds(dir) |
106 function EmitDenseClouds(dir) |
105 local dif |
107 local dif |
106 if dir == "Left" then |
108 if dir == "Left" then |
107 dif = 10 |
109 dif = 10 |
646 end |
648 end |
647 for i = 1, 4 do |
649 for i = 1, 4 do |
648 if GetHogName(natives[i]) == GetHogName(enemy) then |
650 if GetHogName(natives[i]) == GetHogName(enemy) then |
649 AnimSetGearPosition(enemy, GetGearPosition(natives[i])) |
651 AnimSetGearPosition(enemy, GetGearPosition(natives[i])) |
650 DeleteGear(natives[i]) |
652 DeleteGear(natives[i]) |
|
653 -- triggers AfterSetupPlace when the gear is *actually* deleted |
|
654 nativeAwaitingDeletion = natives[i] |
651 DeleteGear(cyborgs[cyborgsLeft]) |
655 DeleteGear(cyborgs[cyborgsLeft]) |
|
656 break |
652 end |
657 end |
653 end |
658 end |
654 |
659 |
655 SpawnAmmoCrate(34, 410, amBee, 2) |
660 SpawnAmmoCrate(34, 410, amBee, 2) |
656 SpawnAmmoCrate(33, 374, amRCPlane, 1) |
661 SpawnAmmoCrate(33, 374, amRCPlane, 1) |
760 end |
765 end |
761 |
766 |
762 function onGameStart() |
767 function onGameStart() |
763 SetupAmmo() |
768 SetupAmmo() |
764 SetupPlace() |
769 SetupPlace() |
|
770 -- Animation is setup in AfterSetupPlace |
|
771 end |
|
772 |
|
773 function AfterSetupPlace() |
765 AnimationSetup() |
774 AnimationSetup() |
766 SetupEvents() |
775 SetupEvents() |
767 AddAnim(startAnim) |
776 AddAnim(startAnim) |
768 AddFunction({func = AfterStartAnim, args = {}}) |
777 AddFunction({func = AfterStartAnim, args = {}}) |
769 end |
778 end |
789 toRemove = i |
798 toRemove = i |
790 end |
799 end |
791 end |
800 end |
792 table.remove(natives, toRemove) |
801 table.remove(natives, toRemove) |
793 nativesLeft = nativesLeft - 1 |
802 nativesLeft = nativesLeft - 1 |
|
803 if nativeAwaitingDeletion and gear == nativeAwaitingDeletion then |
|
804 AfterSetupPlace() |
|
805 nativeAwaitingDeletion = nil |
|
806 end |
794 end |
807 end |
795 end |
808 end |
796 end |
809 end |
797 |
810 |
798 function onAmmoStoreInit() |
811 function onAmmoStoreInit() |