the default item meshes. An instance of it is now only
created when a race is started (and deleted once the
race is finished). This makes the race-specific
initialisation and cleanup better to understand. Also
added singleton access to the one instance of ItemManager.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11498 178a84e3-b1eb-0310-8ba1-8eac791a3b58
was invisible when the race was restarted.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11496 178a84e3-b1eb-0310-8ba1-8eac791a3b58
some refactoring to avoid code duplication.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11488 178a84e3-b1eb-0310-8ba1-8eac791a3b58
initialised. If m_current_track_direction was UNDEFINED,
m_curve_center was actually used.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11486 178a84e3-b1eb-0310-8ba1-8eac791a3b58
the data structure thread safe to avoid a race condition that would
(very infrequently) crash the game.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11483 178a84e3-b1eb-0310-8ba1-8eac791a3b58
of 40%. This allows longer skids in wider turns (e.g. hacienda).
2) Improved skidding decision when sharp turning is required:
on sharp turn when already skidding, wait till an 'even sharper'
turn is required, which (usually) means that then the AI is
nicely aligned with the new track direction when releasing skid,
which makes nice use of the bonus and the additional rotation.
If not skidding when sharp turn is required, don't even start
one.
3) Prevent AI from skidding 'against' track direction (i.e. track
is turning left, but AI tries to skid right). This happened
before (e.g. when slightly adjusting steering) and caused
rapid left/right turns (and skid/stop/skid/stop sequences).
4) Allow some steering in wrong direction when skidding (to allow
for some incorrect estimations, and to avoid skidding on/off
sequences when only minor corrections are necessary).
5) If adjusted (i.e. taking the skid steering reduction into account)
steer fraction when skidding is too high, stop skidding.
6) Re-enabled braking when AI is not aligned with track direction.
7) Improve debug output so that only a state change (skidding to
non-skidding and vice versa) triggers output (instead of output
every frame).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11469 178a84e3-b1eb-0310-8ba1-8eac791a3b58
assume that node n is followed by n1) - though that code
is actually not used.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11451 178a84e3-b1eb-0310-8ba1-8eac791a3b58
to work while a speed increase is active. This simplifies
existing code (for slipstream, nitro). Additional engine
force is also added for skidding, which should make
skidding more worthwhile (since usually adjusting the
heading when stop skidding will use up the actual bonus
speed).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11450 178a84e3-b1eb-0310-8ba1-8eac791a3b58
determineTrackDirection, handleCurve, doSkid (the latter
was already implement, but didn't do anything).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11445 178a84e3-b1eb-0310-8ba1-8eac791a3b58
press skid while still turning in the opposite direction
(due to the delay with which the turning reacts). Therefore
skidding is only triggered when steering has nearly reached
full left or right (this code was by accident removed in
a previous commit).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11444 178a84e3-b1eb-0310-8ba1-8eac791a3b58
Sorry for the big recompile because of it, had some of these
after some experimenting and it was clouding my svn diff.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11443 178a84e3-b1eb-0310-8ba1-8eac791a3b58