duplicated thunderbird: reset is called each time before
a race is (re)started, while an init function must only
be called once. This properly fixes#918 (referees not
removed), which was caused by init actually being called
twice. Also changed order of when the referee position
is computed: before it was computed before World::resetAllKarts
was executed (which settles the karts at their stable start
position). This resulted in slightly different start
positions (depending on positions set in blender, not
the position in which the kart were finally stable. This
fixed#917.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12664 178a84e3-b1eb-0310-8ba1-8eac791a3b58
functions of game modes (caused by restartRace only called in case of
a restart, not the first time a race is started). The function restartRace()
was renamed to reset(), which is now called always before a race is started
or restarted.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12591 178a84e3-b1eb-0310-8ba1-8eac791a3b58
challenge will define the time limit), which also fixes#861 (no
timer when easter egg mode is started first). Added high-scores for
easter egg mode.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12574 178a84e3-b1eb-0310-8ba1-8eac791a3b58
kart anymore, instead they are managed by static functions
in Camera. This allows us to have several cameras for one
kart now (can be useful for debugging; or for three-screen setup
where you have one monitor for left, right, and center; or potentially
for an back mirrir). Also 'rain' is moved into camera now (where it
belongs more naturally then in kart), and several loops over all
karts searching for a camera are now replaced by simpler loops over
all cameras (though a few loops were added to handle code for all
cameras now, while before there as no loop).
Main advantage: handling post-processing will be easier to do now.
Also this fixes a bug: in split screen mode, when a kart is eliminated
(ftl) the camera for this kart was supposed to show the
leader facing backwards, which didn't work (it just showed the previous
location of the elimintaed kart) - now it works.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12541 178a84e3-b1eb-0310-8ba1-8eac791a3b58
used atm), and a better easter egg model (atm bunny from snow mountain,
... whith turns out has lost the black nose). One track has easter eggs
added (math class).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12281 178a84e3-b1eb-0310-8ba1-8eac791a3b58
instead of each mode maintaining an array of data for each kart
which is used by the race GUI, use one array in race_gui_base,
which is then filled by the game mode.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12186 178a84e3-b1eb-0310-8ba1-8eac791a3b58
0-lap races. Fixed by letting overall_distance be negative at start
(which should have no other impact - time estimation function is
improved to handle this).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12104 178a84e3-b1eb-0310-8ba1-8eac791a3b58
before a kart has moved (due to a division by zero). Now 99:59:00
is displayed instead, but in case that there should be other
circumstances that trigger this problem, use 99:59:99 instead of
**:**:**.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12055 178a84e3-b1eb-0310-8ba1-8eac791a3b58
dialog is shown (or the track info dialog). Together with r11958 this fixed
#663.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11960 178a84e3-b1eb-0310-8ba1-8eac791a3b58
DIFFICULTY_EASY to make it easier to understand;and
removed separate DIFFICULTY_COUNT constant and
replaced it with an entry in the enum (this means
one less change if a difficulty is added).
Changed layout to be closer to our style in race_manager.hpp.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11733 178a84e3-b1eb-0310-8ba1-8eac791a3b58
does not need nor is based on a fixed epoch). Changed getTimeSinceEpoch
back to the previous implementation which returns time in seconds since
1.1.1970 - this is important to compare addon download time.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11657 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
which should be faster and 'more correct' (the old implemenation
only tests discrete points for being on/off track, which means
AI can cut corner and not realise that it will be off track).
The new implementation uses lines and intersections to detect
this condition correctly. Since the new implementation is
as a result not as aggressive in cutting corner, it's not
as fast as the old AI, and is for now disabled (see end of
SiddingAI::handleSteering if you want to switch).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11405 178a84e3-b1eb-0310-8ba1-8eac791a3b58
After DemoWorld finishes/gets aborted, the static variable in ProfileWorld
would still be set to profiling, indicating that profiling still had to
be done. This caused troubles with trying to race after the demo had run
at least once. Any started race would be seen as profiling.
Simply deactivating profiling when ProfileWorld gets destroyed does the
trick.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11392 178a84e3-b1eb-0310-8ba1-8eac791a3b58
* Overworld could be picked
* If user gave one arena track as choice, things would crash
Also fix some comments.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11383 178a84e3-b1eb-0310-8ba1-8eac791a3b58
Someone had, at some point long ago, written warp instead of wrap.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11371 178a84e3-b1eb-0310-8ba1-8eac791a3b58
able to brake if it should be too fast. Avoid using nitro
when braking (otherwise AI might be pushed out of curve).
Added new --ai-debug command line option that will display
the name of the AI on top of each kart (when compiled with
debug). See world.cpp lines 249 on how to select the new
(or any other AI, including the option to use all AIs,
which is nice to compare them).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11368 178a84e3-b1eb-0310-8ba1-8eac791a3b58
* cutscene: comparison between unsigned and signed int
* graph: simplify the comparison being made
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11361 178a84e3-b1eb-0310-8ba1-8eac791a3b58