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
an AI that actively collects items. This is (for now) the new default
AI - feedback welcome!
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11291 178a84e3-b1eb-0310-8ba1-8eac791a3b58
controller keeps the name of the original controller,
which allows proper statistic output in profile mode.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11287 178a84e3-b1eb-0310-8ba1-8eac791a3b58
kart (and changed the FTL code to display 'Leader' so that
it uses this feature now).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11284 178a84e3-b1eb-0310-8ba1-8eac791a3b58
new skidding ai which is at this stage a copy
of the default AI controller.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11254 178a84e3-b1eb-0310-8ba1-8eac791a3b58
(ghost karts were not removed, causing problems when
drawing all later).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11252 178a84e3-b1eb-0310-8ba1-8eac791a3b58
setPhase. Removed usage of auxiliary timer in overworld
(instead set phase to race_phase) - as a result there
is no mpre 'Go!' being displayed (which I think is
actually better for the overworld).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11225 178a84e3-b1eb-0310-8ba1-8eac791a3b58
a demo after T seconds of idle time, --demo-tracks a,b,c
to specify a list of tracks to use for demo mode, --demo-karts
to specify the number of karts.
This is WIP, esp. it crashes if ESC is pressed during a race
(other keys will successfully return to main menu).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11189 178a84e3-b1eb-0310-8ba1-8eac791a3b58
problems (I can't figure out what this line is supposed to do ... as far as I
could see it appears not to be used at all, and m_phase never reaches FINISH_PHASE).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11188 178a84e3-b1eb-0310-8ba1-8eac791a3b58
* Only adding for standard races (normal race + time trial), didn't make as
much sense elsewhere.
* Places still active players at the back of the final result and gives
them penalty time.
* Add button to race pause dialog, temporarily using options_ui.png.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11093 178a84e3-b1eb-0310-8ba1-8eac791a3b58
added getTerrainInfo() function instead and dynamic_casts.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11081 178a84e3-b1eb-0310-8ba1-8eac791a3b58
using a fixed object in the kart, now each animation
(rescue, explosion, canon) has its own object and
implementation using a common interface. This
simplifies AbstractKartInterface, and makes it
easier to add new functionailty.
Instead of using: kart->rescue(...), or kart->explode(...)
you use new ExplosionAnimation(kart, ...) etc. Memory
handling is done by the object (and abstract kart).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11070 178a84e3-b1eb-0310-8ba1-8eac791a3b58
de-couple kart implementation and its interface. This
significantly reduces compile time when changing kart.hpp,
but is at this stage still work in progress.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10997 178a84e3-b1eb-0310-8ba1-8eac791a3b58
reduce compile time on controller changes).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10952 178a84e3-b1eb-0310-8ba1-8eac791a3b58
GhostKart was not called, since it was called during when
the contrsuctor of Kart was executed (at this time the
GhostKart vtable wasn't set up, so Kart::createPhysics)
was called - which resulted in a memory leak since all
physics parts of the kart were actually allocated (just
not used). To fix this, karts are not constructed in two
phases: first a constructor, followed by a call to init
(during which virtual function can be used).
Fixed several bugs were physics data for a GhostKart
were accessed.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10947 178a84e3-b1eb-0310-8ba1-8eac791a3b58
classes for recording and for replaying. Added compression (by use of
interpolation) settings to stk_config - atm only using a certain
frequency (delta-t setting in stk_config) is used.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10904 178a84e3-b1eb-0310-8ba1-8eac791a3b58
apparently happens in doing-the-dishes with 20 karts).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10903 178a84e3-b1eb-0310-8ba1-8eac791a3b58
kart positions and rotations are saved.
To save a replay, press ctrl-F10 which will create a file
in the stk config dir 'trackname'.replay .
To replay, use --ghost command line, and select the
track with the same name (at this stage the replay is
loaded even if number of laps and difficulty is different).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10897 178a84e3-b1eb-0310-8ba1-8eac791a3b58
I am going to fix this next.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10862 178a84e3-b1eb-0310-8ba1-8eac791a3b58
improved handling of end cameras for reverse mode (otherwise one
additional end camera would need to be defined to be used just
when the lap line is crossed).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10850 178a84e3-b1eb-0310-8ba1-8eac791a3b58
reverse tracks. Simplified code by moving some functionality
from QuadGraph to CheckManager.
2) Added comments, renamed some functions to better indicate
what they are doing.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10843 178a84e3-b1eb-0310-8ba1-8eac791a3b58
It adds a flag to the track.xml files, a (currently unnamed) checkbox
in the track selection screen, but doesn't do any actualy reversing (see
forum http://forum.freegamedev.net/viewtopic.php?f=18&t=2661 for
details).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10767 178a84e3-b1eb-0310-8ba1-8eac791a3b58
understand. Removed and simplified some functions. This should not change
anything in actual game play.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10574 178a84e3-b1eb-0310-8ba1-8eac791a3b58
this stage for users.
The physics branch added a few new stability options (which are disabled
by default), fixed bug and reproducing history files when using physics
replay, using --log=file command line option. See log on the physics
branch for full details.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10292 178a84e3-b1eb-0310-8ba1-8eac791a3b58
time steps), so that in physics replay the time steps are now
correct.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/physics@10219 178a84e3-b1eb-0310-8ba1-8eac791a3b58
people to give the AI certain items (it also avoids a
crash if one of the F? keys is pressed in profile mode).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9954 178a84e3-b1eb-0310-8ba1-8eac791a3b58
mode, which makes this better suited to find memory leaks.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9927 178a84e3-b1eb-0310-8ba1-8eac791a3b58
race. This way getXYZ() and getTrans() now report the correct
position after the kart were reset, before the first frame (i.e.
before Moveable::update() is called the first time).
This caused the referee position to be inconsistent between
tracks (and this will for now cause the referee position to be
bad ... but at least the same bad in all tracks ;) ).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9897 178a84e3-b1eb-0310-8ba1-8eac791a3b58
- sorted declarations so that all virtual functions
are together.
- Renamed *_IDENT variables to IDENT_* so that the
naming is consistent
- Using std::string& for IDENT_* instead of char*
- Use pointer for out variables in getDefaultCollectibles.
- Moved m_fastest_lap variable from world to LinearWorld.
- Many many cosmetic changes to follow our style guide.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9852 178a84e3-b1eb-0310-8ba1-8eac791a3b58
Fixed incorrect indices used for tires (used 1-4, should use 0-3).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9838 178a84e3-b1eb-0310-8ba1-8eac791a3b58
1) Ready, Set, Go is still shown.
2) Orientation of thunderbird is not correct in
all cases (esp. in battle mode).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9822 178a84e3-b1eb-0310-8ba1-8eac791a3b58
Just dropping the last reference to the mesh
does not remove the pointer to this mesh from
the mesh cache --> in the next race when the
tire model is loaded again the mesh cache tries
to load a freed mesh.
2) Fixed floating tires: TrackObjectManager::removeObject
does not remove the scene graph or physics world.
Just leaving them in the objects managed by
TrackObjectManager frees them as expected
(side note: I am considering refactorin removeObject ;) ).
3) Improved documentation on ThreeStrikesBattle.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9780 178a84e3-b1eb-0310-8ba1-8eac791a3b58