equal
deleted
inserted
replaced
521 |
521 |
522 // let's add some smoke depending on speed |
522 // let's add some smoke depending on speed |
523 i:= max(32,152 - hwRound(Distance(Gear^.dX,Gear^.dY)*120))+random(10); |
523 i:= max(32,152 - hwRound(Distance(Gear^.dX,Gear^.dY)*120))+random(10); |
524 if (GameTicks mod i) = 0 then |
524 if (GameTicks mod i) = 0 then |
525 begin |
525 begin |
526 smoke:= AddVisualGear(hwRound(Gear^.X)-round(cos((Gear^.DirAngle+50) * pi / 180)*20), hwRound(Gear^.Y)-round(sin((Gear^.DirAngle+50) * pi / 180)*20), vgtSmoke); |
526 // adjust angle to match the texture |
|
527 if Gear^.dX.isNegative then i:= 130 else i:= 50; |
|
528 smoke:= AddVisualGear(hwRound(Gear^.X)-round(cos((Gear^.DirAngle+i) * pi / 180)*20), hwRound(Gear^.Y)-round(sin((Gear^.DirAngle+i) * pi / 180)*20), vgtSmoke); |
527 if smoke <> nil then smoke^.Scale:= 0.75; |
529 if smoke <> nil then smoke^.Scale:= 0.75; |
528 end; |
530 end; |
529 |
531 |
530 if (Gear^.State and gstCollision) <> 0 then |
532 if (Gear^.State and gstCollision) <> 0 then |
531 begin |
533 begin |