442 DeleteGear(Gear); |
442 DeleteGear(Gear); |
443 exit |
443 exit |
444 end; |
444 end; |
445 if (GameTicks and $3F) = 0 then |
445 if (GameTicks and $3F) = 0 then |
446 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace); |
446 AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtSmokeTrace); |
|
447 end; |
|
448 |
|
449 //////////////////////////////////////////////////////////////////////////////// |
|
450 procedure doStepHealthTagWork(Gear: PGear); |
|
451 begin |
|
452 if Gear^.Kind = gtHealthTag then |
|
453 AllInactive:= false; |
|
454 |
|
455 dec(Gear^.Timer); |
|
456 Gear^.Y:= Gear^.Y + Gear^.dY; |
|
457 |
|
458 if Gear^.Timer = 0 then |
|
459 begin |
|
460 if (Gear^.Kind = gtHealthTag) and (PHedgehog(Gear^.Hedgehog)^.Gear <> nil) then |
|
461 PHedgehog(Gear^.Hedgehog)^.Gear^.Active:= true; // to let current hh die |
|
462 DeleteGear(Gear) |
|
463 end |
|
464 end; |
|
465 |
|
466 procedure doStepHealthTagWorkUnderWater(Gear: PGear); |
|
467 begin |
|
468 AllInactive:= false; |
|
469 |
|
470 Gear^.Y:= Gear^.Y - _0_08; |
|
471 |
|
472 if hwRound(Gear^.Y) < cWaterLine + 10 then |
|
473 DeleteGear(Gear) |
|
474 end; |
|
475 |
|
476 procedure doStepHealthTag(Gear: PGear); |
|
477 var s: shortstring; |
|
478 begin |
|
479 AllInactive:= false; |
|
480 Gear^.dY:= -_0_08; |
|
481 |
|
482 str(Gear^.State, s); |
|
483 Gear^.Tex:= RenderStringTex(s, PHedgehog(Gear^.Hedgehog)^.Team^.Clan^.Color, fnt16); |
|
484 |
|
485 if hwRound(Gear^.Y) < cWaterLine then |
|
486 Gear^.doStep:= @doStepHealthTagWork |
|
487 else |
|
488 Gear^.doStep:= @doStepHealthTagWorkUnderWater; |
|
489 |
|
490 Gear^.Y:= Gear^.Y - int2hwFloat(Gear^.Tex^.h) |
447 end; |
491 end; |
448 |
492 |
449 //////////////////////////////////////////////////////////////////////////////// |
493 //////////////////////////////////////////////////////////////////////////////// |
450 procedure doStepGrave(Gear: PGear); |
494 procedure doStepGrave(Gear: PGear); |
451 begin |
495 begin |