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
the name will make the karts impossible to see).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11404 178a84e3-b1eb-0310-8ba1-8eac791a3b58
Fix the issue at the source. Instead of only reacting on GUI events,
catch GUI, mousy, key and joystick events and reset the timer on any
of them. Only then we're sure that mouse/keyboard/joystick movement
definitely resets the timer.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11403 178a84e3-b1eb-0310-8ba1-8eac791a3b58
* Add a function to irr_driver to move a window to (x, y)
* Use this function in initDevice and move the call to later on it.
* Also move the Linux WM classhints down a bit
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11402 178a84e3-b1eb-0310-8ba1-8eac791a3b58
Reference to a, through IrrLicht, opened file wasn't getting closed.
Use IReadFile::drop() (derived from IReferenceCounted::drop()) to fix
this severe memory leak.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11397 178a84e3-b1eb-0310-8ba1-8eac791a3b58
* delete star effect in kart destructor
* clean up challenges in gameslot destructor
* music information's normal and fast music
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11394 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
is not facing in the right direction (and if so, brake to allow
it to quicker get facing in the right direction again), and
only compute the turn radius otherwise. Print some useful
information when --ai-debug is specified, atm when and why
a kart is braking.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11386 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
Didn't take into account the lack of optionsscreen teardown when
storymodelobby gets called up at STK startup (had it disabled).
Creating slots and saving the configuration immediately when entering
a player name now.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11377 178a84e3-b1eb-0310-8ba1-8eac791a3b58
Linux classhints didn't take into account graphics not being
present. Add a check whether ProfileWorld is running without
graphics.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11375 178a84e3-b1eb-0310-8ba1-8eac791a3b58
* Requirement set to 0 until there's a structure in the order
we want challenges to be completed.
* Times based on a few rounds without cheating[1]
[1]: You can cheat in Black Mansion by just going straight ahead
in the hill after the start.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11372 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
Content in the header file of the PresentAI was duplicated.
Removed one of them.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11344 178a84e3-b1eb-0310-8ba1-8eac791a3b58
Make sure the list of AI karts gets cleared by making sure
that computeRandomKartList gets executed.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11342 178a84e3-b1eb-0310-8ba1-8eac791a3b58