1) Fixed 'moving physics', i.e. objects on the track that

can be pushed around by karts (currently only used in
   tux tollway).
2) Removed support for magnet.
3) Some code cleanup for missiles etc.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1379 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2008-01-09 12:09:55 +00:00
parent d27bac1a38
commit bd3ab7926f
36 changed files with 478 additions and 593 deletions

View File

@ -14,9 +14,6 @@
(anvil-weight 150.0 ) ;; additional weight an anvil adds to a kart
(anvil-speed-factor 0.2 ) ;; additional slowdown caused by anvil
(parachute-friction 2.0 ) ;; friction increase when a parachute is sttached
(magnet-range 30.0 ) ;; maximum range a magnet can work
(magnet-min-range 4.0 ) ;; unless this distance is reached, kart will accel.
(magnet-time 10.0 ) ;; time a magnet is active
(parachute-time 4.0 ) ;; time an attached parachute is active
(parachute-time-other 8.0 ) ;; time a parachute attached from other kart is active
(bomb-time 30.0 ) ;; time till a bomb explodes

View File

@ -19,7 +19,7 @@
"roadblock.ac",60,-29,{},0,{},{}
"roadcone.ac",58,-33,{},27,{},{}
"roadcone.ac",56,-34,{},147,{},{}
"roadcone.ac",54,-35,{},47,{},{}
"roadcone.ac",54,-31,{},47,{},{}
#"icecreamtruck.ac",70,-30,{},-110,{},{}
#"mytruck.ac",-60,105,{},-100,{},{}
#

View File

@ -1,368 +1,375 @@
AC3Db
MATERIAL "ac3dmat0" rgb 0 0 0 amb 0 0 0 emis 0 0 0 spec 0 0 0 shi 0 trans 1
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "" rgb 1 0 0 amb 1 0 0 emis 0 0 0 spec 1 1 1 shi 51 trans 0
MATERIAL "DefaultWhite" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0.5 0.5 0.5 shi 64 trans 0
MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
MATERIAL "" rgb 1 0 0 amb 0.333333 0.333333 0.333333 emis 0 0 0 spec 1 1 1 shi 51 trans 0
MATERIAL "ac3dmat0" rgb 0 0 0 amb 0 0 0 emis 0 0 0 spec 0 0 0 shi 0 trans 1
OBJECT world
data 20
@physics box mass=10
@physics box mass=50
kids 3
OBJECT poly
name "poly"
loc 1.39699e-08 0.369441 -0.00958636
texture "../images/candy_stripe.rgb"
texrep 2 2
data 4
Mesh
texture "candy_stripe.rgb"
texrep 1 1
crease 30.000000
numvert 36
-0.502033 -0.37125 0.806835
-0.113906 0.388125 0.806835
0.113906 0.388125 0.806835
0.502033 -0.388125 0.806835
0.257342 -0.388125 0.806835
-0.00421875 0.126563 0.806835
-0.240469 -0.37125 0.806835
-0.00421877 0.126563 0.705585
0.257342 -0.388125 0.705585
0.502033 -0.388125 0.705585
0.113906 0.388125 0.705585
-0.240469 -0.37125 0.705585
-0.113906 0.388125 0.705585
-0.502033 -0.37125 0.705585
-0.502033 -0.37125 -0.703478
-0.113906 0.388125 -0.703478
0.113906 0.388125 -0.703478
0.502033 -0.388125 -0.703478
0.257345 -0.388125 -0.703478
-0.00421875 0.126563 -0.703478
-0.240469 -0.37125 -0.703478
-0.00421875 0.126563 -0.804728
0.257345 -0.388125 -0.804728
0.502033 -0.388125 -0.804728
0.113906 0.388125 -0.804728
-0.240469 -0.37125 -0.804728
-0.113906 0.388125 -0.804728
-0.502033 -0.37125 -0.804728
-0.0379688 0.109688 -0.884883
-0.0379688 0.379688 -0.884883
0.0379688 0.379688 -0.884883
0.0379688 0.109688 -0.884883
-0.0379688 0.109688 0.884882
-0.0379688 0.379688 0.884882
0.0379688 0.379688 0.884882
0.0379688 0.109688 0.884882
-0.502033 -0.379409 0.797249
-0.113906 0.379966 0.797249
0.113906 0.379966 0.797249
0.502033 -0.396284 0.797249
0.257342 -0.396284 0.797249
-0.004219 0.118404 0.797249
-0.240469 -0.379409 0.797249
-0.004219 0.118404 0.695999
0.257342 -0.396284 0.695999
0.502033 -0.396284 0.695999
0.113906 0.379966 0.695999
-0.240469 -0.379409 0.695999
-0.113906 0.379966 0.695999
-0.502033 -0.379409 0.695999
-0.502033 -0.379409 -0.713064
-0.113906 0.379966 -0.713064
0.113906 0.379966 -0.713064
0.502033 -0.396284 -0.713064
0.257345 -0.396284 -0.713064
-0.004219 0.118404 -0.713064
-0.240469 -0.379409 -0.713064
-0.004219 0.118404 -0.814314
0.257345 -0.396284 -0.814314
0.502033 -0.396284 -0.814314
0.113906 0.379966 -0.814314
-0.240469 -0.379409 -0.814314
-0.113906 0.379966 -0.814314
-0.502033 -0.379409 -0.814314
-0.037969 0.101529 -0.894469
-0.037969 0.371529 -0.894469
0.037969 0.371529 -0.894469
0.037969 0.101529 -0.894469
-0.037969 0.101529 0.875296
-0.037969 0.371529 0.875296
0.037969 0.371529 0.875296
0.037969 0.101529 0.875296
numsurf 46
SURF 0x0
SURF 0x00
mat 1
refs 3
2 0.613445 1
1 0.386555 1
0 0 0.0217391
SURF 0x0
1 0.773109972477 2.0
0 0.0 0.0434781983495
2 1.22688996792 2.0
SURF 0x00
mat 1
refs 3
4 0.7563 0
3 1 0
2 0.613445 1
SURF 0x0
4 1.51259994507 0.0
3 2.0 0.0
2 1.22688996792 2.0
SURF 0x00
mat 1
refs 3
5 0.495798 0.663044
4 0.7563 0
2 0.613445 1
SURF 0x0
5 0.991595983505 1.32608795166
4 1.51259994507 0.0
2 1.22688996792 2.0
SURF 0x00
mat 1
refs 3
5 0.495798 0.663044
2 0.613445 1
0 0 0.0217391
SURF 0x0
2 1.22688996792 2.0
0 0.0 0.0434781983495
5 0.991595983505 1.32608795166
SURF 0x00
mat 1
refs 3
6 0.260505 0.0217391
5 0.495798 0.663044
0 0 0.0217391
SURF 0x0
5 0.991595983505 1.32608795166
0 0.0 0.0434781983495
6 0.521009981632 0.0434781983495
SURF 0x00
mat 1
refs 3
9 1 0
8 0.7563 0
7 0.495798 0.663044
SURF 0x0
9 2.0 0.0
8 1.51259994507 0.0
7 0.991595983505 1.32608795166
SURF 0x00
mat 1
refs 3
10 0.613445 1
9 1 0
7 0.495798 0.663044
SURF 0x0
10 1.22688996792 2.0
9 2.0 0.0
7 0.991595983505 1.32608795166
SURF 0x00
mat 1
refs 3
10 0.613445 1
7 0.495798 0.663044
11 0.260505 0.0217391
SURF 0x0
10 1.22688996792 2.0
7 0.991595983505 1.32608795166
11 0.521009981632 0.0434781983495
SURF 0x00
mat 1
refs 3
12 0.386555 1
10 0.613445 1
11 0.260505 0.0217391
SURF 0x0
12 0.773109972477 2.0
10 1.22688996792 2.0
11 0.521009981632 0.0434781983495
SURF 0x00
mat 1
refs 3
13 0 0.0217391
12 0.386555 1
11 0.260505 0.0217391
SURF 0x0
13 0.0 0.0434781983495
12 0.773109972477 2.0
11 0.521009981632 0.0434781983495
SURF 0x00
mat 1
refs 3
12 0.386555 1
13 0 0.0217391
0 0 0.0217391
SURF 0x0
13 0.0 0.0434781983495
0 0.0 0.0434781983495
12 0.773109972477 2.0
SURF 0x00
mat 1
refs 3
1 0.386555 1
12 0.386555 1
0 0 0.0217391
SURF 0x0
12 0.773109972477 2.0
0 0.0 0.0434781983495
1 0.773109972477 2.0
SURF 0x00
mat 1
refs 3
10 0.613445 1
12 0.386555 1
1 0.386555 1
SURF 0x0
10 1.22688996792 2.0
12 0.773109972477 2.0
1 0.773109972477 2.0
SURF 0x00
mat 1
refs 3
2 0.613445 1
10 0.613445 1
1 0.386555 1
SURF 0x0
2 1.22688996792 2.0
10 1.22688996792 2.0
1 0.773109972477 2.0
SURF 0x00
mat 1
refs 3
9 1 0
10 0.613445 1
2 0.613445 1
SURF 0x0
9 2.0 0.0
10 1.22688996792 2.0
2 1.22688996792 2.0
SURF 0x00
mat 1
refs 3
3 1 0
9 1 0
2 0.613445 1
SURF 0x0
3 2.0 0.0
9 2.0 0.0
2 1.22688996792 2.0
SURF 0x00
mat 1
refs 3
7 0.495798 0.663044
8 0.7563 0
4 0.7563 0
SURF 0x0
7 0.991595983505 1.32608795166
8 1.51259994507 0.0
4 1.51259994507 0.0
SURF 0x00
mat 1
refs 3
5 0.495798 0.663044
7 0.495798 0.663044
4 0.7563 0
SURF 0x0
5 0.991595983505 1.32608795166
7 0.991595983505 1.32608795166
4 1.51259994507 0.0
SURF 0x00
mat 1
refs 3
11 0.260505 0.0217391
7 0.495798 0.663044
5 0.495798 0.663044
SURF 0x0
11 0.521009981632 0.0434781983495
7 0.991595983505 1.32608795166
5 0.991595983505 1.32608795166
SURF 0x00
mat 1
refs 3
6 0.260505 0.0217391
11 0.260505 0.0217391
5 0.495798 0.663044
SURF 0x0
6 0.521009981632 0.0434781983495
11 0.521009981632 0.0434781983495
5 0.991595983505 1.32608795166
SURF 0x00
mat 1
refs 3
16 0.613445 1
15 0.386555 1
14 0 0.0217391
SURF 0x0
16 1.22688996792 2.0
15 0.773109972477 2.0
14 0.0 0.0434781983495
SURF 0x00
mat 1
refs 3
18 0.756303 0
17 1 0
16 0.613445 1
SURF 0x0
18 1.51260602474 0.0
17 2.0 0.0
16 1.22688996792 2.0
SURF 0x00
mat 1
refs 3
19 0.495798 0.663044
18 0.756303 0
16 0.613445 1
SURF 0x0
19 0.991595983505 1.32608795166
18 1.51260602474 0.0
16 1.22688996792 2.0
SURF 0x00
mat 1
refs 3
19 0.495798 0.663044
16 0.613445 1
14 0 0.0217391
SURF 0x0
19 0.991595983505 1.32608795166
16 1.22688996792 2.0
14 0.0 0.0434781983495
SURF 0x00
mat 1
refs 3
20 0.260505 0.0217391
19 0.495798 0.663044
14 0 0.0217391
SURF 0x0
20 0.521009981632 0.0434781983495
19 0.991595983505 1.32608795166
14 0.0 0.0434781983495
SURF 0x00
mat 1
refs 3
23 1 0
22 0.756303 0
21 0.495798 0.663044
SURF 0x0
23 2.0 0.0
22 1.51260602474 0.0
21 0.991595983505 1.32608795166
SURF 0x00
mat 1
refs 3
24 0.613445 1
23 1 0
21 0.495798 0.663044
SURF 0x0
24 1.22688996792 2.0
23 2.0 0.0
21 0.991595983505 1.32608795166
SURF 0x00
mat 1
refs 3
24 0.613445 1
21 0.495798 0.663044
25 0.260505 0.0217391
SURF 0x0
24 1.22688996792 2.0
21 0.991595983505 1.32608795166
25 0.521009981632 0.0434781983495
SURF 0x00
mat 1
refs 3
26 0.386555 1
24 0.613445 1
25 0.260505 0.0217391
SURF 0x0
26 0.773109972477 2.0
24 1.22688996792 2.0
25 0.521009981632 0.0434781983495
SURF 0x00
mat 1
refs 3
27 0 0.0217391
26 0.386555 1
25 0.260505 0.0217391
SURF 0x0
27 0.0 0.0434781983495
26 0.773109972477 2.0
25 0.521009981632 0.0434781983495
SURF 0x00
mat 1
refs 3
26 0.386555 1
27 0 0.0217391
14 0 0.0217391
SURF 0x0
26 0.773109972477 2.0
27 0.0 0.0434781983495
14 0.0 0.0434781983495
SURF 0x00
mat 1
refs 3
15 0.386555 1
26 0.386555 1
14 0 0.0217391
SURF 0x0
15 0.773109972477 2.0
26 0.773109972477 2.0
14 0.0 0.0434781983495
SURF 0x00
mat 1
refs 3
24 0.613445 1
26 0.386555 1
15 0.386555 1
SURF 0x0
24 1.22688996792 2.0
26 0.773109972477 2.0
15 0.773109972477 2.0
SURF 0x00
mat 1
refs 3
16 0.613445 1
24 0.613445 1
15 0.386555 1
SURF 0x0
16 1.22688996792 2.0
24 1.22688996792 2.0
15 0.773109972477 2.0
SURF 0x00
mat 1
refs 3
23 1 0
24 0.613445 1
16 0.613445 1
SURF 0x0
23 2.0 0.0
24 1.22688996792 2.0
16 1.22688996792 2.0
SURF 0x00
mat 1
refs 3
17 1 0
23 1 0
16 0.613445 1
SURF 0x0
17 2.0 0.0
23 2.0 0.0
16 1.22688996792 2.0
SURF 0x00
mat 1
refs 3
21 0.495798 0.663044
22 0.756303 0
18 0.756303 0
SURF 0x0
21 0.991595983505 1.32608795166
22 1.51260602474 0.0
18 1.51260602474 0.0
SURF 0x00
mat 1
refs 3
19 0.495798 0.663044
21 0.495798 0.663044
18 0.756303 0
SURF 0x0
19 0.991595983505 1.32608795166
21 0.991595983505 1.32608795166
18 1.51260602474 0.0
SURF 0x00
mat 1
refs 3
25 0.260505 0.0217391
21 0.495798 0.663044
19 0.495798 0.663044
SURF 0x0
25 0.521009981632 0.0434781983495
21 0.991595983505 1.32608795166
19 0.991595983505 1.32608795166
SURF 0x00
mat 1
refs 3
20 0.260505 0.0217391
25 0.260505 0.0217391
19 0.495798 0.663044
SURF 0x0
20 0.521009981632 0.0434781983495
25 0.521009981632 0.0434781983495
19 0.991595983505 1.32608795166
SURF 0x00
mat 2
refs 4
28 0.462185 0.641305
29 0.462185 0.989131
30 0.537815 0.989131
31 0.537815 0.641305
SURF 0x0
28 0.924369990826 1.28261005878
29 0.924369990826 1.97826194763
30 1.07562994957 1.97826194763
31 1.07562994957 1.28261005878
SURF 0x00
mat 2
refs 4
34 0.537815 0.989131
35 0.537815 0.641305
31 0.537815 0.641305
30 0.537815 0.989131
SURF 0x0
34 1.07562994957 1.97826194763
35 1.07562994957 1.28261005878
31 1.07562994957 1.28261005878
30 1.07562994957 1.97826194763
SURF 0x00
mat 2
refs 4
35 0.537815 0.641305
34 0.537815 0.989131
33 0.462185 0.989131
32 0.462185 0.641305
SURF 0x0
35 1.07562994957 1.28261005878
34 1.07562994957 1.97826194763
33 0.924369990826 1.97826194763
32 0.924369990826 1.28261005878
SURF 0x00
mat 2
refs 4
32 0.462185 0.641305
33 0.462185 0.989131
29 0.462185 0.989131
28 0.462185 0.641305
SURF 0x0
32 0.924369990826 1.28261005878
33 0.924369990826 1.97826194763
29 0.924369990826 1.97826194763
28 0.924369990826 1.28261005878
SURF 0x00
mat 2
refs 4
29 0.462185 0.989131
33 0.462185 0.989131
34 0.537815 0.989131
30 0.537815 0.989131
SURF 0x0
29 0.924369990826 1.97826194763
33 0.924369990826 1.97826194763
34 1.07562994957 1.97826194763
30 1.07562994957 1.97826194763
SURF 0x00
mat 2
refs 4
32 0.462185 0.641305
28 0.462185 0.641305
31 0.537815 0.641305
35 0.537815 0.641305
32 0.924369990826 1.28261005878
28 0.924369990826 1.28261005878
31 1.07562994957 1.28261005878
35 1.07562994957 1.28261005878
kids 0
OBJECT poly
name "rect"
loc 0 0.363279 -0.00958684
data 8
Mesh.001
crease 30.000000
numvert 4
0.104756 0.391296 -0.890428
0.104756 0.391296 0.890428
0.511457 -0.385133 0.890428
0.511457 -0.385133 -0.890428
0.104756 0.376975 -0.900015
0.104756 0.376975 0.880841
0.511457 -0.399454 0.880841
0.511457 -0.399454 -0.900015
numsurf 1
SURF 0x0
mat 0
SURF 0x00
mat 3
refs 4
0 0 1
1 1 1
2 1 0
3 0 0
0 0.0 1.0
1 1.0 1.0
2 1.0 0.0
3 0.0 0.0
kids 0
OBJECT poly
name "rect"
loc -0.622376 0.369441 0.113656
name "rect.001"
data 8
Mesh.002
crease 30.000000
numvert 4
0.511457 0.391295 -0.890428
0.511457 0.391295 0.890428
0.104756 -0.385133 0.890428
0.104756 -0.385133 -0.890428
-0.110919 0.383136 -0.776772
-0.110919 0.383136 1.004084
-0.51762 -0.393292 1.004084
-0.51762 -0.393292 -0.776772
numsurf 1
SURF 0x0
mat 0
SURF 0x00
mat 3
refs 4
3 0 0
2 1 0
1 1 1
0 0 1
1 1.0 1.0
0 0.0 1.0
3 0.0 0.0
2 1.0 0.0
kids 0

View File

@ -1,176 +1,180 @@
AC3Db
MATERIAL "" rgb 1 0 0 amb 1 0 0 emis 0 0 0 spec 1 1 1 shi 51 trans 0
MATERIAL "DefaultWhite" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0.5 0.5 0.5 shi 64 trans 0
MATERIAL "" rgb 1 0 0 amb 0.333333 0.333333 0.333333 emis 0 0 0 spec 1 1 1 shi 51 trans 0
OBJECT world
data 20
@physics cone mass=1
data 21
@physics cone mass=10
kids 1
OBJECT poly
name "cylinder"
loc 5.96046e-08 1.13906 0.118125
texture "../images/candy_stripe.rgb"
data 4
Mesh
texture "candy_stripe.rgb"
texrep 1 1
crease 30.000000
numvert 25
-0.00344123 -0.365268 -0.114602
0.172562 -1.06558 0.0852665
0.226518 -1.06558 -0.00643399
0.091811 -1.06558 0.146538
-0.00344123 -1.06558 0.168056
-0.0986935 -1.06558 0.146538
-0.179444 -1.06558 0.0852665
-0.233401 -1.06558 -0.00643399
-0.252347 -1.06558 -0.114602
-0.233401 -1.06558 -0.222769
-0.179444 -1.06558 -0.31447
-0.0986937 -1.06558 -0.375742
-0.00344126 -1.06558 -0.397259
0.091811 -1.06558 -0.375742
0.172562 -1.06558 -0.31447
0.226518 -1.06558 -0.222769
0.245465 -1.06558 -0.114602
-0.252347 -1.04449 -0.390929
-0.252347 -1.04449 0.161726
0.245465 -1.04449 0.161726
0.245465 -1.04449 -0.390929
0.245465 -1.15417 0.161726
0.245465 -1.15417 -0.390929
-0.252347 -1.15417 0.161726
-0.252347 -1.15417 -0.390929
-0.003441 0.438147 0.003523
0.172562 -0.262165 0.203391
0.226518 -0.262165 0.111691
0.091811 -0.262165 0.264663
-0.003441 -0.262165 0.286181
-0.098693 -0.262165 0.264663
-0.179444 -0.262165 0.203391
-0.233401 -0.262165 0.111691
-0.252347 -0.262165 0.003523
-0.233401 -0.262165 -0.104644
-0.179444 -0.262165 -0.196345
-0.098694 -0.262165 -0.257617
-0.003441 -0.262165 -0.279134
0.091811 -0.262165 -0.257617
0.172562 -0.262165 -0.196345
0.226518 -0.262165 -0.104644
0.245465 -0.262165 0.003523
-0.252347 -0.241075 -0.272804
-0.252347 -0.241075 0.279851
0.245465 -0.241075 0.279851
0.245465 -0.241075 -0.272804
0.245465 -0.350755 0.279851
0.245465 -0.350755 -0.272804
-0.252347 -0.350755 0.279851
-0.252347 -0.350755 -0.272804
numsurf 22
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
1 0.853553 0.146448
2 0.96194 0.30866
0 0.5 0.500001013279
1 0.853552997112 0.146448001266
2 0.96193999052 0.308660000563
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
3 0.691341 0.0380637
1 0.853553 0.146448
0 0.5 0.500001013279
3 0.691340982914 0.0380637012422
1 0.853552997112 0.146448001266
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
4 0.5 0
3 0.691341 0.0380637
0 0.5 0.500001013279
4 0.5 0.0
3 0.691340982914 0.0380637012422
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
5 0.308658 0.0380637
4 0.5 0
0 0.5 0.500001013279
5 0.308658003807 0.0380637012422
4 0.5 0.0
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
6 0.146447 0.146448
5 0.308658 0.0380637
0 0.5 0.500001013279
6 0.146447002888 0.146448001266
5 0.308658003807 0.0380637012422
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
7 0.0380585 0.30866
6 0.146447 0.146448
0 0.5 0.500001013279
7 0.038058500737 0.308660000563
6 0.146447002888 0.146448001266
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
8 0 0.500001
7 0.0380585 0.30866
0 0.5 0.500001013279
8 0.0 0.500001013279
7 0.038058500737 0.308660000563
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
9 0.0380585 0.69134
8 0 0.500001
0 0.5 0.500001013279
9 0.038058500737 0.69134002924
8 0.0 0.500001013279
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
10 0.146447 0.853552
9 0.0380585 0.69134
0 0.5 0.500001013279
10 0.146447002888 0.853551983833
9 0.038058500737 0.69134002924
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
11 0.308657 0.961938
10 0.146447 0.853552
0 0.5 0.500001013279
11 0.308656990528 0.961938023567
10 0.146447002888 0.853551983833
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
12 0.499999 1
11 0.308657 0.961938
0 0.5 0.500001013279
12 0.499998986721 1.0
11 0.308656990528 0.961938023567
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
13 0.691341 0.961938
12 0.499999 1
0 0.5 0.500001013279
13 0.691340982914 0.961938023567
12 0.499998986721 1.0
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
14 0.853553 0.853552
13 0.691341 0.961938
0 0.5 0.500001013279
14 0.853552997112 0.853551983833
13 0.691340982914 0.961938023567
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
15 0.96194 0.69134
14 0.853553 0.853552
0 0.5 0.500001013279
15 0.96193999052 0.69134002924
14 0.853552997112 0.853551983833
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
16 1 0.500001
15 0.96194 0.69134
0 0.5 0.500001013279
16 1.0 0.500001013279
15 0.96193999052 0.69134002924
SURF 0x10
mat 0
mat 1
refs 3
0 0.5 0.500001
2 0.96194 0.30866
16 1 0.500001
0 0.5 0.500001013279
2 0.96193999052 0.308660000563
16 1.0 0.500001013279
SURF 0x10
mat 0
mat 1
refs 4
17 0 0.988803
18 0 0.0111973
19 1 0.0111973
20 1 0.988803
17 0.0 0.98880302906
18 0.0 0.0111972996965
19 1.0 0.0111972996965
20 1.0 0.98880302906
SURF 0x10
mat 0
mat 1
refs 4
21 1 0.0111973
22 1 0.988803
20 1 0.988803
19 1 0.0111973
21 1.0 0.0111972996965
22 1.0 0.98880302906
20 1.0 0.98880302906
19 1.0 0.0111972996965
SURF 0x10
mat 0
mat 1
refs 4
22 1 0.988803
21 1 0.0111973
23 0 0.0111973
24 0 0.988803
22 1.0 0.98880302906
21 1.0 0.0111972996965
23 0.0 0.0111972996965
24 0.0 0.98880302906
SURF 0x10
mat 0
mat 1
refs 4
24 0 0.988803
23 0 0.0111973
18 0 0.0111973
17 0 0.988803
24 0.0 0.98880302906
23 0.0 0.0111972996965
18 0.0 0.0111972996965
17 0.0 0.98880302906
SURF 0x10
mat 0
mat 1
refs 4
18 0 0.0111973
23 0 0.0111973
21 1 0.0111973
19 1 0.0111973
18 0.0 0.0111972996965
23 0.0 0.0111972996965
21 1.0 0.0111972996965
19 1.0 0.0111972996965
SURF 0x10
mat 0
mat 1
refs 4
24 0 0.988803
17 0 0.988803
20 1 0.988803
22 1 0.988803
24 0.0 0.98880302906
17 0.0 0.98880302906
20 1.0 0.98880302906
22 1.0 0.98880302906
kids 0

View File

@ -141,32 +141,6 @@ void Attachment::update(float dt)
break;
case ATTACH_TINYTUX: if(m_time_left<=0.0) m_kart->endRescue();
break;
#ifdef USE_MAGNET
case ATTACH_MAGNET: break;
case ATTACH_MAGNET_BZZT: float cdist; int closest;
m_kart->getClosestKart(&cdist, &closest);
// if no closest kart, set type to
// non-active magnet
if(closest==-1)
{
if ( m_type == ATTACH_MAGNET_BZZT )
set( ATTACH_MAGNET, m_time_left ) ;
return;
}
// Otherwise: set type to active magnet.
if(m_type==ATTACH_MAGNET)
{
if(m_kart->isPlayerKart() || closest==0)
{
sound_manager->playSfx(SOUND_BZZT);
}
set(ATTACH_MAGNET_BZZT,
m_time_left<4.0?4.0:m_time_left);
}
m_kart->handleMagnet(cdist, closest);
break;
#endif
} // switch
// Detach attachment if its time is up.

View File

@ -27,9 +27,6 @@ class Kart;
// and TINYTUX being the last one. So if new elemts are added, make sure
// to add them in between those values.
enum attachmentType { ATTACH_PARACHUTE,
#ifdef USE_MAGNET
ATTACH_MAGNET, ATTACH_MAGNET_BZZT,
#endif
ATTACH_BOMB,
ATTACH_ANVIL, ATTACH_TINYTUX,
ATTACH_MAX, ATTACH_NOTHING};

View File

@ -44,10 +44,6 @@ struct initAttachmentType {attachmentType attachment; const char *file;};
initAttachmentType iat[]=
{
{ATTACH_PARACHUTE, "parachute.ac"},
#ifdef USE_MAGNET
{ATTACH_MAGNET, "magnet.ac"},
{ATTACH_MAGNET_BZZT, "magnetbzzt.ac"},
#endif
{ATTACH_BOMB, "bomb.ac"},
{ATTACH_ANVIL, "anvil.ac"},
{ATTACH_TINYTUX, "tinytux_magnet.ac"},

View File

@ -1,4 +1,3 @@
// $Id: attachment_manager.hpp 757 2006-09-11 22:27:39Z hiker $
//
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2006 Joerg Henrichs

View File

@ -37,18 +37,49 @@ CallbackManager::~CallbackManager()
{
for(std::vector<Callback*>::const_iterator c = m_allCallbacks[i].begin();
c != m_allCallbacks[i].end(); c++)
delete *c;
m_allCallbacks[i].clear();
}
{
MovingPhysics *mp = dynamic_cast<MovingPhysics*>(*c);
if(mp)
{
ssgDeRefDelete(mp);
}
else
{
delete *c;
}
m_allCallbacks[i].clear();
} // for c in m_allCallbacks[i]
} // for i <CB_MAX
} // ~CallbackManager
//-----------------------------------------------------------------------------
void CallbackManager::addCallback(Callback *c, CallbackType t)
{
m_allCallbacks[t].push_back(c);
MovingPhysics *mp = dynamic_cast<MovingPhysics*>(c);
if(mp)
{
mp->ref();
}
} // addCallback
//-----------------------------------------------------------------------------
void CallbackManager::clear(CallbackType cbType)
{
for(std::vector<Callback*>::const_iterator c = m_allCallbacks[cbType].begin();
c != m_allCallbacks[cbType].end(); c++)
{
delete *c;
MovingPhysics *mp = dynamic_cast<MovingPhysics*>(*c);
if(mp)
{
ssgDeRefDelete(mp);
}
else
{
delete *c;
}
}
m_allCallbacks[cbType].clear();

View File

@ -42,7 +42,7 @@ public:
void update (float dt) const;
void initAll () const;
void clear (CallbackType cbType);
void addCallback(Callback *c, CallbackType t) {m_allCallbacks[t].push_back(c);}
void addCallback(Callback *c, CallbackType t);
}
; // CallbackManager

View File

@ -56,27 +56,9 @@ Material *Collectable::getIcon()
//-----------------------------------------------------------------------------
void Collectable::use()
{
#ifdef USE_MAGNET
if(user_config->disableMagnet)
{
attachmentType at=owner->getAttachment();
if(at==ATTACH_MAGNET)
{
owner->setAttachmentType(ATTACH_MAGNET_BZZT);
}
else if(at==ATTACH_MAGNET_BZZT)
{
owner->setAttachmentType(ATTACH_MAGNET );
} // if MAGNET_BZZT
} // user_config->disableMagnet
#endif
m_number--;
switch (m_type)
{
#ifdef USE_MAGNET
case COLLECT_MAGNET: m_owner->attach(ATTACH_MAGNET_BZZT, stk_config->m_magnet_time);
break ;
#endif
case COLLECT_ZIPPER: m_owner->handleZipper();
break ;
case COLLECT_HOMING:

View File

@ -41,9 +41,6 @@ initCollectableType;
initCollectableType ict[]=
{
{COLLECT_ZIPPER, "zipper.collectable" },
#ifdef USE_MAGNETS
{COLLECT_MAGNET, "magnet.collectable" },
#endif
{COLLECT_SPARK, "spark.projectile" },
{COLLECT_MISSILE, "missile.projectile" },
{COLLECT_HOMING, "homingmissile.projectile" },

View File

@ -36,9 +36,6 @@ enum CollectableType {COLLECT_NOTHING,
COLLECT_MISSILE, COLLECT_HOMING,
COLLECT_SPARK, COLLECT_ZIPPER,
COLLECT_PARACHUTE, COLLECT_ANVIL,
#ifdef USE_MAGNETS
COLLECT_MAGNET,
#endif
COLLECT_MAX};
class CollectableManager

View File

@ -59,7 +59,8 @@ Flyable::Flyable(Kart *kart, CollectableType type) : Moveable(false)
scene->add(m);
} // Flyable
// ----------------------------------------------------------------------------
void Flyable::createPhysics(const btVector3& offset, const btVector3 velocity)
void Flyable::createPhysics(const btVector3& offset, const btVector3 velocity,
btCollisionShape *shape)
{
// The actual transform is determined as follows:
// 1) Compute the heading of the kart
@ -88,7 +89,7 @@ void Flyable::createPhysics(const btVector3& offset, const btVector3 velocity)
trans *= offset_transform;
m_shape = createShape(); // get shape
m_shape = shape;
createBody(m_mass, trans, m_shape, UserPointer::UP_PROJECTILE);
world->getPhysics()->addBody(getBody());

View File

@ -53,7 +53,6 @@ protected:
void getClosestKart(const Kart **minKart, float *minDist,
btVector3 *minDelta) const;
virtual btCollisionShape *createShape()=0;
virtual void too_low (float dt)
{m_body->applyCentralForce(
btVector3(0.0f, 0.0f, m_force_updown)); }
@ -65,7 +64,8 @@ protected:
v.setZ(0.0f);
m_body->setLinearVelocity(v); }
void createPhysics(const btVector3& offset,
const btVector3 velocity);
const btVector3 velocity,
btCollisionShape *shape);
public:
Flyable (Kart* kart, CollectableType type);

View File

@ -137,10 +137,6 @@ HelpPageTwo::HelpPageTwo()
widget_manager->showWgtText( WTOK_ITEMTXT6 );
widget_manager->breakLine();
#ifdef USE_MAGNETS
//Magnets are currently disabled.
#endif
/*Buttons at the bottom*/
widget_manager->addWgt(WTOK_FIRST_PAGE, 25, 7);
widget_manager->setWgtText(WTOK_FIRST_PAGE, _("Previous screen"));

View File

@ -243,6 +243,7 @@ void RaceGUI::drawFPS ()
//-----------------------------------------------------------------------------
void RaceGUI::drawTimer ()
{
return;
if(world->getPhase()!=World::RACE_PHASE &&
world->getPhase()!=World::DELAY_FINISH_PHASE ) return;
char str[256];

View File

@ -33,7 +33,7 @@ Homing::Homing (Kart *kart) : Flyable(kart, COLLECT_HOMING)
0.3f );
// The cylinder needs to be rotated by 90 degrees to face in the right direction:
m_initial_velocity = btVector3(0.0f, m_speed, 0.0f);
createPhysics(offset, m_initial_velocity);
createPhysics(offset, m_initial_velocity, new btCylinderShape(0.5f*m_extend));
m_body->setCollisionFlags(m_body->getCollisionFlags() |
btCollisionObject::CF_KINEMATIC_OBJECT );
m_body->setActivationState(DISABLE_DEACTIVATION);
@ -48,11 +48,6 @@ void Homing::init(const lisp::Lisp* lisp, ssgEntity *homing)
lisp->get("max-distance", m_st_max_distance );
lisp->get("max-turn-angle", m_st_max_turn_angle);
} // init
// -----------------------------------------------------------------------------
btCollisionShape *Homing::createShape()
{
return new btCylinderShape(0.5f*m_extend);
} // createShape
// -----------------------------------------------------------------------------
void Homing::update(float dt)

View File

@ -31,7 +31,6 @@ private:
float steerTowards(btTransform& trans, btVector3& target);
protected:
virtual btCollisionShape *createShape();
virtual void too_low (float dt) {m_initial_velocity.setZ(m_force_updown*dt);}
virtual void too_high(float dt) {m_initial_velocity.setZ(-m_force_updown*dt);}
virtual void right_height(float dt) {m_initial_velocity.setZ(0.0f); }

View File

@ -1185,53 +1185,6 @@ void Kart::placeModel ()
Moveable::placeModel();
} // placeModel
//-----------------------------------------------------------------------------
void Kart::getClosestKart(float *cdist, int *closest)
{
*cdist = SG_MAX ;
*closest = -1 ;
for ( unsigned int i = 0; i < world->getNumKarts() ; ++i )
{
if ( world->getKart(i) == this ) continue ;
if ( world->getKart(i)->getDistanceDownTrack() < getDistanceDownTrack() )
continue ;
float d = sgDistanceSquaredVec2 ( getCoord()->xyz,
world->getKart(i)->getCoord()->xyz ) ;
if ( d < *cdist && d < stk_config->m_magnet_range_sq)
{
*cdist = d ;
*closest = i ;
}
} // for i
} // getClosestKart
//-----------------------------------------------------------------------------
void Kart::handleMagnet(float cdist, int closest)
{
sgVec3 vec ;
sgSubVec2 ( vec, world->getKart(closest)->getCoord()->xyz, getCoord()->xyz );
vec [ 2 ] = 0.0f ;
sgNormalizeVec3 ( vec ) ;
sgHPRfromVec3 ( getCoord()->hpr, vec ) ;
float tgt_velocity = world->getKart(closest)->getVelocity().getY();
//JH FIXME: that should probably be changed, e.g. by increasing the throttle
// to something larger than 1???
if (cdist > stk_config->m_magnet_min_range_sq)
{
if ( getSpeed ()< tgt_velocity )
;//FIXME m_velocity.xyz[1] = tgt_velocity * 1.4f;
}
else
;//FIXME m_velocity.xyz[1] = tgt_velocity ;
} // handleMagnet
//-----------------------------------------------------------------------------
void Kart::setFinishingState(float time)
{

View File

@ -172,7 +172,6 @@ public:
void endRescue ();
void processSkidMarks ();
void getClosestKart (float *cdist, int *closest);
void handleMagnet (float cdist, int closest);
void updatePhysics (float dt);
float NormalizedLateralForce(float alpha, float corner) const;

View File

@ -364,11 +364,9 @@ ssgBranch *Loader::createBranch(char *data) const
}
if(strncmp("physics", data, strlen("physics")) == 0)
{
ssgTransform *tr = new ssgTransform();
MovingPhysics *mp = new MovingPhysics(std::string(data), tr);
MovingPhysics *mp = new MovingPhysics(std::string(data));
callback_manager->addCallback(mp, m_current_callback_type);
return tr;
return mp;
}
fprintf(stderr, "Warning: Ignoring userdata '%s'\n", data);
return NULL ;

View File

@ -26,7 +26,8 @@ Missile::Missile(Kart *kart) : Flyable(kart, COLLECT_MISSILE)
btVector3 offset(0.0f,
kart->getKartLength()+2.0f*m_extend.getY(),
0.3f );
createPhysics(offset, btVector3(0.0f, m_speed, 0.0f));
createPhysics(offset, btVector3(0.0f, m_speed, 0.0f),
new btCylinderShape(0.5f*m_extend));
} // Missile
// -----------------------------------------------------------------------------
@ -35,12 +36,6 @@ void Missile::init(const lisp::Lisp* lisp, ssgEntity *missile)
Flyable::init(lisp, missile, COLLECT_MISSILE);
} // init
// -----------------------------------------------------------------------------
btCollisionShape *Missile::createShape()
{
return new btCylinderShape(0.5f*m_extend);
} // createShape
// -----------------------------------------------------------------------------
void Missile::update(float dt)
{

View File

@ -24,8 +24,6 @@
class Missile : public Flyable
{
protected:
virtual btCollisionShape *createShape();
public:
Missile(Kart *kart);
static void init (const lisp::Lisp* lisp, ssgEntity* missile);

View File

@ -27,15 +27,14 @@
#include "scene.hpp"
// -----------------------------------------------------------------------------
MovingPhysics::MovingPhysics(const std::string data, ssgTransform* trans)
: Callback()
MovingPhysics::MovingPhysics(const std::string data)
: Callback(), ssgTransform()
{
m_trans = trans;
m_shape = NULL;
m_body = NULL;
m_motion_state = NULL;
m_mass = 1;
m_trans->setUserData(new ssgBase()); // prevent tree optimisations to remove this node
setUserData(new ssgBase()); // prevent tree optimisations to remove this node
std::vector<std::string> parameters = StringUtils::split(data, ' ');
if(parameters.size()<2)
@ -60,19 +59,17 @@ MovingPhysics::MovingPhysics(const std::string data, ssgTransform* trans)
fprintf(stderr, "Invalid physics parameter string: '%s'\n",data.c_str());
break;
}
if(p[0]=="mass")
{
StringUtils::from_string<float>(p[1], m_mass);
}
else
{
if(p[0]=="mass")
{
StringUtils::from_string<float>(p[1], m_mass);
}
else
{
fprintf(stderr, "Invalid physics parameter string: '%s'\n",
data.c_str());
break;
}
fprintf(stderr, "Invalid physics parameter string: '%s'\n",
data.c_str());
break;
}
parameters.erase(parameters.begin());
}
} // MovingPhysics
@ -80,11 +77,11 @@ MovingPhysics::MovingPhysics(const std::string data, ssgTransform* trans)
// -----------------------------------------------------------------------------
MovingPhysics::~MovingPhysics()
{
scene->remove(m_trans);
world->getPhysics()->removeBody(m_body);
delete m_shape;
delete m_motion_state;
delete m_body;
delete m_motion_state;
delete m_shape;
scene->remove(this);
} // ~MovingPhysics
// -----------------------------------------------------------------------------
@ -103,15 +100,15 @@ void MovingPhysics::init()
// 1. Remove the object from the graph and attach it to the root
// -------------------------------------------------------------
if(m_trans->getNumParents()>1)
if(getNumParents()>1)
{
fprintf(stderr, "WARNING: physical object with more than one parent!!\n");
return;
}
ssgBranch *parent = m_trans->getParent(0);
ssgBranch *parent = getParent(0);
scene->add(m_trans);
parent->removeKid(m_trans);
scene->add(this);
parent->removeKid(this);
// 2. Determine the original position of the object
// ------------------------------------------------
@ -160,18 +157,18 @@ void MovingPhysics::init()
// 3. Determine size of the object
// -------------------------------
float x_min, x_max, y_min, y_max, z_min, z_max, radius;
MinMax(m_trans, &x_min, &x_max, &y_min, &y_max, &z_min, &z_max);
MinMax(this, &x_min, &x_max, &y_min, &y_max, &z_min, &z_max);
m_half_height = 0.5f*(z_max-z_min);
switch (m_body_type)
{
case BODY_CONE: radius = 0.5f*std::max(x_max-x_min, y_max-y_min);
m_shape = new btConeShape(radius, z_max-z_min);
m_trans->setName("cone");
m_shape = new btConeShapeZ(radius, z_max-z_min);
setName("cone");
break;
case BODY_BOX: m_shape = new btBoxShape(btVector3(0.5f*(x_max-x_min),
0.5f*(y_max-y_min),
0.5f*(z_max-z_min) ) );
m_trans->setName("box");
setName("box");
break;
case BODY_NONE: fprintf(stderr, "WARNING: Uninitialised moving shape\n");
break;
@ -181,13 +178,12 @@ void MovingPhysics::init()
// --------------------------
btTransform trans;
trans.setIdentity();
// trans.setOrigin(btVector3(0, 8, 5+rand()%10));
trans.setOrigin(btVector3(pos[3][0],pos[3][1],pos[3][2]+m_half_height));
m_motion_state = new btDefaultMotionState(trans);
float mass = 10;
btVector3 inertia;
m_shape->calculateLocalInertia(mass, inertia);
m_body = new btRigidBody(mass, m_motion_state, m_shape, inertia);
m_shape->calculateLocalInertia(m_mass, inertia);
m_body = new btRigidBody(m_mass, m_motion_state, m_shape, inertia);
//m_body->setDamping(2.0f, 2.0f);
world->getPhysics()->addBody(m_body);
} // init
@ -198,12 +194,12 @@ void MovingPhysics::update(float dt)
m_motion_state->getWorldTransform(t);
float m[4][4];
t.getOpenGLMatrix((float*)&m);
// printf("%lx is %f %f %f\n",this, t.getOrigin().x(),t.getOrigin().y(),t.getOrigin().z());
// Transfer the new position and hpr to m_curr_pos
sgCoord m_curr_pos;
sgSetCoord(&m_curr_pos, m);
m_trans->setTransform(&m_curr_pos);
setTransform(&m_curr_pos);
} // update
// -----------------------------------------------------------------------------

View File

@ -25,21 +25,20 @@
#include "callback.hpp"
#include <string>
class MovingPhysics : public Callback
class MovingPhysics : public ssgTransform, public Callback
{
public:
enum bodyTypes {BODY_NONE, BODY_CONE, BODY_BOX};
protected:
bodyTypes m_body_type;
ssgTransform *m_trans;
btCollisionShape *m_shape;
btRigidBody *m_body;
btDefaultMotionState *m_motion_state;
float m_half_height;
float m_mass;
public:
MovingPhysics (const std::string data, ssgTransform *trans);
MovingPhysics (const std::string data);
~MovingPhysics ();
void update (float dt);
void init ();

View File

@ -143,7 +143,7 @@ void PlayerKart::update(float dt)
{
if (m_collectable.getType()==COLLECT_NOTHING) sound_manager->playSfx(SOUND_BEEP);
// use() needs to be called even if there currently is no collecteable
// since use() tests for switching a magnet on/off.
// since use() can test if something needs to be switched on/off.
m_collectable.use() ;
m_controls.fire = false;
}

View File

@ -46,11 +46,11 @@ RaceMode::exit_race()
{
menu_manager->switchToMainMenu();
scene->clear();
delete world;
world = 0;
scene->clear();
race_manager->m_active_race = false;
}

View File

@ -344,7 +344,6 @@ void DefaultRobot::handle_items( const float DELTA, const int STEPS )
m_time_since_last_shot = 0.0f;
}
break;
/*TODO: teach AI to use the magnet*/
default:
m_controls.fire = true;
m_time_since_last_shot = 0.0f;

View File

@ -35,7 +35,8 @@ Spark::Spark(Kart *kart) : Flyable(kart, COLLECT_SPARK)
speed = m_speed;
}
createPhysics(offset, btVector3(0.0f, speed, 0.0f));
createPhysics(offset, btVector3(0.0f, speed, 0.0f),
new btSphereShape(0.5f*m_extend.getY()));
// unset no_contact_response flags, so that the spark
// will bounce off the track
@ -55,13 +56,6 @@ void Spark::init(const lisp::Lisp* lisp, ssgEntity *spark)
lisp->get("force-to-target", m_st_force_to_target);
} // init
// -----------------------------------------------------------------------------
btCollisionShape *Spark::createShape()
{
return new btSphereShape(0.5f*m_extend.getY());
} // createShape
// -----------------------------------------------------------------------------
void Spark::update(float dt)
{

View File

@ -27,8 +27,6 @@ class Spark : public Flyable
private:
static float m_st_max_distance; // maximum distance for a spark to be attracted
static float m_st_force_to_target;
protected:
virtual btCollisionShape *createShape();
public:
Spark(Kart* kart);

View File

@ -67,8 +67,6 @@ void STKConfig::load(const std::string filename)
CHECK_NEG(m_air_resistance, "air-resistance" );
CHECK_NEG(m_max_steer_angle, "max-steer-angle" );
CHECK_NEG(m_roll_resistance, "roll-resistance" );
CHECK_NEG(m_magnet_range_sq, "magnet-range" );
CHECK_NEG(m_magnet_time, "magnet-time" );
CHECK_NEG(m_brake_factor, "brake-factor" );
CHECK_NEG(m_brake_force, "brake-force" );
CHECK_NEG(m_jump_impulse, "jump-impulse" );
@ -86,7 +84,6 @@ void STKConfig::load(const std::string filename)
CHECK_NEG(m_wheelie_step, "wheelie-step" );
CHECK_NEG(m_wheelie_power_boost, "wheelie-power-boost" );
CHECK_NEG(m_magnet_min_range_sq, "magnet-min-range" );
CHECK_NEG(m_parachute_friction, "parachute-friction" );
CHECK_NEG(m_time_full_steer, "time-full-steer" );
@ -116,9 +113,6 @@ void STKConfig::load(const std::string filename)
CHECK_NEG(m_jump_velocity, "jump-velocity" );
CHECK_NEG(m_explosion_impulse, "explosion-impulse" );
// Precompute some handy values to reduce work later
m_magnet_range_sq = m_magnet_range_sq * m_magnet_range_sq;
m_magnet_min_range_sq = m_magnet_min_range_sq * m_magnet_min_range_sq;
} // load
/** Init all values with invalid defaults, which are tested later. This
@ -127,16 +121,16 @@ void STKConfig::load(const std::string filename)
*/
void STKConfig::init_defaults()
{
m_wheel_base = m_height_cog = m_magnet_min_range_sq = m_roll_resistance = m_mass =
m_wheel_base = m_height_cog = m_roll_resistance = m_mass =
m_corn_r = m_air_resistance = m_tire_grip = m_max_steer_angle =
m_corn_f = m_inertia = m_anvil_weight = m_parachute_friction =
m_engine_power = m_magnet_range_sq = m_jump_impulse = m_brake_factor =
m_engine_power = m_jump_impulse = m_brake_factor =
m_anvil_speed_factor = m_time_full_steer = m_wheelie_max_pitch =
m_wheelie_max_speed_ratio = m_wheelie_pitch_rate = m_wheelie_restore_rate =
m_wheelie_speed_boost = m_air_res_reduce[2] = m_air_res_reduce[1] =
m_parachute_time = m_bomb_time = m_bomb_time_increase= m_anvil_time =
m_zipper_time = m_zipper_force =
m_parachute_time_other = m_magnet_time = m_max_road_distance = m_shortcut_segments =
m_parachute_time_other = m_max_road_distance = m_shortcut_segments =
//bullet physics data
m_suspension_stiffness = m_wheel_damping_relaxation = m_wheel_damping_compression =
m_friction_slip = m_roll_influence = m_wheel_radius = m_wheel_width =
@ -161,9 +155,6 @@ void STKConfig::getAllData(const lisp::Lisp* lisp)
lisp->get("shortcut-skipped-segments", m_shortcut_segments );
lisp->get("anvil-speed-factor", m_anvil_speed_factor );
lisp->get("parachute-friction", m_parachute_friction );
lisp->get("magnet-range", m_magnet_range_sq );
lisp->get("magnet-min-range", m_magnet_min_range_sq );
lisp->get("magnet-time", m_magnet_time );
lisp->get("jump-impulse", m_jump_impulse );
lisp->get("reduce-air-resistance-racer", m_air_res_reduce[2] );
lisp->get("reduce-air-resistance-driver", m_air_res_reduce[1] );

View File

@ -29,9 +29,6 @@ public:
float m_anvil_weight; // Additional kart weight if anvil is attached
float m_anvil_speed_factor; // To decrease speed once when attached
float m_parachute_friction; // Increased air friction when parachute
float m_magnet_range_sq; // Squared range for magnets
float m_magnet_min_range_sq; // Squared minimum range for magnets
float m_magnet_time; // time a magnet is active
float m_jump_impulse; // percentage of gravity when jumping
float m_air_res_reduce[3]; // air resistance reduction for the three levels
float m_parachute_time; // time a parachute is active

View File

@ -124,7 +124,6 @@ void UserConfig::setDefaults()
m_display_fps = false;
m_herring_style = "new";
m_background_music = "";
m_disable_magnet = true;
m_profile = 0;
m_use_kph = false;
m_improved_physics = false;
@ -428,7 +427,6 @@ void UserConfig::loadConfig(const std::string& filename)
lisp->get("displayFPS", m_display_fps);
lisp->get("herringStyle", m_herring_style);
lisp->get("background-music", m_background_music);
lisp->get("disableMagnet", m_disable_magnet);
lisp->get("useKPH", m_use_kph);
lisp->get("improvedPhysics", m_improved_physics);
@ -605,8 +603,6 @@ void UserConfig::saveConfig(const std::string& filename)
writer->write("herringStyle\t", m_herring_style);
writer->writeComment("Background music file to use,");
writer->write("background-music\t", m_background_music);
writer->writeComment("Allow players to disable a magnet");
writer->write("disableMagnet\t", m_disable_magnet);
writer->writeComment("Use of kilometers per hours (km/h) instead of mph");
writer->write("useKPH\t", m_use_kph);
writer->writeComment("With improved physics the gravity on a non-horizontal");

View File

@ -142,7 +142,6 @@ public:
std::string m_herring_style;
std::string m_username;
std::string m_background_music;
bool m_disable_magnet; // true if a magnet can be dis- and enabled
bool m_replay_history;
bool m_use_kph;
bool m_improved_physics;

View File

@ -148,8 +148,8 @@ void Widget::update(const float DELTA)
if( m_track_num != -1 )
{
track_manager->getTrack( m_track_num )->drawScaled2D( m_x, m_y,
m_width, m_height);
track_manager->getTrack( m_track_num )->drawScaled2D( (float)m_x,
(float)m_y, (float)m_width, (float)m_height);
}
else
{