Commit Graph

12 Commits

Author SHA1 Message Date
hikerstk
a6414b08b4 Rubber balls should now target the first kart again; improved handling
of the situation that the target kart is lost (e.g. it might have finished
the race), so that the ball smoothly aims at the new target now.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9547 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-08-17 23:06:48 +00:00
hikerstk
8a9bdc1505 Started to add interpolation to rubber balls to avoid them
changing directions too quickly.
This still needs more tuning. Known bugs:
1) at the beginning the ball changes directions too quick
   (if the kart is not close to the center of the driveline)
2) going towards the target kart (when the ball is close
   enough) has not been ported yet, so balls will more 
   often miss their targets.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9502 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-08-15 00:25:30 +00:00
hikerstk
6e5086f9b8 More refactoring: duplicated code handling track sectors and
distance along track is now moved into a separate class TrackSector
and used in linear_world and rubber ball.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9422 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-08-04 23:33:41 +00:00
hikerstk
428ed5a07b Made QuadGraph use a singleton-like behaviour. It is still created with
explicit calls to QuadGraph::create(...), and the get() function can
return NULL (in case of a race mode that does not use a quad graph).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9421 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-08-04 23:02:58 +00:00
hikerstk
95695d4264 Started to add data structures for interpolation, and added separate function
to determine which path to use (so that a target that is on a shortcut
can also be hit) - though this function atm only handles karts on the 
main driveline.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9417 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-08-03 06:56:49 +00:00
hikerstk
916dbb9bc1 Karts 'accidentally' hit by a bouncing ball while it is
going to catch if with the leader will now be flattened
(parameters for that are defined in powerup.xml). No
explosion effect is shown anymore for the first kart,
it will only be tossed around.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9369 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-07-26 06:58:11 +00:00
hikerstk
2c3e5395c6 Updated height and interval handling if the ball is getting
closer to the target. Now the ball behaviour keeps being
smooth while it is getting closer to the target.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9323 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-07-22 06:26:28 +00:00
hikerstk
c1d65112e7 Refqactoring: moved static rubber-ball specific settings from Flyable
to RubberBall.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9315 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-07-21 22:07:09 +00:00
hikerstk
4477862356 Improved bouncing of ball when it is still far away from the kart.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9314 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-07-21 06:58:28 +00:00
hikerstk
bf90805448 Added bouncing to rubber ball (though it's imho not
yet smooth enough).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9313 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-07-21 00:07:09 +00:00
hikerstk
b88a8da625 Fixed distance along track computation for rubber ball (which
was based on the quad it is aiming at, not at the quad it was on).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9310 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-07-20 22:21:44 +00:00
hikerstk
afb3728995 Added first test version of 'rubber ball' (which might replace
the anchor). Known bugs: atm it does not yet bounce (it follows
just the drivelines and might be partly in the track); the first
kart can't avoid it (long term breaking might allow you to avoid it);
it might hit another kart first and explode.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9302 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-07-20 00:39:32 +00:00