equal
deleted
inserted
replaced
217 end |
217 end |
218 end |
218 end |
219 end |
219 end |
220 end; |
220 end; |
221 |
221 |
|
222 procedure HedgehogChAngle(Gear: PGear); |
|
223 begin |
|
224 if ((Gear.State and (gstMoving or gstFalling)) = 0) then |
|
225 if (Gear.Message and gm_Up )<>0 then if Gear.Angle > 0 then dec(Gear.Angle) |
|
226 else else |
|
227 if (Gear.Message and gm_Down )<>0 then if Gear.Angle < cMaxAngle then inc(Gear.Angle); |
|
228 end; |
|
229 |
222 procedure doStepHedgehog(Gear: PGear); forward; |
230 procedure doStepHedgehog(Gear: PGear); forward; |
223 //////////////////////////////////////////////////////////////////////////////// |
231 //////////////////////////////////////////////////////////////////////////////// |
224 procedure doStepHedgehogDriven(Gear: PGear); |
232 procedure doStepHedgehogDriven(Gear: PGear); |
225 var t: PGear; |
233 var t: PGear; |
226 begin |
234 begin |
283 end; |
291 end; |
284 CheckGearDrowning(Gear); |
292 CheckGearDrowning(Gear); |
285 exit |
293 exit |
286 end ;//else if Gear.CollIndex = High(Longword) then AddIntersectorsCR(Gear); |
294 end ;//else if Gear.CollIndex = High(Longword) then AddIntersectorsCR(Gear); |
287 |
295 |
288 if ((Gear.State and (gstMoving or gstFalling)) = 0) then |
296 HedgehogChAngle(Gear); |
289 if (Gear.Message and gm_Up )<>0 then if Gear.Angle > 0 then dec(Gear.Angle) |
|
290 else else |
|
291 if (Gear.Message and gm_Down )<>0 then if Gear.Angle < cMaxAngle then inc(Gear.Angle); |
|
292 |
|
293 if StepTicks > 0 then dec(StepTicks); |
297 if StepTicks > 0 then dec(StepTicks); |
294 if (StepTicks = 0) then HedgehogStep(Gear) |
298 if (StepTicks = 0) then HedgehogStep(Gear) |
295 end; |
299 end; |
296 |
300 |
297 //////////////////////////////////////////////////////////////////////////////// |
301 //////////////////////////////////////////////////////////////////////////////// |