equal
deleted
inserted
replaced
2940 end; |
2940 end; |
2941 |
2941 |
2942 //////////////////////////////////////////////////////////////////////////////// |
2942 //////////////////////////////////////////////////////////////////////////////// |
2943 procedure doStepSeductionWork(Gear: PGear); |
2943 procedure doStepSeductionWork(Gear: PGear); |
2944 var |
2944 var |
2945 x, y: LongInt; |
2945 x, y, i: LongInt; |
2946 begin |
2946 hogs: TPGearArray; |
2947 AllInactive := false; |
2947 d: hwFloat; |
2948 |
2948 begin |
|
2949 AllInactive := false; |
|
2950 hogs := GearsNear(Gear^.X, Gear^.Y, gtHedgehog, Gear^.Radius); |
|
2951 if Length(hogs) > 0 then |
|
2952 begin |
|
2953 for i:= 0 to High(hogs) do |
|
2954 begin |
|
2955 //d:= Distance(Gear^.X - hogs[i]^.X, Gear^.Y - hogs[i]^.Y); |
|
2956 hogs[i]^.dX:= _0_25 * (Gear^.X - hogs[i]^.X) / _250; |
|
2957 //if Gear^.X < hogs[i]^.X then hogs[i]^.dX.isNegative:= true; |
|
2958 hogs[i]^.dY:= -_0_25; |
|
2959 hogs[i]^.Active:= true; |
|
2960 end; |
|
2961 end ; |
|
2962 AfterAttack; |
|
2963 DeleteGear(Gear); |
|
2964 (* |
2949 Gear^.X := Gear^.X + Gear^.dX; |
2965 Gear^.X := Gear^.X + Gear^.dX; |
2950 Gear^.Y := Gear^.Y + Gear^.dY; |
2966 Gear^.Y := Gear^.Y + Gear^.dY; |
2951 x := hwRound(Gear^.X); |
2967 x := hwRound(Gear^.X); |
2952 y := hwRound(Gear^.Y); |
2968 y := hwRound(Gear^.Y); |
2953 |
2969 |
2965 else |
2981 else |
2966 else |
2982 else |
2967 begin |
2983 begin |
2968 AfterAttack; |
2984 AfterAttack; |
2969 DeleteGear(Gear) |
2985 DeleteGear(Gear) |
2970 end |
2986 end*) |
2971 end; |
2987 end; |
2972 |
2988 |
2973 procedure doStepSeductionWear(Gear: PGear); |
2989 procedure doStepSeductionWear(Gear: PGear); |
2974 begin |
2990 begin |
2975 AllInactive := false; |
2991 AllInactive := false; |
2987 end; |
3003 end; |
2988 |
3004 |
2989 procedure doStepSeduction(Gear: PGear); |
3005 procedure doStepSeduction(Gear: PGear); |
2990 begin |
3006 begin |
2991 AllInactive := false; |
3007 AllInactive := false; |
2992 DeleteCI(Gear^.Hedgehog^.Gear); |
3008 //DeleteCI(Gear^.Hedgehog^.Gear); |
2993 Gear^.doStep := @doStepSeductionWear |
3009 Gear^.doStep := @doStepSeductionWear |
2994 end; |
3010 end; |
2995 |
3011 |
2996 //////////////////////////////////////////////////////////////////////////////// |
3012 //////////////////////////////////////////////////////////////////////////////// |
2997 procedure doStepWaterUp(Gear: PGear); |
3013 procedure doStepWaterUp(Gear: PGear); |