58 ((Gear^.State and gstHHDriven) = 0) then exit; |
58 ((Gear^.State and gstHHDriven) = 0) then exit; |
59 ChangeAmmo:= true; |
59 ChangeAmmo:= true; |
60 |
60 |
61 while (ammoidx < cMaxSlotAmmoIndex) and (Ammo^[slot, ammoidx].AmmoType <> CurAmmoType) do inc(ammoidx); |
61 while (ammoidx < cMaxSlotAmmoIndex) and (Ammo^[slot, ammoidx].AmmoType <> CurAmmoType) do inc(ammoidx); |
62 |
62 |
63 if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) and (MultiShootAttacks > 0) then OnUsedAmmo(PHedgehog(Gear^.Hedgehog)^); |
63 if ((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) and (MultiShootAttacks > 0) then OnUsedAmmo(Gear^.Hedgehog^); |
64 |
64 |
65 MultiShootAttacks:= 0; |
65 MultiShootAttacks:= 0; |
66 Gear^.Message:= Gear^.Message and not (gmLJump or gmHJump); |
66 Gear^.Message:= Gear^.Message and not (gmLJump or gmHJump); |
67 |
67 |
68 if Ammoz[CurAmmoType].Slot = slot then |
68 if Ammoz[CurAmmoType].Slot = slot then |
116 begin |
116 begin |
117 s:= ChangeAmmo(Gear); |
117 s:= ChangeAmmo(Gear); |
118 dec(t) |
118 dec(t) |
119 end; |
119 end; |
120 |
120 |
121 if s then ApplyAmmoChanges(PHedgehog(Gear^.Hedgehog)^) |
121 if s then ApplyAmmoChanges(Gear^.Hedgehog^) |
122 end; |
122 end; |
123 |
123 |
124 procedure HHSetTimer(Gear: PGear); |
124 procedure HHSetTimer(Gear: PGear); |
125 var CurWeapon: PAmmo; |
125 var CurWeapon: PAmmo; |
126 begin |
126 begin |
127 Gear^.Message:= Gear^.Message and not gmTimer; |
127 Gear^.Message:= Gear^.Message and not gmTimer; |
128 CurWeapon:= GetAmmoEntry(PHedgehog(Gear^.Hedgehog)^); |
128 CurWeapon:= GetAmmoEntry(Gear^.Hedgehog^); |
129 with PHedgehog(Gear^.Hedgehog)^ do |
129 with Gear^.Hedgehog^ do |
130 if (CurWeapon^.Propz and ammoprop_Timerable) <> 0 then |
130 if (CurWeapon^.Propz and ammoprop_Timerable) <> 0 then |
131 begin |
131 begin |
132 CurWeapon^.Timer:= 1000 * Gear^.MsgParam; |
132 CurWeapon^.Timer:= 1000 * Gear^.MsgParam; |
133 with CurrentTeam^ do |
133 with CurrentTeam^ do |
134 ApplyAmmoChanges(Hedgehogs[CurrHedgehog]); |
134 ApplyAmmoChanges(Hedgehogs[CurrHedgehog]); |
141 tmpGear: PVisualGear; |
141 tmpGear: PVisualGear; |
142 CurWeapon: PAmmo; |
142 CurWeapon: PAmmo; |
143 altUse: boolean; |
143 altUse: boolean; |
144 begin |
144 begin |
145 bShowFinger:= false; |
145 bShowFinger:= false; |
146 CurWeapon:= GetAmmoEntry(PHedgehog(Gear^.Hedgehog)^); |
146 CurWeapon:= GetAmmoEntry(Gear^.Hedgehog^); |
147 with Gear^, |
147 with Gear^, |
148 PHedgehog(Gear^.Hedgehog)^ do |
148 Gear^.Hedgehog^ do |
149 begin |
149 begin |
150 if ((State and gstHHDriven) <> 0)and |
150 if ((State and gstHHDriven) <> 0)and |
151 ((State and (gstAttacked or gstHHChooseTarget)) = 0) and |
151 ((State and (gstAttacked or gstHHChooseTarget)) = 0) and |
152 (((State and gstMoving) = 0) or |
152 (((State and gstMoving) = 0) or |
153 // Allow attacks while moving on ammo with AltAttack |
153 // Allow attacks while moving on ammo with AltAttack |
205 amGrenade: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtBomb, 0, newDx, newDy, CurWeapon^.Timer); |
205 amGrenade: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtBomb, 0, newDx, newDy, CurWeapon^.Timer); |
206 amMolotov: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtMolotov, 0, newDx, newDy, 0); |
206 amMolotov: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtMolotov, 0, newDx, newDy, 0); |
207 amClusterBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtClusterBomb, 0, newDx, newDy, CurWeapon^.Timer); |
207 amClusterBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtClusterBomb, 0, newDx, newDy, CurWeapon^.Timer); |
208 amGasBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtGasBomb, 0, newDx, newDy, CurWeapon^.Timer); |
208 amGasBomb: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtGasBomb, 0, newDx, newDy, CurWeapon^.Timer); |
209 amBazooka: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtShell, 0, newDx, newDy, 0); |
209 amBazooka: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtShell, 0, newDx, newDy, 0); |
|
210 amSnowball: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtSnowball, 0, newDx, newDy, 0); |
210 amBee: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtBee, 0, newDx, newDy, 0); |
211 amBee: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtBee, 0, newDx, newDy, 0); |
211 amShotgun: begin |
212 amShotgun: begin |
212 PlaySound(sndShotgunReload); |
213 PlaySound(sndShotgunReload); |
213 CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtShotgunShot, 0, xx * _0_5, yy * _0_5, 0); |
214 CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly), gtShotgunShot, 0, xx * _0_5, yy * _0_5, 0); |
214 end; |
215 end; |
220 else |
221 else |
221 AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtMine, gstWait, SignAs(_0_02, dX), _0, 3000); |
222 AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtMine, gstWait, SignAs(_0_02, dX), _0, 3000); |
222 amSMine: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtSMine, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); |
223 amSMine: FollowGear:= AddGear(hwRound(lx), hwRound(ly), gtSMine, 0, xx*Power/cPowerDivisor, yy*Power/cPowerDivisor, 0); |
223 amDEagle: CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0); |
224 amDEagle: CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtDEagleShot, 0, xx * _0_5, yy * _0_5, 0); |
224 amSineGun: CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSineGunShot, 0, xx * _0_5, yy * _0_5, 0); |
225 amSineGun: CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSineGunShot, 0, xx * _0_5, yy * _0_5, 0); |
225 amPortalGun: AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtPortal, 0, xx * _0_6, yy * _0_6, 0); |
226 amPortalGun: begin |
|
227 AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtPortal, 0, xx * _0_6, yy * _0_6, |
|
228 // set selected color |
|
229 CurWeapon^.Pos); |
|
230 end; |
226 amSniperRifle: begin |
231 amSniperRifle: begin |
227 PlaySound(sndSniperReload); |
232 PlaySound(sndSniperReload); |
228 CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0); |
233 CurAmmoGear:= AddGear(hwRound(lx + xx * cHHRadius), hwRound(ly + yy * cHHRadius), gtSniperRifleShot, 0, xx * _0_5, yy * _0_5, 0); |
229 end; |
234 end; |
230 amDynamite: AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000); |
235 amDynamite: AddGear(hwRound(lx) + hwSign(dX) * 7, hwRound(ly), gtDynamite, 0, SignAs(_0_03, dX), _0, 5000); |
273 PlaySound(sndWhistle); |
278 PlaySound(sndWhistle); |
274 CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly) - 32, gtBirdy, 0, _0, _0, 0); |
279 CurAmmoGear:= AddGear(hwRound(lx), hwRound(ly) - 32, gtBirdy, 0, _0, _0, 0); |
275 end; |
280 end; |
276 amLowGravity: begin |
281 amLowGravity: begin |
277 PlaySound(sndLowGravity); |
282 PlaySound(sndLowGravity); |
278 cGravity:= cMaxWindSpeed |
283 cGravity:= cMaxWindSpeed; |
|
284 cGravityf:= 0.00025 |
279 end; |
285 end; |
280 amExtraDamage:begin |
286 amExtraDamage:begin |
281 PlaySound(sndHellishImpact4); |
287 PlaySound(sndHellishImpact4); |
282 cDamageModifier:= _1_5 |
288 cDamageModifier:= _1_5 |
283 end; |
289 end; |
384 //////////////////////////////////////////////////////////////////////////////// |
390 //////////////////////////////////////////////////////////////////////////////// |
385 procedure doStepHedgehogDead(Gear: PGear); |
391 procedure doStepHedgehogDead(Gear: PGear); |
386 const frametime = 200; |
392 const frametime = 200; |
387 timertime = frametime * 6; |
393 timertime = frametime * 6; |
388 begin |
394 begin |
389 if PHedgehog(Gear^.Hedgehog)^.Unplaced then exit; |
395 if Gear^.Hedgehog^.Unplaced then exit; |
390 if Gear^.Timer > 1 then |
396 if Gear^.Timer > 1 then |
391 begin |
397 begin |
392 AllInactive:= false; |
398 AllInactive:= false; |
393 dec(Gear^.Timer); |
399 dec(Gear^.Timer); |
394 if (Gear^.Timer mod frametime) = 0 then inc(Gear^.Pos) |
400 if (Gear^.Timer mod frametime) = 0 then inc(Gear^.Pos) |
404 begin |
410 begin |
405 AllInactive:= false; |
411 AllInactive:= false; |
406 Gear^.Z:= cCurrHHZ; |
412 Gear^.Z:= cCurrHHZ; |
407 RemoveGearFromList(Gear); |
413 RemoveGearFromList(Gear); |
408 InsertGearToList(Gear); |
414 InsertGearToList(Gear); |
409 PlaySound(sndByeBye, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack); |
415 PlaySound(sndByeBye, Gear^.Hedgehog^.Team^.voicepack); |
410 Gear^.Pos:= 0; |
416 Gear^.Pos:= 0; |
411 Gear^.Timer:= timertime |
417 Gear^.Timer:= timertime |
412 end |
418 end |
413 end; |
419 end; |
414 |
420 |
415 //////////////////////////////////////////////////////////////////////////////// |
421 //////////////////////////////////////////////////////////////////////////////// |
416 procedure doStepHedgehogGone(Gear: PGear); |
422 procedure doStepHedgehogGone(Gear: PGear); |
417 const frametime = 65; |
423 const frametime = 65; |
418 timertime = frametime * 11; |
424 timertime = frametime * 11; |
419 begin |
425 begin |
420 if PHedgehog(Gear^.Hedgehog)^.Unplaced then exit; |
426 if Gear^.Hedgehog^.Unplaced then exit; |
421 if Gear^.Timer > 1 then |
427 if Gear^.Timer > 1 then |
422 begin |
428 begin |
423 AllInactive:= false; |
429 AllInactive:= false; |
424 dec(Gear^.Timer); |
430 dec(Gear^.Timer); |
425 if (Gear^.Timer mod frametime) = 0 then inc(Gear^.Pos) |
431 if (Gear^.Timer mod frametime) = 0 then inc(Gear^.Pos) |
452 PlaySound(sndShotgunReload); |
458 PlaySound(sndShotgunReload); |
453 case Gear^.Pos of |
459 case Gear^.Pos of |
454 posCaseUtility, |
460 posCaseUtility, |
455 posCaseAmmo: begin |
461 posCaseAmmo: begin |
456 a:= Gear^.AmmoType; |
462 a:= Gear^.AmmoType; |
457 AddAmmo(PHedgehog(HH^.Hedgehog)^, a); |
463 AddAmmo(HH^.Hedgehog^, a); |
458 // Possibly needs to check shared clan ammo game flag once added. |
464 // Possibly needs to check shared clan ammo game flag once added. |
459 // On the other hand, no obvious reason that clan members shouldn't know what ammo another clan member picked up |
465 // On the other hand, no obvious reason that clan members shouldn't know what ammo another clan member picked up |
460 if (not (PHedgehog(HH^.Hedgehog)^.Team^.ExtDriven |
466 if (not (HH^.Hedgehog^.Team^.ExtDriven |
461 or (PHedgehog(HH^.Hedgehog)^.BotLevel > 0))) |
467 or (HH^.Hedgehog^.BotLevel > 0))) |
462 or (PHedgehog(HH^.Hedgehog)^.Team^.Clan^.ClanIndex = LocalClan) |
468 or (HH^.Hedgehog^.Team^.Clan^.ClanIndex = LocalClan) |
463 or (GameType = gmtDemo) then |
469 or (GameType = gmtDemo) then |
464 begin |
470 begin |
465 s:= trammo[Ammoz[a].NameId] + ' (+' + IntToStr(Ammoz[a].NumberInCase) + ')'; |
471 s:= trammo[Ammoz[a].NameId] + ' (+' + IntToStr(Ammoz[a].NumberInCase) + ')'; |
466 AddCaption(s, PHedgehog(HH^.Hedgehog)^.Team^.Clan^.Color, capgrpAmmoinfo); |
472 AddCaption(s, HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo); |
467 |
473 |
468 // show ammo icon |
474 // show ammo icon |
469 vga:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtAmmo); |
475 vga:= AddVisualGear(hwRound(Gear^.X), hwRound(Gear^.Y), vgtAmmo); |
470 if vga <> nil then |
476 if vga <> nil then |
471 vga^.Frame:= Longword(a); |
477 vga^.Frame:= Longword(a); |
472 end; |
478 end; |
473 |
479 |
474 end; |
480 end; |
475 posCaseHealth: begin |
481 posCaseHealth: begin |
476 inc(HH^.Health, Gear^.Health); |
482 inc(HH^.Health, Gear^.Health); |
477 PHedgehog(HH^.Hedgehog)^.Effects[hePoisoned] := false; |
483 HH^.Hedgehog^.Effects[hePoisoned] := false; |
478 str(Gear^.Health, s); |
484 str(Gear^.Health, s); |
479 s:= '+' + s; |
485 s:= '+' + s; |
480 AddCaption(s, PHedgehog(HH^.Hedgehog)^.Team^.Clan^.Color, capgrpAmmoinfo); |
486 AddCaption(s, HH^.Hedgehog^.Team^.Clan^.Color, capgrpAmmoinfo); |
481 RenderHealth(PHedgehog(HH^.Hedgehog)^); |
487 RenderHealth(HH^.Hedgehog^); |
482 RecountTeamHealth(PHedgehog(HH^.Hedgehog)^.Team); |
488 RecountTeamHealth(HH^.Hedgehog^.Team); |
483 |
489 |
484 i:= 0; |
490 i:= 0; |
485 while i < Gear^.Health do |
491 while i < Gear^.Health do |
486 begin |
492 begin |
487 AddVisualGear(hwRound(HH^.X), hwRound(HH^.Y), vgtHealth); |
493 AddVisualGear(hwRound(HH^.X), hwRound(HH^.Y), vgtHealth); |
495 |
501 |
496 procedure HedgehogStep(Gear: PGear); |
502 procedure HedgehogStep(Gear: PGear); |
497 var PrevdX: LongInt; |
503 var PrevdX: LongInt; |
498 CurWeapon: PAmmo; |
504 CurWeapon: PAmmo; |
499 begin |
505 begin |
500 CurWeapon:= GetAmmoEntry(PHedgehog(Gear^.Hedgehog)^); |
506 CurWeapon:= GetAmmoEntry(Gear^.Hedgehog^); |
501 if ((Gear^.State and (gstAttacking or gstMoving)) = 0) then |
507 if ((Gear^.State and (gstAttacking or gstMoving)) = 0) then |
502 begin |
508 begin |
503 if isCursorVisible then |
509 if isCursorVisible then |
504 with PHedgehog(Gear^.Hedgehog)^ do |
510 with Gear^.Hedgehog^ do |
505 with CurWeapon^ do |
511 with CurWeapon^ do |
506 begin |
512 begin |
507 if (Gear^.Message and gmLeft ) <> 0 then |
513 if (Gear^.Message and gmLeft ) <> 0 then |
508 Pos:= (Pos - 1 + Ammoz[AmmoType].PosCount) mod Ammoz[AmmoType].PosCount |
514 Pos:= (Pos - 1 + Ammoz[AmmoType].PosCount) mod Ammoz[AmmoType].PosCount |
509 else |
515 else |
534 or TestCollisionYwithGear(Gear, -1)) then |
540 or TestCollisionYwithGear(Gear, -1)) then |
535 begin |
541 begin |
536 Gear^.dY:= -_0_15; |
542 Gear^.dY:= -_0_15; |
537 if not cArtillery then Gear^.dX:= SignAs(_0_15, Gear^.dX); |
543 if not cArtillery then Gear^.dX:= SignAs(_0_15, Gear^.dX); |
538 Gear^.State:= Gear^.State or gstMoving or gstHHJumping; |
544 Gear^.State:= Gear^.State or gstMoving or gstHHJumping; |
539 PlaySound(sndJump1, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack); |
545 PlaySound(sndJump1, Gear^.Hedgehog^.Team^.voicepack); |
540 exit |
546 exit |
541 end; |
547 end; |
542 end; |
548 end; |
543 |
549 |
544 if ((Gear^.Message and gmHJump ) <> 0) then |
550 if ((Gear^.Message and gmHJump ) <> 0) then |
568 FollowGear:= Gear; |
574 FollowGear:= Gear; |
569 exit |
575 exit |
570 end; |
576 end; |
571 DeleteCI(Gear); // must be after exit!! (see previous line) |
577 DeleteCI(Gear); // must be after exit!! (see previous line) |
572 |
578 |
573 PHedgehog(Gear^.Hedgehog)^.visStepPos:= (PHedgehog(Gear^.Hedgehog)^.visStepPos + 1) and 7; |
579 Gear^.Hedgehog^.visStepPos:= (Gear^.Hedgehog^.visStepPos + 1) and 7; |
574 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then |
580 if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then |
575 begin |
581 begin |
576 if not (TestCollisionXwithXYShift(Gear, _0, -6, hwSign(Gear^.dX)) |
582 if not (TestCollisionXwithXYShift(Gear, _0, -6, hwSign(Gear^.dX)) |
577 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
583 or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1; |
578 if not (TestCollisionXwithXYShift(Gear, _0, -5, hwSign(Gear^.dX)) |
584 if not (TestCollisionXwithXYShift(Gear, _0, -5, hwSign(Gear^.dX)) |
628 end; |
634 end; |
629 |
635 |
630 procedure HedgehogChAngle(Gear: PGear); |
636 procedure HedgehogChAngle(Gear: PGear); |
631 var da: LongWord; |
637 var da: LongWord; |
632 begin |
638 begin |
633 with PHedgehog(Gear^.Hedgehog)^ do |
639 with Gear^.Hedgehog^ do |
634 if (CurAmmoType = amRope) |
640 if (CurAmmoType = amRope) |
635 and ((Gear^.State and (gstMoving or gstHHJumping)) = gstMoving) then da:= 2 else da:= 1; |
641 and ((Gear^.State and (gstMoving or gstHHJumping)) = gstMoving) then da:= 2 else da:= 1; |
636 |
642 |
637 if (((Gear^.Message and gmPrecise) = 0) or ((GameTicks mod 5) = 1)) then |
643 if (((Gear^.Message and gmPrecise) = 0) or ((GameTicks mod 5) = 1)) then |
638 if ((Gear^.Message and gmUp) <> 0) and (Gear^.Angle >= CurMinAngle + da) then dec(Gear^.Angle, da) |
644 if ((Gear^.Message and gmUp) <> 0) and (Gear^.Angle >= CurMinAngle + da) then dec(Gear^.Angle, da) |
665 else |
671 else |
666 begin |
672 begin |
667 Gear^.dY:= Gear^.dY + cGravity; |
673 Gear^.dY:= Gear^.dY + cGravity; |
668 // this set of circumstances could be less complex if jumping was more clearly identified |
674 // this set of circumstances could be less complex if jumping was more clearly identified |
669 if ((GameFlags and gfMoreWind) <> 0) and |
675 if ((GameFlags and gfMoreWind) <> 0) and |
670 (Gear^.Damage <> 0) or |
676 (((Gear^.Damage <> 0) or |
671 ((CurAmmoGear <> nil) and |
677 ((CurAmmoGear <> nil) and |
672 ((CurAmmoGear^.AmmoType = amJetpack) or |
678 ((CurAmmoGear^.AmmoType = amJetpack) or |
673 (CurAmmoGear^.AmmoType = amBirdy))) or |
679 (CurAmmoGear^.AmmoType = amBirdy))) or |
674 ((Gear^.dY.QWordValue + Gear^.dX.QWordValue) > _0_55.QWordValue) |
680 ((Gear^.dY.QWordValue + Gear^.dX.QWordValue) > _0_55.QWordValue))) |
675 then Gear^.dX := Gear^.dX + cWindSpeed * _0_2 |
681 then Gear^.dX := Gear^.dX + cWindSpeed / Gear^.Density |
676 end |
682 end |
677 end |
683 end |
678 else |
684 else |
679 begin |
685 begin |
680 if ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) < _0_55.QWordValue) |
686 if ((Gear^.dX.QWordValue + Gear^.dY.QWordValue) < _0_55.QWordValue) |
917 Gear^.Timer:= 0; |
923 Gear^.Timer:= 0; |
918 FollowGear:= Gear; |
924 FollowGear:= Gear; |
919 PrvInactive:= false; |
925 PrvInactive:= false; |
920 AllInactive:= false; |
926 AllInactive:= false; |
921 |
927 |
922 if not PHedgehog(Gear^.Hedgehog)^.Team^.hasGone then |
928 if not Gear^.Hedgehog^.Team^.hasGone then |
923 begin |
929 begin |
924 PHedgehog(Gear^.Hedgehog)^.Effects[hePoisoned] := false; |
930 Gear^.Hedgehog^.Effects[hePoisoned] := false; |
925 if PHedgehog(Gear^.Hedgehog)^.Effects[heResurrectable] then begin |
931 if Gear^.Hedgehog^.Effects[heResurrectable] then begin |
926 ResurrectHedgehog(Gear); |
932 ResurrectHedgehog(Gear); |
927 end else begin |
933 end else begin |
928 Gear^.State:= Gear^.State or gstHHDeath; |
934 Gear^.State:= Gear^.State or gstHHDeath; |
929 Gear^.doStep:= @doStepHedgehogDead; |
935 Gear^.doStep:= @doStepHedgehogDead; |
930 // Death message |
936 // Death message |
931 AddCaption(Format(GetEventString(eidDied), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage); |
937 AddCaption(Format(GetEventString(eidDied), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage); |
932 end; |
938 end; |
933 end |
939 end |
934 else |
940 else |
935 begin |
941 begin |
936 Gear^.State:= Gear^.State or gstHHGone; |
942 Gear^.State:= Gear^.State or gstHHGone; |
937 Gear^.doStep:= @doStepHedgehogGone; |
943 Gear^.doStep:= @doStepHedgehogGone; |
938 // Gone message |
944 // Gone message |
939 AddCaption(Format(GetEventString(eidGone), PHedgehog(Gear^.Hedgehog)^.Name), cWhiteColor, capgrpMessage); |
945 AddCaption(Format(GetEventString(eidGone), Gear^.Hedgehog^.Name), cWhiteColor, capgrpMessage); |
940 end |
946 end |
941 end; |
947 end; |
942 exit |
948 exit |
943 end; |
949 end; |
944 |
950 |