equal
deleted
inserted
replaced
34 |
34 |
35 function onGearAdd(gear) |
35 function onGearAdd(gear) |
36 if GetGearType(gear) == gtShover then |
36 if GetGearType(gear) == gtShover then |
37 ball = AddGear(GetX(gear), GetY(gear), gtBall, 0, 0, 0, 0) |
37 ball = AddGear(GetX(gear), GetY(gear), gtBall, 0, 0, 0, 0) |
38 if ball ~= nil then |
38 if ball ~= nil then |
39 CopyPV2(gear, ball) |
39 local dx, dy = GetGearVelocity(gear) |
|
40 SetGearVelocity(ball, dx * 2, dy * 2) |
40 SetState(ball, 0x200) -- temporary - might change! |
41 SetState(ball, 0x200) -- temporary - might change! |
41 SetTag(ball, 8) -- baseball skin |
42 SetTag(ball, 8) -- baseball skin |
42 FollowGear(ball) |
43 FollowGear(ball) |
43 end |
44 end |
44 end |
45 end |