equal
deleted
inserted
replaced
346 end |
346 end |
347 end; |
347 end; |
348 gtATFinishGame: begin |
348 gtATFinishGame: begin |
349 AllInactive:= false; |
349 AllInactive:= false; |
350 if Gear.Timer = 0 then |
350 if Gear.Timer = 0 then |
|
351 begin |
|
352 SendIPC('N'); |
351 GameState:= gsExit |
353 GameState:= gsExit |
|
354 end |
352 end; |
355 end; |
353 end; |
356 end; |
354 if Gear.Timer = 0 then DeleteGear(Gear) |
357 if Gear.Timer = 0 then DeleteGear(Gear) |
355 end; |
358 end; |
356 |
359 |
437 begin |
440 begin |
438 Message:= Message and not gm_Attack; |
441 Message:= Message and not gm_Attack; |
439 State:= State or gstFalling; |
442 State:= State or gstFalling; |
440 end; |
443 end; |
441 DeleteGear(Gear); |
444 DeleteGear(Gear); |
442 OnUsedAmmo(PHedgehog(Gear.Hedgehog)^.Ammo); |
445 OnUsedAmmo(PHedgehog(HHGear.Hedgehog)^.Ammo); |
443 ApplyAmmoChanges(PHedgehog(Gear.Hedgehog)^) |
446 ApplyAmmoChanges(PHedgehog(HHGear.Hedgehog)^) |
444 end; |
447 end; |
445 |
448 |
446 begin |
449 begin |
447 HHGear:= PHedgehog(Gear.Hedgehog).Gear; |
450 HHGear:= PHedgehog(Gear.Hedgehog).Gear; |
448 |
451 |
549 |
552 |
550 procedure doStepRopeAttach(Gear: PGear); |
553 procedure doStepRopeAttach(Gear: PGear); |
551 var HHGear: PGear; |
554 var HHGear: PGear; |
552 tx, ty, tt: Double; |
555 tx, ty, tt: Double; |
553 begin |
556 begin |
554 Gear.X:= Gear.X + Gear.dX; |
557 Gear.X:= Gear.X - Gear.dX; |
555 Gear.Y:= Gear.Y + Gear.dY; |
558 Gear.Y:= Gear.Y - Gear.dY; |
556 Gear.Elasticity:= Gear.Elasticity + 1.0; |
559 Gear.Elasticity:= Gear.Elasticity + 1.0; |
557 HHGear:= PHedgehog(Gear.Hedgehog)^.Gear; |
560 HHGear:= PHedgehog(Gear.Hedgehog)^.Gear; |
558 if (HHGear.State and gstFalling) <> 0 then |
561 if (HHGear.State and gstFalling) <> 0 then |
559 if TestCollisionYwithGear(HHGear, 1) then |
562 if TestCollisionYwithGear(HHGear, 1) then |
560 begin |
563 begin |
582 Gear.Elasticity:= tt; |
585 Gear.Elasticity:= tt; |
583 Gear.doStep:= doStepRopeWork; |
586 Gear.doStep:= doStepRopeWork; |
584 with HHGear^ do State:= State and not gstAttacking; |
587 with HHGear^ do State:= State and not gstAttacking; |
585 tt:= 0 |
588 tt:= 0 |
586 end; |
589 end; |
587 tx:= tx - Gear.dX - Gear.dX; |
590 tx:= tx + Gear.dX - Gear.dX; |
588 ty:= ty - Gear.dY - Gear.dY; |
591 ty:= ty + Gear.dY - Gear.dY; |
589 tt:= tt - 2.0; |
592 tt:= tt - 2.0; |
590 end; |
593 end; |
591 end; |
594 end; |
592 CheckCollision(Gear); |
595 CheckCollision(Gear); |
593 if (Gear.State and gstCollision) <> 0 then |
596 if (Gear.State and gstCollision) <> 0 then |
609 end |
612 end |
610 end; |
613 end; |
611 |
614 |
612 procedure doStepRope(Gear: PGear); |
615 procedure doStepRope(Gear: PGear); |
613 begin |
616 begin |
|
617 Gear.dX:= - Gear.dX; |
|
618 Gear.dY:= - Gear.dY; |
614 Gear.doStep:= doStepRopeAttach |
619 Gear.doStep:= doStepRopeAttach |
615 end; |
620 end; |
616 |
621 |
617 //////////////////////////////////////////////////////////////////////////////// |
622 //////////////////////////////////////////////////////////////////////////////// |
618 procedure doStepSmokeTrace(Gear: PGear); |
623 procedure doStepSmokeTrace(Gear: PGear); |