Commit Graph

58 Commits

Author SHA1 Message Date
Benau
5b0c9763b4 Fix crash when using check debug with ghost replay and server 2021-06-25 13:09:16 +08:00
Benau
6a3e606c2d Turn race manager into a singleton get for 2 processes 2020-02-28 09:42:44 +08:00
Benau
3d13686af7 Move check manager to track to allow copying easier later 2020-02-24 10:57:57 +08:00
Benau
e01393bff7 Reserve code for future auto checkline correction 2019-03-03 14:11:29 +08:00
Benau
6ac98c0324 Only synchronize one kart each time for check line
This remove the duplicated new lap message
2019-02-01 17:50:09 +08:00
Benau
66fa81c6c9 Synchronize check lines and lap status from server 2019-01-26 02:05:03 +08:00
Benau
dbe5c22622 Try to restore CheckStructure status for spectating 2019-01-08 04:12:10 +08:00
hiker
a9279a05d0 Made --check-debug to work with --no-graphics; print also the
race time at which a check-structure is crossed.
2018-06-01 00:24:27 +10:00
Benau
d14a39e0f7 Initial work on soccer AI, plus lots of code re-factor/clean up.
To test, you need to update stk-assets with the dummy soccer field.
In single player, you are limited to be in red team for now, so just
shoot the ball into the blue goal. Also max-goal is limited to 4.

Regarding AIs, the steering with ball logic is handled in
SoccerAI::correctBallPosition, max AI supported in single player
is limited to 5 by now.

The AI is not as good as Zidane or Ronaldo, but steering with ball
for human is not as easy as not normal driving anyway, so don't
laugh at the AIs. :)

TODO: Friendly-team firing, polish the soccer field.
2016-01-15 18:25:52 +08:00
Marianne Gagnon
84e78e0d40 Some cleanup to check structures, start adding new cylinder check structure (WIP) 2015-07-14 19:00:00 -04:00
hiker
8d07d26c25 Updated (c) year to include 2015. 2015-03-30 11:42:50 +11:00
hiker
006a7f95c9 Cherrypicked pull request #1743 (cppcheck performance fixes). 2014-12-01 15:14:27 +11:00
hiker
425675bdac Moved check_structure detection from center of kart to the front
of the kart (which will work better for a photo finish). Hopefully
no other side effect.
2014-07-28 09:52:44 +10:00
Flakebi
55090a0566 Unify log output 2014-07-22 12:54:11 +02:00
hiker
4d6b110e56 Removed unnecessary #include of user_config.hpp in other hpp files
(to reduce the amount of recompilation when user_config.hpp is changed).
2014-02-26 12:52:16 +11:00
hikerstk
6ee751e3c3 Added new class to handle command line parameters, which
simplifies parameter handling in main (e.g. it's not
necessary to list and ignore parameters in the 2nd
pass, when they were handled in the first pass).
Removed some command line options for which there
is a guy (e.g. --weather), or which are not really
useful (--list-karts). 

All parameters to options must now consistently be
specified using '=', e.g.: --log=1 and --kart=tux.

Also removed support for 'classic' camera (which was
not used anymore). Removed now unneccessary #include
in user_config.hpp, which made some #include changes
in other files necessary.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14939 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2014-01-06 12:23:16 +00:00
hikerstk
8247f73604 Replaced tabs with spaces.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14448 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-11-15 12:52:39 +00:00
hikerstk
c5b8732087 Probably biggest commit (in terms of number of files) ever -
updated the (c) line of all files to -2013, added missing (c), 
changed format in some cases so that it will be easier in
the future to change them by script. No actualy code change.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14447 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-11-15 11:43:21 +00:00
curaga
b56bf4dc53 Remove trailing space, git doesn't like it
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12797 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-05-29 22:04:35 +00:00
funto66
bd70940af9 git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/christmas@12312 178a84e3-b1eb-0310-8ba1-8eac791a3b58 2012-12-27 17:10:02 +00:00
hikerstk
d0fb8aa78a A first version of the cannon that uses linear interpolation for the
bezier curves to allow smooth (i.e. constant speed) travel along
the curve.
This is WIP. Known bug: the kart jumps at the beginning and
end of the cannon animation.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11122 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-18 13:14:18 +00:00
hikerstk
2f92fefffd Fixed spelling problem.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11076 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-04-03 01:46:54 +00:00
hikerstk
eca5b3e570 Refactored handling of kart animations: instead of
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
2012-04-01 22:57:41 +00:00
hikerstk
53b3c78598 1) Added first version of 'cannon' (flying the kart to a specific
location) support. ATM only linear interpolation of the position
   is used (i.e. no rotation).
2) To be consistend renamed 'forceRescue' to 'rescue', 
   'handleExplosion' to 'explode' (and added shootTo for the canon).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11021 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-03-25 23:16:53 +00:00
hikerstk
ebbc1a71d8 Introduced an 'abstract kart' class, which is used to
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
2012-03-19 20:21:11 +00:00
hikerstk
8a0fe903a4 Use singleton constructions for check manager.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10837 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-12 21:25:06 +00:00
hikerstk
ff67a5cf4e Removed the usage of friend declaration. CheckStructure dependencies are
now not read in CheckStructure anymore, instead they are set by the
CheckManager depending on the direction of the track.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10832 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-09 21:14:32 +00:00
hikerstk
87865b7dec Removed unnecessary include of kart.hpp from world.hpp.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10572 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-01-04 05:32:19 +00:00
auria
92eb0ebd2a Ran a small bash script to remove all of those annoying strings. The only thing they gave us were the need to rebuild after committing
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10363 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-12-06 18:43:36 +00:00
auria
9878f12039 Improve and simplify improved rescue code; also remove the CHEATER message I tried to add because it had some glitches
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9810 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-09-12 00:57:14 +00:00
auria
2311b11b90 Added new smart rescue
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9807 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-09-11 23:59:49 +00:00
auria
ee7b178dce Started adding code to assign a checkline to each quad (currently disabled). See #398
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9805 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-09-11 19:46:51 +00:00
auria
d24d70a2f8 Avoid crashing when checklines are incorrect
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8818 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-06-04 23:31:31 +00:00
mbjornstk
015443f582 Set props as per SVN-CONFIG for .[ch]pp, AKA SVN props clean up day. :)
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7493 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-01-21 01:54:38 +00:00
hikerstk
7de2c4de41 Replaced unicode characters in comments with normal ASCII characters.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7028 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-12-15 22:46:06 +00:00
auria
afce1534b9 Fixed warning
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6773 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-11-29 17:01:25 +00:00
hikerstk
25b611a8d3 Adjust color of check lines according to state: active ones are
light red, inactive ones white-grey.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6765 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-11-29 05:26:45 +00:00
auria
196cb0aabe Fixed warning
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6639 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-11-18 15:45:29 +00:00
hikerstk
3812d6b084 Fixed bug in checck structures (activation lines were set to active as default,
which means that if there is more than one activation line, you only needed to
cross the last one).
This will break proper lap counting in all tracks!


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6530 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-11-14 21:47:29 +00:00
hikerstk
fe91d4cfe5 Switched off debug print.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6164 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-09-29 00:26:48 +00:00
hikerstk
4b4bddf35e Support for grouping check structures. E.g. it is now possible to
have more than one lap line, which will always be in synch (i.e.
if one is triggered, all will be set to inactive).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6161 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-09-28 23:29:21 +00:00
mbjornstk
93ef29f2ed Remove kart.hpp, it has been compiling fine (add back if compiler dependant).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5382 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-05-05 19:03:07 +00:00
hikerstk
7c91eb7f34 Fixed crash when using --check-debug and a check structure kind=toggle.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5313 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-04-28 23:00:44 +00:00
hikerstk
ec83ef6cad Bugfix: tried to print a std::vector<bool>, instead of the bool.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5222 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-04-20 23:48:29 +00:00
hikerstk
468507af8b Added debugging features for check structures (use --check-debug), which
prints when a checkline is triggered or activated.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5211 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-04-19 12:37:45 +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
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
hikerstk
b65fbd8a23 Removed tabs.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4301 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-12-16 01:00:15 +00:00
auria
64958b0edf Fixed a few warnings and a TODO
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4049 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-09-27 18:04:33 +00:00
hikerstk
54cf897dc2 Fixed several inconsistencies between track exporter and STK; made
checkline properties a bit easier to set (added type="lap", instead 
of the two properties type="check" lap="lap" previously).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4042 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2009-09-22 22:43:38 +00:00