equal
deleted
inserted
replaced
278 //////////////////////////////////////////////////////////////////////////////// |
278 //////////////////////////////////////////////////////////////////////////////// |
279 procedure doStepFallingGear(Gear: PGear); |
279 procedure doStepFallingGear(Gear: PGear); |
280 var |
280 var |
281 isFalling: boolean; |
281 isFalling: boolean; |
282 //tmp: QWord; |
282 //tmp: QWord; |
283 tdX, tdY: hwFloat; |
283 tX, tdX, tdY: hwFloat; |
284 collV, collH: LongInt; |
284 collV, collH: LongInt; |
285 land: word; |
285 land: word; |
286 begin |
286 begin |
287 WorldWrap(Gear); |
287 tX:= Gear^.X; |
|
288 if WorldWrap(Gear) and (WorldEdge = weWrap) and (Gear^.AdvBounce <> 0) and |
|
289 (TestCollisionXwithGear(Gear, 1) or TestCollisionXwithGear(Gear, -1)) then |
|
290 begin |
|
291 Gear^.X:= tX; |
|
292 Gear^.dX.isNegative:= (hwRound(tX) > leftX+Gear^.Radius*2) |
|
293 end; |
288 |
294 |
289 // clip velocity at 2 - over 1 per pixel, but really shouldn't cause many actual problems. |
295 // clip velocity at 2 - over 1 per pixel, but really shouldn't cause many actual problems. |
290 if Gear^.dX.Round > 2 then |
296 if Gear^.dX.Round > 2 then |
291 Gear^.dX.QWordValue:= 8589934592; |
297 Gear^.dX.QWordValue:= 8589934592; |
292 if Gear^.dY.Round > 2 then |
298 if Gear^.dY.Round > 2 then |