604 else if GameTicks and $7 = 0 then |
604 else if GameTicks and $7 = 0 then |
605 begin |
605 begin |
606 with Gear^ do |
606 with Gear^ do |
607 begin |
607 begin |
608 State:= State and not gstInvisible; |
608 State:= State and not gstInvisible; |
609 X:= X + cWindSpeed * 1600 + dX; |
609 X:= X + cWindSpeed * 3200 + dX; |
610 Y:= Y + dY + cGravity * vobFallSpeed * 8; // using same value as flakes to try and get similar results |
610 Y:= Y + dY + cGravity * vobFallSpeed * 8; // using same value as flakes to try and get similar results |
611 xx:= hwRound(X); |
611 xx:= hwRound(X); |
612 yy:= hwRound(Y); |
612 yy:= hwRound(Y); |
613 if vobVelocity <> 0 then |
613 if vobVelocity <> 0 then |
614 begin |
614 begin |
724 ////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS //////////////////////////////////// |
724 ////////////////////////////////// TODO - ASK UNC0RR FOR A GOOD HOME FOR THIS //////////////////////////////////// |
725 end |
725 end |
726 end; |
726 end; |
727 |
727 |
728 if move then |
728 if move then |
|
729 begin |
729 if gun then |
730 if gun then |
730 DeleteGear(Gear) |
731 begin |
731 else |
732 DeleteGear(Gear); |
732 begin |
733 exit |
733 Gear^.X:= int2hwFloat(GetRandom(LAND_WIDTH+1024)-512); |
734 end; |
734 Gear^.Y:= int2hwFloat(750+(GetRandom(50)-25)); |
735 Gear^.X:= int2hwFloat(GetRandom(LAND_WIDTH+1024)-512); |
735 Gear^.State:= Gear^.State or gstInvisible; |
736 Gear^.Y:= int2hwFloat(750+(GetRandom(50)-25)) |
736 end |
737 end |
737 end; |
738 end; |
738 |
739 |
739 //////////////////////////////////////////////////////////////////////////////// |
740 //////////////////////////////////////////////////////////////////////////////// |
740 procedure doStepGrave(Gear: PGear); |
741 procedure doStepGrave(Gear: PGear); |
741 begin |
742 begin |
1070 procedure doStepActionTimer(Gear: PGear); |
1071 procedure doStepActionTimer(Gear: PGear); |
1071 begin |
1072 begin |
1072 dec(Gear^.Timer); |
1073 dec(Gear^.Timer); |
1073 case Gear^.Kind of |
1074 case Gear^.Kind of |
1074 gtATStartGame: |
1075 gtATStartGame: |
1075 begin |
1076 begin |
1076 AllInactive := false; |
1077 AllInactive := false; |
1077 if Gear^.Timer = 0 then |
1078 if Gear^.Timer = 0 then |
1078 begin |
1079 begin |
1079 AddCaption(trmsg[sidStartFight], cWhiteColor, capgrpGameState); |
1080 AddCaption(trmsg[sidStartFight], cWhiteColor, capgrpGameState); |
1080 end |
1081 end |
1081 end; |
1082 end; |
1082 gtATFinishGame: |
1083 gtATSmoothWindCh: |
1083 begin |
1084 begin |
1084 AllInactive := false; |
1085 if Gear^.Timer = 0 then |
1085 if Gear^.Timer = 1000 then |
1086 begin |
1086 begin |
1087 if WindBarWidth < Gear^.Tag then inc(WindBarWidth) |
1087 ScreenFade := sfToBlack; |
1088 else if WindBarWidth > Gear^.Tag then dec(WindBarWidth); |
1088 ScreenFadeValue := 0; |
1089 if WindBarWidth <> Gear^.Tag then Gear^.Timer := 10; |
1089 ScreenFadeSpeed := 1; |
1090 end |
1090 end; |
1091 end; |
1091 if Gear^.Timer = 0 then |
1092 gtATFinishGame: |
1092 begin |
1093 begin |
1093 SendIPC('N'); |
1094 AllInactive := false; |
1094 SendIPC('q'); |
1095 if Gear^.Timer = 1000 then |
1095 GameState := gsExit |
1096 begin |
1096 end |
1097 ScreenFade := sfToBlack; |
1097 end; |
1098 ScreenFadeValue := 0; |
1098 end; |
1099 ScreenFadeSpeed := 1; |
|
1100 end; |
|
1101 if Gear^.Timer = 0 then |
|
1102 begin |
|
1103 SendIPC('N'); |
|
1104 SendIPC('q'); |
|
1105 GameState := gsExit |
|
1106 end |
|
1107 end; |
|
1108 end; |
1099 if Gear^.Timer = 0 then DeleteGear(Gear) |
1109 if Gear^.Timer = 0 then DeleteGear(Gear) |
1100 end; |
1110 end; |
1101 |
1111 |
1102 //////////////////////////////////////////////////////////////////////////////// |
1112 //////////////////////////////////////////////////////////////////////////////// |
1103 procedure doStepPickHammerWork(Gear: PGear); |
1113 procedure doStepPickHammerWork(Gear: PGear); |
2554 if ((Gear^.Message and not gmSwitch) <> 0) or (TurnTimeLeft = 0) then |
2564 if ((Gear^.Message and not gmSwitch) <> 0) or (TurnTimeLeft = 0) then |
2555 begin |
2565 begin |
2556 HHGear := Gear^.Hedgehog^.Gear; |
2566 HHGear := Gear^.Hedgehog^.Gear; |
2557 Msg := Gear^.Message and not gmSwitch; |
2567 Msg := Gear^.Message and not gmSwitch; |
2558 DeleteGear(Gear); |
2568 DeleteGear(Gear); |
2559 OnUsedAmmo(HHGear^.Hedgehog^); |
|
2560 ApplyAmmoChanges(HHGear^.Hedgehog^); |
2569 ApplyAmmoChanges(HHGear^.Hedgehog^); |
2561 |
2570 |
2562 HHGear := CurrentHedgehog^.Gear; |
2571 HHGear := CurrentHedgehog^.Gear; |
2563 ApplyAmmoChanges(HHGear^.Hedgehog^); |
2572 ApplyAmmoChanges(HHGear^.Hedgehog^); |
2564 HHGear^.Message := Msg; |
2573 HHGear^.Message := Msg; |