480 if Gear^.Timer > 1 then |
480 if Gear^.Timer > 1 then |
481 begin |
481 begin |
482 AllInactive:= false; |
482 AllInactive:= false; |
483 dec(Gear^.Timer); |
483 dec(Gear^.Timer); |
484 if (Gear^.Timer mod frametime) = 0 then inc(Gear^.Pos) |
484 if (Gear^.Timer mod frametime) = 0 then inc(Gear^.Pos) |
485 end else |
485 end |
486 if Gear^.Timer = 1 then |
486 else if Gear^.Timer = 1 then |
487 begin |
487 begin |
488 Gear^.State:= Gear^.State or gstNoDamage; |
488 Gear^.State:= Gear^.State or gstNoDamage; |
489 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, CurrentHedgehog, EXPLAutoSound); |
489 doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 30, CurrentHedgehog, EXPLAutoSound); |
490 AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtGrave, 0, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; |
490 AddGear(hwRound(Gear^.X), hwRound(Gear^.Y), gtGrave, 0, _0, _0, 0)^.Hedgehog:= Gear^.Hedgehog; |
491 DeleteGear(Gear); |
491 DeleteGear(Gear); |
492 SetAllToActive |
492 SetAllToActive |
493 end else // Gear^.Timer = 0 |
493 end |
|
494 else // Gear^.Timer = 0 |
494 begin |
495 begin |
495 AllInactive:= false; |
496 AllInactive:= false; |
496 Gear^.Z:= cCurrHHZ; |
497 Gear^.Z:= cCurrHHZ; |
497 RemoveGearFromList(Gear); |
498 RemoveGearFromList(Gear); |
498 InsertGearToList(Gear); |
499 InsertGearToList(Gear); |
1041 if not Gear^.Hedgehog^.Team^.hasGone then |
1042 if not Gear^.Hedgehog^.Team^.hasGone then |
1042 begin |
1043 begin |
1043 Gear^.Hedgehog^.Effects[hePoisoned] := false; |
1044 Gear^.Hedgehog^.Effects[hePoisoned] := false; |
1044 if Gear^.Hedgehog^.Effects[heResurrectable] then begin |
1045 if Gear^.Hedgehog^.Effects[heResurrectable] then begin |
1045 ResurrectHedgehog(Gear); |
1046 ResurrectHedgehog(Gear); |
1046 end else begin |
1047 end else |
1047 Gear^.State:= Gear^.State or gstHHDeath; |
1048 begin |
|
1049 Gear^.State:= (Gear^.State or gstHHDeath) and not gstAnimation; |
|
1050 Gear^.Timer:= 0; |
1048 Gear^.doStep:= @doStepHedgehogDead; |
1051 Gear^.doStep:= @doStepHedgehogDead; |
1049 // Death message |
1052 // Death message |
1050 AddCaption(Format(GetEventString(eidDied), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage); |
1053 AddCaption(Format(GetEventString(eidDied), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage); |
1051 end; |
1054 end; |
1052 end |
1055 end |
1053 else |
1056 else |
1054 begin |
1057 begin |
1055 Gear^.State:= Gear^.State or gstHHGone; |
1058 Gear^.State:= Gear^.State or gstHHGone; |
1056 Gear^.doStep:= @doStepHedgehogGone; |
1059 Gear^.doStep:= @doStepHedgehogGone; |