equal
deleted
inserted
replaced
908 delay2:= cInactDelay * 50 |
908 delay2:= cInactDelay * 50 |
909 else |
909 else |
910 begin |
910 begin |
911 dec(delay2); |
911 dec(delay2); |
912 |
912 |
913 if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then |
913 if ((delay2 mod cInactDelay) = 0) and (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) then |
914 CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked; |
914 CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked; |
915 if delay2 = 0 then |
915 if delay2 = 0 then |
916 begin |
916 begin |
917 if (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.State and gstAttacked = 0) then SweepDirty; |
917 if (CurrentHedgehog^.Gear <> nil) and (CurrentHedgehog^.Gear^.State and gstAttacked = 0) then SweepDirty; |
918 CheckNoDamage; |
918 CheckNoDamage; |
1585 procedure ResurrectHedgehog(gear: PGear); |
1585 procedure ResurrectHedgehog(gear: PGear); |
1586 var tempTeam : PTeam; |
1586 var tempTeam : PTeam; |
1587 begin |
1587 begin |
1588 gear^.dX := _0; |
1588 gear^.dX := _0; |
1589 gear^.dY := _0; |
1589 gear^.dY := _0; |
1590 gear^.State := gstWait; |
|
1591 gear^.Damage := 0; |
1590 gear^.Damage := 0; |
1592 gear^.Health := gear^.Hedgehog^.InitialHealth; |
1591 gear^.Health := gear^.Hedgehog^.InitialHealth; |
1593 gear^.Hedgehog^.Effects[hePoisoned] := false; |
1592 gear^.Hedgehog^.Effects[hePoisoned] := false; |
1594 if not CurrentHedgehog^.Effects[heResurrectable] then |
1593 if not CurrentHedgehog^.Effects[heResurrectable] then |
1595 with CurrentHedgehog^ do |
1594 with CurrentHedgehog^ do |
1602 DeleteCI(gear); |
1601 DeleteCI(gear); |
1603 FindPlace(gear, false, 0, LAND_WIDTH, true); |
1602 FindPlace(gear, false, 0, LAND_WIDTH, true); |
1604 if gear <> nil then begin |
1603 if gear <> nil then begin |
1605 RenderHealth(gear^.Hedgehog^); |
1604 RenderHealth(gear^.Hedgehog^); |
1606 ScriptCall('onGearResurrect', gear^.uid); |
1605 ScriptCall('onGearResurrect', gear^.uid); |
|
1606 gear^.State := gstWait; |
1607 end; |
1607 end; |
1608 RecountTeamHealth(tempTeam); |
1608 RecountTeamHealth(tempTeam); |
1609 end; |
1609 end; |
1610 |
1610 |
1611 function SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content: Longword): PGear; |
1611 function SpawnCustomCrateAt(x, y: LongInt; crate: TCrateType; content: Longword): PGear; |