equal
deleted
inserted
replaced
2204 isCursorVisible := false; |
2204 isCursorVisible := false; |
2205 ApplyAmmoChanges(HHGear^.Hedgehog^); |
2205 ApplyAmmoChanges(HHGear^.Hedgehog^); |
2206 exit |
2206 exit |
2207 end; |
2207 end; |
2208 |
2208 |
2209 if not TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then |
2209 HHGear^.X := HHGear^.X + cWindSpeed * 200; |
2210 HHGear^.X := HHGear^.X + cWindSpeed * 200; |
|
2211 |
2210 |
2212 if (Gear^.Message and gmLeft) <> 0 then HHGear^.X := HHGear^.X - cMaxWindSpeed * 80 |
2211 if (Gear^.Message and gmLeft) <> 0 then HHGear^.X := HHGear^.X - cMaxWindSpeed * 80 |
2213 else if (Gear^.Message and gmRight) <> 0 then HHGear^.X := HHGear^.X + cMaxWindSpeed * 80; |
2212 else if (Gear^.Message and gmRight) <> 0 then HHGear^.X := HHGear^.X + cMaxWindSpeed * 80; |
2214 if (Gear^.Message and gmUp) <> 0 then HHGear^.Y := HHGear^.Y - cGravity * 40 |
2213 if (Gear^.Message and gmUp) <> 0 then HHGear^.Y := HHGear^.Y - cGravity * 40 |
2215 else if (Gear^.Message and gmDown) <> 0 then HHGear^.Y := HHGear^.Y + cGravity * 40; |
2214 else if (Gear^.Message and gmDown) <> 0 then HHGear^.Y := HHGear^.Y + cGravity * 40; |
2216 |
2215 |
|
2216 // don't drift into obstacles |
|
2217 if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then |
|
2218 HHGear^.X := HHGear^.X - int2hwFloat(hwSign(HHGear^.dX)); |
2217 HHGear^.Y := HHGear^.Y + cGravity * 100; |
2219 HHGear^.Y := HHGear^.Y + cGravity * 100; |
2218 Gear^.X := HHGear^.X; |
2220 Gear^.X := HHGear^.X; |
2219 Gear^.Y := HHGear^.Y |
2221 Gear^.Y := HHGear^.Y |
2220 end; |
2222 end; |
2221 |
2223 |