Commit Graph

198 Commits

Author SHA1 Message Date
auria
76c6ddbc93 Fix FTL having no highscores as expected; don't display highscores in end-of-race dialogs when the mode has none
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4761 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-18 02:08:11 +00:00
auria
2478db386a Don't try displaying highscores in modes that don't generate highscores (3 strikes, FTL)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4757 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-17 23:52:49 +00:00
auria
bbd2ecb4c4 Clarified one method by using a enum type instead of simply 'int'
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4756 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-17 23:35:25 +00:00
auria
263b94c706 Various fixes to get battle mode working again
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4753 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-17 16:48:12 +00:00
hikerstk
31e3806fd0 Refactor end of race handling so that more functions are done in a base class only
(esp. code that was previously duplicated in the battle mode and standard race).
There is now time for an end animation, even if the player should finish last
(in which case the previous end camera would not be shown). This mostly in 
preparation for end animations.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4750 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-17 11:59:51 +00:00
auria
93cc5209f7 Converted sound effects file to XML. Along the way, refactored the audio code to be more flexible. before, when a sound changed, you needed to edit the config file of STK, edit the enum in the header, edit the loader in the .cpp... was annoying. Now you only need to edit the config file.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4728 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-15 19:17:35 +00:00
hikerstk
da3de6d131 Big code refactoring: instead of having auto_kart, player_kart, the karts
now use a 'controller' object which is responsible for its steering, e.g.
a default_ai_controller, player_controller etc. This makes it easier to
switch a player kart to use a end-of-race computer controller to drive
the kart once the race is finished (though that's not implemented yet).
I expect some bugs with restarting race, and perhaps end of race
behaviour at this stage.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4714 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-15 00:54:28 +00:00
hikerstk
328373289a 1) Moved access to world object from race_manager to static functions in
world.
2) Removed more dujplicated/unnecessary functions from race_manager
   (getPlayerKart, getTrack).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4682 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-11 07:11:52 +00:00
hikerstk
b9ffb6fa13 Removed g++ compiler warnings.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4681 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-10 23:55:19 +00:00
hikerstk
4a96f98182 Removed player- and network-kart lists from world, so now
there is only one list used to access all karts in world.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4680 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-10 22:59:17 +00:00
hikerstk
47a1a1dfa2 Removed m_local_player_karts vector from world.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4678 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-10 12:47:18 +00:00
hikerstk
c6bf95a64c Started to remove the various kart lists in various objects.
1) Removed getKart from RaceManager.
2) Renamged RaceManager::getNumKarts() to getNumberOfKarts.
   This function should only be called when the world
   does not exist (or is not yet initialised). 	In all
   other cases world::getNumKarts() should be called.
3) Improved several 'const' functions.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4676 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-10 11:40:33 +00:00
auria
f78001c7b2 Misc nitpicking
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4675 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-10 02:11:56 +00:00
hikerstk
4e36fc1f78 Moved WorldStatus enums into WorldStatus class.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4673 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-09 09:24:45 +00:00
hikerstk
9a68e6e130 1) Renamed clock.?pp (which stored the class TimedRace) to
world_status.?pp (storing the class WorldStatus).
2) Fixed end of race in case that player kart is last
   (race would never end till esc is pressed).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4668 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-08 12:59:03 +00:00
hikerstk
0465313495 Fixed race finish time estimation at end of race for AI karts.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4664 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-07 21:58:16 +00:00
hikerstk
fde579bee8 Added comments, minor cosmetic changes.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4663 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-02-07 21:57:10 +00:00
auria
0e9266fd1c Added missing string to the pot
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4528 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-01-24 15:34:46 +00:00
hikerstk
70f5f1044b Removed compiler warning.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4437 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-01-11 23:51:59 +00:00
mbjornstk
42c395fd5f Cosmetic changes, last lap colour and fastest lap wording.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4434 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-01-11 23:40:12 +00:00
hikerstk
cf0e69b48f Removed #include of kart and player_kart from world.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4424 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-01-10 23:12:29 +00:00
hikerstk
2c60045223 Disabled new AI so that we know at least to which AI bug reports apply to.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4421 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-01-10 12:12:07 +00:00
mbjornstk
5da301b8e1 Show final lap message, original patch by Stephan Hillebrand.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4347 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-12-23 16:58:10 +00:00
mbjornstk
5fe41e5625 Run expand -t4 to convert tabs to spaces. No other whitespace fixes, but
there are still trailing spaces and lines with 5 spaces as indent (fix them
as the files are changed for other reasons). src/guiengine/CGUIFont.* and
src/bullet/ not processed to allow cleaner updates from upstream.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4320 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-12-18 00:36:35 +00:00
hikerstk
68ceea8619 Fixed time-trial mode - no more boxes will be added to the track.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4275 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-12-10 02:10:19 +00:00
hikerstk
9f17650552 Bugfix: check_structures were reset before karts, which means that in the very first frame of a
restarted race incorrect checks would be triggered (e.g. causing a new lap to be counted).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4235 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-12-04 00:49:38 +00:00
hikerstk
ed9bd38402 Some redesign of split screen to enable proper handling of
ambient light changes.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4229 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-11-29 13:04:57 +00:00
hikerstk
a5a90be806 1) Started to add split screen (though not all parts of the race gui are displayed correctly yet).
2) The name of an AI kart will now only get the AI name added if it's profile mode (to prevent
   the name with AI name to be displayed in game)
3) Some code cleanup.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4226 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-11-23 05:20:05 +00:00
hikerstk
dd02e0726f 1) Added new AI, which is not yet too different from the current one.
2) AIs can now modify the kart name, which is used in printing profile results, to
   include an AI identifiert.
3) NewAI and DefaultRobot are created un turns: first AI is DefaultRobot, then 
   NewAI, then Default...
4) Made specific mode in VS project file for irrlicht 1.6 (will be removed soon).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4213 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-11-08 12:19:33 +00:00
hikerstk
6d89dd7ae0 Use loadRobot instead of new DefaultRobot, so that the same function
is used to create all AI karts.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4212 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-11-08 12:15:12 +00:00
hikerstk
39cb1129d1 Bugfix: For the duration of one frame the position of the karts was incorrect
when a kart is about to cross the starting line.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4151 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-10-23 01:54:05 +00:00
hikerstk
049ab14678 1) Fixed 'objects' import from blender script: objects are now
converted into the physics track model (previously they were
   only shown, but karts could drive through them).
2) Cleaned start position code: arena and normal tracks now use
   the same way and variables/functions to specify the start
   positions.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4046 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-09-24 14:26:03 +00:00
hikerstk
d863d37c72 Bugfix: kart position were not computed correctly if crossing the start line for the
first time doesn't trigger a new lap (and therefore karts starting at lap -1).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4021 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-09-10 03:25:42 +00:00
auria
2eef253158 Improved end-or-race dialog + backported a fix found there to track info dialog
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3981 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-09-02 00:01:10 +00:00
auria
5ff086d156 Fixed handling of wide strings in StringUtils::insertValues (the wide overlaod) + fixed aain assert import
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3979 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-09-01 21:18:07 +00:00
auria
22f6c6e008 First (rough) version of an end-of-race dialog
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3974 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-09-01 18:11:26 +00:00
auria
458e1a19da made text readable (i'm not really confident it works for everyone and all languages though)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3964 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-30 19:18:05 +00:00
auria
c3f0f7ab82 Massive conversion from std::string to stringw for all strings that need to be translated. Currently, translation is broken (strings i try to transalte appear as junk) -- since irrlicht GUI widgets all use wchar_t, using std::string in UTF-8 just didn't make it
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3963 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-30 18:21:59 +00:00
auria
432da8b070 Improved display of highscores. IMPORTANT: Kart name in highscores used to be saved as user-visible name and not internal name. This is wrong, the user name can change or be translated and we still expect it to work. I changed the highscore code to save the kart's ident and not translated name, but you will need to delete/correct your current highscore file if you want kart from highscores to be displayed
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3953 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-29 18:59:25 +00:00
auria
870c470eab Highscores are now displayed in the track screen
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3951 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-29 18:12:31 +00:00
davemk
276f3575e4 use kart projection after rescue in 3-strikes-battle-mode.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3928 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-27 02:14:38 +00:00
davemk
454463a919 add hit to kart rescued in 3-strikes-battle mode.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3927 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-27 02:04:37 +00:00
davemk
9ab21ce5fe speed up battle music when all opponents down to 1 life.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3926 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-27 02:00:59 +00:00
davemk
e06845c4af remove bubble gum item from 3-strikes-battle mode.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3925 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-27 01:57:24 +00:00
auria
452808838a Fixed various warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3916 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-26 15:18:14 +00:00
hikerstk
96dc2a8fe2 Cleaned up StringUtils: used 'better' names (e.g. getPath()
instead of path()), and used our convention of using capitalization
for words (and not _). Started adding support for additional track
directories, but that's not working yet.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3912 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-24 05:56:53 +00:00
hikerstk
c1d69986b0 1) Profile mode now works, and is now completely implemented
in ProfileWorld only (no more m_profile in UserConfig)
2) Added some more virtual functions to the modes to simply
   code a bit.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3909 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-23 15:42:58 +00:00
hikerstk
6318008c87 Restructured modes to be easier to inerhit from:
- cleanly split into constructor and init()
  phase
- added new isRaceFinished() function
Some minor code cleanup.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3900 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-21 13:05:52 +00:00
hikerstk
ef175e94d4 1) Added alpha version of profile-mode (which replaces if-statements
in world).
2) Moved camera management into race gui, so that the number of split screens
   used can be adjusted (and not only indirect via number of player) - this
   allows e.g. debug modes where you can see 4 AI karts at the same time,
   for profile mode, ...
3) Code cleanup.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3899 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-21 00:32:24 +00:00
davemk
779003befe Make z-offset after rescue a configurable parameter (z-rescue-offset)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3888 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-08-19 14:07:15 +00:00