54 Commits

Author SHA1 Message Date
Benau
f547753aaa Add seamless endcontroller transition in network 2018-09-15 09:43:37 +08:00
Benau
6bdec3d01a Add initial framework for FFA and CTF in network 2018-08-12 10:57:37 +08:00
Benau
9e6ebe6097 Try to fix speedy end controller in network race 2018-08-04 00:02:52 +08:00
Benau
f5230e30aa Use the original way to save controller event
And save more locally for network state
2018-07-18 13:10:44 +08:00
hiker
c456edd9f2 Convert more time handling to handling ticks. 2018-03-20 09:25:39 +11:00
hiker
3506b7da2f Merge pull request #2615 from nado/warning-fix
Fixes warnings
2016-10-05 12:59:22 +11:00
hiker
8949e89809 Merge remote-tracking branch 'origin/master' into rewind
Fixed conflicts.
2016-10-05 08:21:10 +11:00
Nado
25a4aa565a Reduce variables scope when possible, based on the warnings reported by
cppcheck.
2016-10-04 08:55:01 +02:00
Benau
eeac5668d9 Rename QuadGraph to DriveGraph, make it use the new Graph interface 2016-09-17 14:30:28 +08:00
Benau
483dca3754 Make EndController to use length() 2016-09-15 12:40:58 +08:00
Benau
505b50da0c Make getNode return pointer. (easier with dynamic_cast later) 2016-09-09 16:14:28 +08:00
Benau
21dc569f70 Start to clean up quad and graph node 2016-09-04 11:56:03 +08:00
hiker
7c899c943c Refactored KartControl to use setters/getters instead of
just public variables.
2016-08-15 17:26:07 +10:00
hiker
560ff7cee4 Moved ActivePlayer out of Controller and into LocalPlayerController. 2016-01-18 16:47:48 +11:00
hiker
d3a7c75a62 Replaced many uses of getPlayer with Controller::canGetAchievements.
Removed some unused variables.
2016-01-15 08:02:36 +11:00
Benau
f4b723de82 Merge remote-tracking branch 'origin/battleAI' into battleAI 2015-11-15 12:29:01 +08:00
hiker
8d07d26c25 Updated (c) year to include 2015. 2015-03-30 11:42:50 +11:00
hiker
e18c20db65 Fixed various compiler warnings. 2014-09-19 11:02:20 +10:00
nixt
39ef5f1655 Merge remote-tracking branch 'origin/master' into battleAI 2014-02-09 00:37:48 +05:30
KroArtem
a61ee58a39 clean src/karts from cout, printf and cerr 2014-02-06 01:26:30 +04:00
nixt
43f1c59a6e Huge merge from trunk, part 1.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/battleAI@14659 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-08 03:45:57 +00:00
hikerstk
bced8cdb9f Merged with trunk, part 1 (due to previous failures I am splitting this
patch).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@14605 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-12-02 04:27:55 +00:00
nixt
d3f92542df Split AIBaseController to AIBaseLapController and AIBaseController.
AIBaseLapController inherits from AIBaseController. 

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/battleAI@14223 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-10-09 07:26:55 +00:00
deveee
82590c791d In soccer mode the same end camera as in 3 strikes battle
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13699 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-09-16 17:37:07 +00:00
hilnius
ed6e4ebfb4 correcting the ai kart bug due to the former networking removal
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/networking@13088 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-07-05 12:01:29 +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
auria
950bb62f5a Apply patch to convert printfs to the log API
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12677 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-04-19 22:45:58 +00:00
hikerstk
502042432c Big refactoring: the camera for a kart is now not part of the
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
2013-03-06 22:08:41 +00:00
hikerstk
b73f9f46db Disabled end-controller debugging.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11934 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-11-14 01:07:59 +00:00
hikerstk
2d89d85a70 Fixed #785: end controller crashes into wall in math class.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11928 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-11-12 21:47:21 +00:00
hikerstk
ecc1212c11 Allow changing the various levels of AI mostly using
the stk_config file.
Note at this stage no tuning of easy or medium level was
done, this version should behave the same as the hard-coded
version.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11736 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-10-22 21:51:05 +00:00
hikerstk
6536b4d112 Improved handling of controller name so that the end
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
2012-06-09 15:48:18 +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
d76777f765 Fixed crash with end controller.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/reverse_mode@10852 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2012-02-15 20:54:11 +00:00
hikerstk
94be2cfec2 Automatically switch to camera 0 when the lap line is crossed. This
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
2012-02-15 05:23:21 +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
hikerstk
428ed5a07b Made QuadGraph use a singleton-like behaviour. It is still created with
explicit calls to QuadGraph::create(...), and the get() function can
return NULL (in case of a race mode that does not use a quad graph).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9421 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2011-08-04 23:02:58 +00:00
hikerstk
30cb112c46 Fix bug in previous commit (why on earth didn't VS complain???).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6505 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-11-11 22:05:46 +00:00
hikerstk
fc202a57f5 Some code cleanup: made input data structure to follow the m_
notation, removed unnecessary include.
Added new field to input that stores the character (i.e. the
visual character) of a key (but it's not used yet).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6504 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-11-11 20:59:49 +00:00
hikerstk
8d40c65190 Moved the path selection and track quad determination code from
default_ai_controller to ai_base_controller. This way all
controllers (esp end controller) benefit from the fix in quad 
determination without having to apply the same patch in several
files.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6489 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-11-09 22:10:38 +00:00
hikerstk
3e4e4e00f1 Forgotten controller/* in previous patch. They now also
define a proper slowdown on end controller without stopping
on hills.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6340 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-10-26 06:30:39 +00:00
auria
86b5b82c71 Make AIs drive slower during the end animation with an ugly hack
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6242 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-10-11 00:59:06 +00:00
hikerstk
04f2bd7190 1) Started adding new race result screen, which is for now disabled in the game.
2) Replaced int* with std::vector<int> in raceResultOrder.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5682 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-07-15 22:41:41 +00:00
hikerstk
c672b8d2df Removed compiler warnings.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5537 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-06-22 06:56:37 +00:00
hikerstk
927b45fd94 Updated end_controller for new emergency animation, cleaned up unneccssary code,
and fixed bugs causing a crash when driving off track (or under certain conditions
on alternative ways/shortcuts).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5241 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-04-22 13:24:25 +00:00
hikerstk
f2c2d68c77 1) Improved AI. The AI still have some problems in tight curves and S curves,
but should be better than before. Basically the estimation of the turn
   radius was completely wrong and was replaced by a new and better
   algorithm.
2) Introduced new AI base class which has some common functions and variables.
3) Removed unused file auto_kart.hpp.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5102 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-03-31 21:53:32 +00:00
hikerstk
8dfcd28e44 1) Fixed AIs.
2) Changed steering (m_steer positive is now steering left, negative right).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/switch_coordinate_system@4981 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-03-11 22:36:53 +00:00
hikerstk
cd24969100 Replaced calls to kart->getHPR().getHeading directly to
kart->getHeading().


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/switch_coordinate_system@4905 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2010-03-02 05:16:47 +00:00