Turned Spark into Bowling Ball

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2173 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2008-07-21 01:55:41 +00:00
parent fdc73349eb
commit 0b56f85de6
19 changed files with 844 additions and 108 deletions

View File

@ -1,15 +1,15 @@
;; -*- mode: lisp -*- ;; -*- mode: lisp -*-
(tuxkart-collectable (tuxkart-collectable
(name "spark") (name "Bowling")
(model "spark.ac") (model "bowling.ac")
(icon "spark.rgb") (icon "bowlingicon.rgb")
(speed 5.0) (speed 5.0)
(min-height 0.2) ; height above terrain below which a spark is (min-height 0.2) ; height above terrain below which a spark is
; started to be pulled up ; started to be pulled up
(max-height 1.0) ; height above terrain at which a spark is (max-height 1.0) ; height above terrain at which a spark is
; started to be pulled back to ground ; started to be pulled back to ground
(force-updown 2.0) ; force pushing the spark down (force-updown 1.0) ; force pushing the spark down
; when it's too high above ground ; when it's too high above ground
(force-to-target 20) ; force with which a spark flies towards (force-to-target 20) ; force with which a spark flies towards
; the nearest kart ; the nearest kart

784
data/models/bowling.ac Normal file
View File

@ -0,0 +1,784 @@
AC3Db
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
OBJECT world
kids 1
OBJECT poly
name "bowling"
data 7
bowling
texture "bowling.rgb"
texrep 1 1
crease 30.000000
numvert 98
0 0 -0.441011
0.176056 0 -0.411378
0 -0.176056 -0.411378
-0.176056 0 -0.411378
0 0.176056 -0.411378
0.163854 0.163854 -0.383488
0.163854 -0.163854 -0.383488
-0.163854 -0.163854 -0.383488
-0.163854 0.163854 -0.383488
0 0 0.441011
0 0.176056 0.411378
-0.176056 0 0.411378
0 -0.176056 0.411378
0.176056 0 0.411378
0.163854 0.163854 0.383488
-0.163854 0.163854 0.383488
-0.163854 -0.163854 0.383488
0.163854 -0.163854 0.383488
0.441011 0 0
0.411378 0.176056 0
0.411378 0 0.176056
0.411378 -0.176056 0
0.411378 0 -0.176056
0.383488 0.163854 -0.163854
0.383488 0.163854 0.163854
0.383488 -0.163854 0.163854
0.383488 -0.163854 -0.163854
0 -0.441011 0
0.176056 -0.411378 0
0 -0.411378 0.176056
-0.176056 -0.411378 0
0 -0.411378 -0.176056
0.163854 -0.383488 -0.163854
0.163854 -0.383488 0.163854
-0.163854 -0.383488 0.163854
-0.163854 -0.383488 -0.163854
-0.441011 0 0
-0.411378 -0.176056 0
-0.411378 0 0.176056
-0.411378 0.176056 0
-0.411378 0 -0.176056
-0.383488 -0.163854 -0.163854
-0.383488 -0.163854 0.163854
-0.383488 0.163854 0.163854
-0.383488 0.163854 -0.163854
0 0.441011 0
0.176056 0.411378 0
0 0.411378 -0.176056
-0.176056 0.411378 0
0 0.411378 0.176056
0.163854 0.383488 0.163854
0.163854 0.383488 -0.163854
-0.163854 0.383488 -0.163854
-0.163854 0.383488 0.163854
0.151652 -0.300689 -0.300689
0 -0.322914 -0.322914
-0.151652 -0.300689 -0.300689
0.300689 0.151652 -0.300689
0.322914 0 -0.322914
0.300689 -0.151652 -0.300689
0.151652 0.300689 -0.300689
0 0.322914 -0.322914
-0.151652 0.300689 -0.300689
-0.300689 -0.151652 -0.300689
-0.322914 0 -0.322914
-0.300689 0.151652 -0.300689
0.300689 0.151652 0.300689
0.322914 0 0.322914
0.300689 -0.151652 0.300689
0.151652 -0.30069 0.300689
0 -0.322914 0.322914
-0.151652 -0.300689 0.300689
-0.30069 -0.151652 0.300689
-0.322914 0 0.322914
-0.300689 0.151652 0.300689
0.151652 0.300689 0.300689
0 0.322914 0.322914
-0.151652 0.300689 0.300689
0.300689 -0.30069 -0.151652
0.322914 -0.322914 0
0.300689 -0.30069 0.151652
0.300689 0.300689 -0.151652
0.322914 0.322914 0
0.300689 0.300689 0.151652
-0.30069 -0.300689 -0.151652
-0.322914 -0.322914 0
-0.30069 -0.300689 0.151652
-0.300689 0.300689 -0.151652
-0.322914 0.322914 0
-0.300689 0.300689 0.151652
0.255659 0.255659 -0.255659
0.255659 -0.255659 -0.255659
-0.255659 -0.255659 -0.255659
-0.255659 0.255659 -0.255659
0.255659 0.255658 0.255659
0.255658 -0.255659 0.255659
-0.255659 -0.255659 0.255659
-0.255659 0.255659 0.255659
numsurf 96
SURF 0x10
mat 0
refs 4
0 0.971503973007 0.494542956352
4 0.952786266804 0.627975404263
5 0.841649055481 0.598315775394
1 0.846283316612 0.494104087353
SURF 0x10
mat 0
refs 4
1 0.846283316612 0.494104087353
5 0.841649055481 0.598315775394
57 0.744733572006 0.583938419819
58 0.745049834251 0.493749082088
SURF 0x10
mat 0
refs 4
4 0.952786266804 0.627975404263
61 0.90722745657 0.745713591576
60 0.813135445118 0.696763515472
5 0.841649055481 0.598315775394
SURF 0x10
mat 0
refs 4
5 0.841649055481 0.598315775394
60 0.813135445118 0.696763515472
90 0.744470477104 0.658952236176
57 0.744733572006 0.583938419819
SURF 0x10
mat 0
refs 4
0 0.971503973007 0.494542956352
1 0.846283316612 0.494104087353
6 0.842379570007 0.389862418175
2 0.953721761703 0.360982596874
SURF 0x10
mat 0
refs 4
2 0.953721761703 0.360982596874
6 0.842379570007 0.389862418175
54 0.8145570755 0.291217565536
55 0.908989429474 0.242928564548
SURF 0x10
mat 0
refs 4
1 0.846283316612 0.494104087353
58 0.745049834251 0.493749082088
59 0.745366096497 0.403560042381
6 0.842379570007 0.389862418175
SURF 0x10
mat 0
refs 4
6 0.842379570007 0.389862418175
59 0.745366096497 0.403560042381
91 0.74562895298 0.328546285629
54 0.8145570755 0.291217565536
SURF 0x10
mat 0
refs 4
0 0.234210848808 0.250000119209
2 0.161899507046 0.229852631688
7 0.186450302601 0.17065833509
3 0.243660032749 0.180879756808
SURF 0x10
mat 0
refs 4
3 0.243660032749 0.180879756808
7 0.186450302601 0.17065833509
63 0.201515674591 0.118194371462
64 0.251299053431 0.124999985099
SURF 0x10
mat 0
refs 4
2 0.161899507046 0.229852631688
55 0.100229121745 0.196036249399
56 0.134179472923 0.147673606873
7 0.186450302601 0.17065833509
SURF 0x10
mat 0
refs 4
7 0.186450302601 0.17065833509
56 0.134179472923 0.147673606873
92 0.160109043121 0.112533859909
63 0.201515674591 0.118194371462
SURF 0x10
mat 0
refs 4
0 0.234210848808 0.250000119209
3 0.243660032749 0.180879756808
8 0.301514178514 0.186388194561
4 0.309276670218 0.250000119209
SURF 0x10
mat 0
refs 4
4 0.309276670218 0.250000119209
8 0.301514178514 0.186388194561
62 0.358036339283 0.178275987506
61 0.377760797739 0.233976602554
SURF 0x10
mat 0
refs 4
3 0.243660032749 0.180879756808
64 0.251299053431 0.124999985099
65 0.301082521677 0.131805568933
8 0.301514178514 0.186388194561
SURF 0x10
mat 0
refs 4
8 0.301514178514 0.186388194561
65 0.301082521677 0.131805568933
93 0.342489302158 0.13746599853
62 0.358036339283 0.178275987506
SURF 0x10
mat 0
refs 4
9 0.234212100506 1.0
13 0.243661120534 0.9308796525
14 0.301515191793 0.936387956142
10 0.30927786231 0.999999701977
SURF 0x10
mat 0
refs 4
10 0.30927786231 0.999999701977
14 0.301515191793 0.936387956142
75 0.358037143946 0.928275644779
76 0.377761751413 0.983976006508
SURF 0x10
mat 0
refs 4
13 0.243661120534 0.9308796525
67 0.251300126314 0.874999940395
66 0.301083475351 0.881805419922
14 0.301515191793 0.936387956142
SURF 0x10
mat 0
refs 4
14 0.301515191793 0.936387956142
66 0.301083475351 0.881805419922
94 0.342490136623 0.887465894222
75 0.358037143946 0.928275644779
SURF 0x10
mat 0
refs 4
9 0.401224255562 0.384807258844
10 0.464590460062 0.468489974737
15 0.38712400198 0.513534069061
11 0.332145988941 0.45368874073
SURF 0x10
mat 0
refs 4
11 0.332145988941 0.45368874073
15 0.38712400198 0.513534069061
74 0.325911581516 0.559128582478
73 0.276300191879 0.509375452995
SURF 0x10
mat 0
refs 4
10 0.464590460062 0.468489974737
76 0.504538118839 0.55836135149
77 0.425793468952 0.583392083645
15 0.38712400198 0.513534069061
SURF 0x10
mat 0
refs 4
15 0.38712400198 0.513534069061
77 0.425793468952 0.583392083645
97 0.367175161839 0.600510120392
74 0.325911581516 0.559128582478
SURF 0x10
mat 0
refs 4
9 0.401224255562 0.384807258844
11 0.332145988941 0.45368874073
16 0.272457838058 0.398540228605
12 0.317722678185 0.321202456951
SURF 0x10
mat 0
refs 4
12 0.317722678185 0.321202456951
16 0.272457838058 0.398540228605
71 0.202710211277 0.359671443701
70 0.227965563536 0.280998468399
SURF 0x10
mat 0
refs 4
11 0.332145988941 0.45368874073
73 0.276300191879 0.509375452995
72 0.226688832045 0.459622323513
16 0.272457838058 0.398540228605
SURF 0x10
mat 0
refs 4
16 0.272457838058 0.398540228605
72 0.226688832045 0.459622323513
96 0.185425102711 0.418240875006
71 0.202710211277 0.359671443701
SURF 0x10
mat 0
refs 4
9 0.234212100506 1.0
12 0.161900550127 0.979852735996
17 0.18645131588 0.920658230782
13 0.243661120534 0.9308796525
SURF 0x10
mat 0
refs 4
13 0.243661120534 0.9308796525
17 0.18645131588 0.920658230782
68 0.201516747475 0.868194282055
67 0.251300126314 0.874999940395
SURF 0x10
mat 0
refs 4
12 0.161900550127 0.979852735996
70 0.100229837 0.946036398411
69 0.134180366993 0.897673487663
17 0.18645131588 0.920658230782
SURF 0x10
mat 0
refs 4
17 0.18645131588 0.920658230782
69 0.134180366993 0.897673487663
95 0.160110071301 0.862533628941
68 0.201516747475 0.868194282055
SURF 0x10
mat 0
refs 4
18 0.5185957551 0.492954909801
22 0.643816232681 0.493394196033
23 0.647719800472 0.597635746002
19 0.536377370358 0.626515507698
SURF 0x10
mat 0
refs 4
19 0.536377370358 0.626515507698
23 0.647719800472 0.597635746002
81 0.675542116165 0.696281254292
82 0.581109285355 0.744570016861
SURF 0x10
mat 0
refs 4
22 0.643816232681 0.493394196033
58 0.745049834251 0.493749082088
57 0.744733572006 0.583938419819
23 0.647719800472 0.597635746002
SURF 0x10
mat 0
refs 4
23 0.647719800472 0.597635746002
57 0.744733572006 0.583938419819
90 0.744470477104 0.658952236176
81 0.675542116165 0.696281254292
SURF 0x10
mat 0
refs 4
18 0.268388241529 0.750000238419
19 0.340699195862 0.770147323608
24 0.316148728132 0.8293415308
20 0.258939146996 0.819120287895
SURF 0x10
mat 0
refs 4
20 0.258939146996 0.819120287895
24 0.316148728132 0.8293415308
66 0.301083475351 0.881805419922
67 0.251300126314 0.874999940395
SURF 0x10
mat 0
refs 4
19 0.340699195862 0.770147323608
82 0.402369588614 0.803963184357
83 0.368419587612 0.852325975895
24 0.316148728132 0.8293415308
SURF 0x10
mat 0
refs 4
24 0.316148728132 0.8293415308
83 0.368419587612 0.852325975895
94 0.342490136623 0.887465894222
66 0.301083475351 0.881805419922
SURF 0x10
mat 0
refs 4
18 0.268388241529 0.750000238419
20 0.258939146996 0.819120287895
25 0.201085269451 0.813611805439
21 0.193322971463 0.750000238419
SURF 0x10
mat 0
refs 4
21 0.193322971463 0.750000238419
25 0.201085269451 0.813611805439
80 0.1445633322 0.821723759174
79 0.124839223921 0.766023278236
SURF 0x10
mat 0
refs 4
20 0.258939146996 0.819120287895
67 0.251300126314 0.874999940395
68 0.201516747475 0.868194282055
25 0.201085269451 0.813611805439
SURF 0x10
mat 0
refs 4
25 0.201085269451 0.813611805439
68 0.201516747475 0.868194282055
95 0.160110071301 0.862533628941
80 0.1445633322 0.821723759174
SURF 0x10
mat 0
refs 4
18 0.5185957551 0.492954909801
21 0.537313938141 0.359522521496
26 0.648450791836 0.389182507992
22 0.643816232681 0.493394196033
SURF 0x10
mat 0
refs 4
22 0.643816232681 0.493394196033
26 0.648450791836 0.389182507992
59 0.745366096497 0.403560042381
58 0.745049834251 0.493749082088
SURF 0x10
mat 0
refs 4
21 0.537313938141 0.359522521496
79 0.582872986794 0.241785287857
78 0.676964461803 0.290735185146
26 0.648450791836 0.389182507992
SURF 0x10
mat 0
refs 4
26 0.648450791836 0.389182507992
78 0.676964461803 0.290735185146
91 0.74562895298 0.328546285629
59 0.745366096497 0.403560042381
SURF 0x10
mat 0
refs 4
27 0.746645748615 0.0384870767593
31 0.839451014996 0.13675352931
32 0.746043145657 0.210451811552
28 0.65315413475 0.136100381613
SURF 0x10
mat 0
refs 4
28 0.65315413475 0.136100381613
32 0.746043145657 0.210451811552
78 0.676964461803 0.290735185146
79 0.582872986794 0.241785287857
SURF 0x10
mat 0
refs 4
31 0.839451014996 0.13675352931
55 0.908989429474 0.242928564548
54 0.8145570755 0.291217565536
32 0.746043145657 0.210451811552
SURF 0x10
mat 0
refs 4
32 0.746043145657 0.210451811552
54 0.8145570755 0.291217565536
91 0.74562895298 0.328546285629
78 0.676964461803 0.290735185146
SURF 0x10
mat 0
refs 4
27 0.0 0.840645074844
28 0.0610913299024 0.796618878841
33 0.0949230864644 0.853622078896
29 0.047032803297 0.899453163147
SURF 0x10
mat 0
refs 4
29 0.047032803297 0.899453163147
33 0.0949230864644 0.853622078896
69 0.134180366993 0.897673487663
70 0.100229837 0.946036398411
SURF 0x10
mat 0
refs 4
28 0.0610913299024 0.796618878841
79 0.124839223921 0.766023278236
80 0.1445633322 0.821723759174
33 0.0949230864644 0.853622078896
SURF 0x10
mat 0
refs 4
33 0.0949230864644 0.853622078896
80 0.1445633322 0.821723759174
95 0.160110071301 0.862533628941
69 0.134180366993 0.897673487663
SURF 0x10
mat 0
refs 4
27 0.0258678700775 0.258228480816
29 0.131129086018 0.261017858982
34 0.120463214815 0.353093594313
30 0.0283575262874 0.363497078419
SURF 0x10
mat 0
refs 4
30 0.0283575262874 0.363497078419
34 0.120463214815 0.353093594313
86 0.126806721091 0.43535900116
85 0.0480621382594 0.460389941931
SURF 0x10
mat 0
refs 4
29 0.131129086018 0.261017858982
70 0.227965563536 0.280998468399
71 0.202710211277 0.359671443701
34 0.120463214815 0.353093594313
SURF 0x10
mat 0
refs 4
34 0.120463214815 0.353093594313
71 0.202710211277 0.359671443701
96 0.185425102711 0.418240875006
86 0.126806721091 0.43535900116
SURF 0x10
mat 0
refs 4
27 0.0 0.0906459093094
30 0.0610905252397 0.0466197691858
35 0.0949223339558 0.103622458875
31 0.0470324940979 0.149453282356
SURF 0x10
mat 0
refs 4
31 0.0470324940979 0.149453282356
35 0.0949223339558 0.103622458875
56 0.134179472923 0.147673606873
55 0.100229121745 0.196036249399
SURF 0x10
mat 0
refs 4
30 0.0610905252397 0.0466197691858
85 0.124837882817 0.0160239171237
84 0.144562199712 0.0717241019011
35 0.0949223339558 0.103622458875
SURF 0x10
mat 0
refs 4
35 0.0949223339558 0.103622458875
84 0.144562199712 0.0717241019011
92 0.160109043121 0.112533859909
56 0.134179472923 0.147673606873
SURF 0x10
mat 0
refs 4
36 0.26838684082 0.0
40 0.258937984705 0.0691202506423
41 0.201084062457 0.0636119395494
37 0.193321421742 4.02792693421e-07
SURF 0x10
mat 0
refs 4
37 0.193321421742 4.02792693421e-07
41 0.201084062457 0.0636119395494
84 0.144562199712 0.0717241019011
85 0.124837882817 0.0160239171237
SURF 0x10
mat 0
refs 4
40 0.258937984705 0.0691202506423
64 0.251299053431 0.124999985099
63 0.201515674591 0.118194371462
41 0.201084062457 0.0636119395494
SURF 0x10
mat 0
refs 4
41 0.201084062457 0.0636119395494
63 0.201515674591 0.118194371462
92 0.160109043121 0.112533859909
84 0.144562199712 0.0717241019011
SURF 0x10
mat 0
refs 4
36 0.151376381516 0.633943736553
37 0.0880100503564 0.550261318684
42 0.165476366878 0.505217015743
38 0.22045455873 0.56506216526
SURF 0x10
mat 0
refs 4
38 0.22045455873 0.56506216526
42 0.165476366878 0.505217015743
72 0.226688832045 0.459622323513
73 0.276300191879 0.509375452995
SURF 0x10
mat 0
refs 4
37 0.0880100503564 0.550261318684
85 0.0480621382594 0.460389941931
86 0.126806721091 0.43535900116
42 0.165476366878 0.505217015743
SURF 0x10
mat 0
refs 4
42 0.165476366878 0.505217015743
86 0.126806721091 0.43535900116
96 0.185425102711 0.418240875006
72 0.226688832045 0.459622323513
SURF 0x10
mat 0
refs 4
36 0.151376381516 0.633943736553
38 0.22045455873 0.56506216526
43 0.280142605305 0.620210587978
39 0.234877839684 0.697548270226
SURF 0x10
mat 0
refs 4
39 0.234877839684 0.697548270226
43 0.280142605305 0.620210587978
89 0.349889993668 0.659079432487
88 0.324634671211 0.737751960754
SURF 0x10
mat 0
refs 4
38 0.22045455873 0.56506216526
73 0.276300191879 0.509375452995
74 0.325911581516 0.559128582478
43 0.280142605305 0.620210587978
SURF 0x10
mat 0
refs 4
43 0.280142605305 0.620210587978
74 0.325911581516 0.559128582478
97 0.367175161839 0.600510120392
89 0.349889993668 0.659079432487
SURF 0x10
mat 0
refs 4
36 0.26838684082 0.0
39 0.340698212385 0.0201469715685
44 0.316147774458 0.0793414711952
40 0.258937984705 0.0691202506423
SURF 0x10
mat 0
refs 4
40 0.258937984705 0.0691202506423
44 0.316147774458 0.0793414711952
65 0.301082521677 0.131805568933
64 0.251299053431 0.124999985099
SURF 0x10
mat 0
refs 4
39 0.340698212385 0.0201469715685
88 0.402369022369 0.0539628379047
87 0.368418842554 0.102325983346
44 0.316147774458 0.0793414711952
SURF 0x10
mat 0
refs 4
44 0.316147774458 0.0793414711952
87 0.368418842554 0.102325983346
93 0.342489302158 0.13746599853
65 0.301082521677 0.131805568933
SURF 0x10
mat 0
refs 4
45 0.502600073814 0.909352779388
49 0.44150942564 0.953379690647
50 0.407677084208 0.89637696743
46 0.455566704273 0.850545585155
SURF 0x10
mat 0
refs 4
46 0.455566704273 0.850545585155
50 0.407677084208 0.89637696743
83 0.368419587612 0.852325975895
82 0.402369588614 0.803963184357
SURF 0x10
mat 0
refs 4
49 0.44150942564 0.953379690647
76 0.377761751413 0.983976006508
75 0.358037143946 0.928275644779
50 0.407677084208 0.89637696743
SURF 0x10
mat 0
refs 4
50 0.407677084208 0.89637696743
75 0.358037143946 0.928275644779
94 0.342490136623 0.887465894222
83 0.368419587612 0.852325975895
SURF 0x10
mat 0
refs 4
45 0.74345356226 0.949013352394
46 0.650647699833 0.850745916367
51 0.744056582451 0.777047157288
47 0.836946129799 0.851399183273
SURF 0x10
mat 0
refs 4
47 0.836946129799 0.851399183273
51 0.744056582451 0.777047157288
60 0.813135445118 0.696763515472
61 0.90722745657 0.745713591576
SURF 0x10
mat 0
refs 4
46 0.650647699833 0.850745916367
82 0.581109285355 0.744570016861
81 0.675542116165 0.696281254292
51 0.744056582451 0.777047157288
SURF 0x10
mat 0
refs 4
51 0.744056582451 0.777047157288
81 0.675542116165 0.696281254292
90 0.744470477104 0.658952236176
60 0.813135445118 0.696763515472
SURF 0x10
mat 0
refs 4
45 0.502600073814 0.159353360534
47 0.441508889198 0.203380391002
52 0.407676458359 0.14637722075
48 0.455566495657 0.100545614958
SURF 0x10
mat 0
refs 4
48 0.455566495657 0.100545614958
52 0.407676458359 0.14637722075
87 0.368418842554 0.102325983346
88 0.402369022369 0.0539628379047
SURF 0x10
mat 0
refs 4
47 0.441508889198 0.203380391002
61 0.377760797739 0.233976602554
62 0.358036339283 0.178275987506
52 0.407676458359 0.14637722075
SURF 0x10
mat 0
refs 4
52 0.407676458359 0.14637722075
62 0.358036339283 0.178275987506
93 0.342489302158 0.13746599853
87 0.368418842554 0.102325983346
SURF 0x10
mat 0
refs 4
45 0.526731610298 0.760522723198
48 0.421470761299 0.757732868195
53 0.432136803865 0.665657401085
49 0.524242341518 0.655254304409
SURF 0x10
mat 0
refs 4
49 0.524242341518 0.655254304409
53 0.432136803865 0.665657401085
77 0.425793468952 0.583392083645
76 0.504538118839 0.55836135149
SURF 0x10
mat 0
refs 4
48 0.421470761299 0.757732868195
88 0.324634671211 0.737751960754
89 0.349889993668 0.659079432487
53 0.432136803865 0.665657401085
SURF 0x10
mat 0
refs 4
53 0.432136803865 0.665657401085
89 0.349889993668 0.659079432487
97 0.367175161839 0.600510120392
77 0.425793468952 0.583392083645
kids 0

View File

@ -1,58 +0,0 @@
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 1 1 1 spec 0 0 0 shi 0 trans 0
OBJECT world
kids 3
OBJECT poly
name "box"
loc 0 -0.3 0
texture "../images/spark.rgb"
numvert 4
0.00353554 0.28162 0.454694
-0.555078 0.602028 -0.00289614
-0.00353554 0.91838 -0.454694
0.555078 0.597972 0.00289614
numsurf 1
SURF 0x20
mat 0
refs 4
0 1 0
1 1 1
2 0 1
3 0 0
kids 0
OBJECT poly
name "box"
loc 0 -0.3 0
texture "../images/spark.rgb"
numvert 4
-0.279308 1.08786 0.000635528
0.279308 0.767456 0.458226
0.279308 0.112136 -0.000635528
-0.279308 0.432544 -0.458226
numsurf 1
SURF 0x20
mat 0
refs 4
0 0 1
1 0 0
2 1 0
3 1 1
kids 0
OBJECT poly
name "box"
loc 0 -0.3 0
texture "../images/spark.rgb"
numvert 4
-0.275772 0.114164 -0.00353168
-0.275772 0.769484 0.45533
0.275772 1.08584 0.00353168
0.275772 0.430516 -0.45533
numsurf 1
SURF 0x20
mat 0
refs 4
0 0 0
1 1 0
2 1 1
3 0 1
kids 0

View File

@ -77,7 +77,7 @@ void Collectable::use()
case COLLECT_ZIPPER: m_owner->handleZipper(); case COLLECT_ZIPPER: m_owner->handleZipper();
break ; break ;
case COLLECT_HOMING: case COLLECT_HOMING:
case COLLECT_SPARK: case COLLECT_BOWLING:
case COLLECT_MISSILE: case COLLECT_MISSILE:
if(m_owner->isPlayerKart()) if(m_owner->isPlayerKart())
sound_manager->playSfx(SOUND_SHOT); sound_manager->playSfx(SOUND_SHOT);

View File

@ -43,7 +43,7 @@ initCollectableType;
initCollectableType ict[]= initCollectableType ict[]=
{ {
{COLLECT_ZIPPER, "zipper.collectable" }, {COLLECT_ZIPPER, "zipper.collectable" },
{COLLECT_SPARK, "spark.projectile" }, {COLLECT_BOWLING, "bowling.projectile" },
{COLLECT_MISSILE, "missile.projectile" }, {COLLECT_MISSILE, "missile.projectile" },
{COLLECT_HOMING, "homingmissile.projectile" }, {COLLECT_HOMING, "homingmissile.projectile" },
{COLLECT_ANVIL, "anvil.collectable" }, {COLLECT_ANVIL, "anvil.collectable" },
@ -122,7 +122,7 @@ void CollectableManager::LoadNode(const lisp::Lisp* lisp, int collectType )
//FIXME: something probably forgets to disable GL_CULL_FACE after enabling it, //FIXME: something probably forgets to disable GL_CULL_FACE after enabling it,
//this is just a quick fix. //this is just a quick fix.
if(collectType == COLLECT_SPARK) m_all_icons[COLLECT_SPARK]->getState()->disable ( GL_CULL_FACE ) ; if(collectType == COLLECT_BOWLING) m_all_icons[COLLECT_BOWLING]->getState()->disable ( GL_CULL_FACE ) ;
if(sModel!="") if(sModel!="")
{ {
@ -139,7 +139,7 @@ void CollectableManager::LoadNode(const lisp::Lisp* lisp, int collectType )
// Load special attributes for certain collectables // Load special attributes for certain collectables
switch (collectType) { switch (collectType) {
case COLLECT_SPARK: case COLLECT_BOWLING:
Spark::init (lisp, m_all_models[collectType]); break; Spark::init (lisp, m_all_models[collectType]); break;
case COLLECT_MISSILE: case COLLECT_MISSILE:
Missile::init(lisp, m_all_models[collectType]); break; Missile::init(lisp, m_all_models[collectType]); break;

View File

@ -31,7 +31,7 @@ class ssgEntity;
// zipper just before them (see collectable::hitRedHerring). // zipper just before them (see collectable::hitRedHerring).
enum CollectableType {COLLECT_NOTHING, enum CollectableType {COLLECT_NOTHING,
COLLECT_MISSILE, COLLECT_HOMING, COLLECT_MISSILE, COLLECT_HOMING,
COLLECT_SPARK, COLLECT_ZIPPER, COLLECT_BOWLING, COLLECT_ZIPPER,
COLLECT_PARACHUTE, COLLECT_ANVIL, COLLECT_PARACHUTE, COLLECT_ANVIL,
COLLECT_MAX}; COLLECT_MAX};

View File

@ -37,7 +37,7 @@ float Flyable::m_st_force_updown[COLLECT_MAX];
btVector3 Flyable::m_st_extend[COLLECT_MAX]; btVector3 Flyable::m_st_extend[COLLECT_MAX];
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
Flyable::Flyable(Kart *kart, CollectableType type) : Moveable(false) Flyable::Flyable(Kart *kart, CollectableType type, float mass) : Moveable(false)
{ {
// get the appropriate data from the static fields // get the appropriate data from the static fields
m_speed = m_st_speed[type]; m_speed = m_st_speed[type];
@ -52,7 +52,7 @@ Flyable::Flyable(Kart *kart, CollectableType type) : Moveable(false)
m_last_radar_beep = -1; m_last_radar_beep = -1;
m_exploded = false; m_exploded = false;
m_shape = NULL; m_shape = NULL;
m_mass = 1.0f; m_mass = mass;
// Add the graphical model // Add the graphical model
ssgTransform *m = getModelTransform(); ssgTransform *m = getModelTransform();
@ -61,29 +61,12 @@ Flyable::Flyable(Kart *kart, CollectableType type) : Moveable(false)
} // Flyable } // Flyable
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
void Flyable::createPhysics(float y_offset, const btVector3 velocity, void Flyable::createPhysics(float y_offset, const btVector3 velocity,
btCollisionShape *shape) btCollisionShape *shape, const bool gravity, const bool rotates)
{ {
// The actual transform is determined as follows: // Get Kart heading direction
// 1) Compute the heading of the kart btTransform trans = m_owner->getKartHeading();
// 2) Compute the pitch of the terrain. This avoids the problem of the
// rocket hitting the floor (e.g. if the kart is braking and therefore
// pointing downwards).
btTransform trans = m_owner->getTrans();
// get heading=trans.getBasis*(0,1,0) ... so save the multiplication: // Apply offset
btVector3 direction(trans.getBasis()[0][1],
trans.getBasis()[1][1],
trans.getBasis()[2][1]);
float heading=atan2(-direction.getX(), direction.getY());
TerrainInfo::update(m_owner->getXYZ());
float pitch = getTerrainPitch(heading);
btMatrix3x3 m;
m.setEulerZYX(pitch, 0.0f, heading);
trans.setBasis(m);
// Apply rotation and offset
btTransform offset_transform; btTransform offset_transform;
offset_transform.setIdentity(); offset_transform.setIdentity();
btVector3 offset=btVector3(0,y_offset,m_average_height); btVector3 offset=btVector3(0,y_offset,m_average_height);
@ -96,8 +79,8 @@ void Flyable::createPhysics(float y_offset, const btVector3 velocity,
m_user_pointer.set(this); m_user_pointer.set(this);
world->getPhysics()->addBody(getBody()); world->getPhysics()->addBody(getBody());
// Simplified rockets: no gravity if(gravity) m_body->setGravity(btVector3(0.0f, 0.0f, -9.8f));
m_body->setGravity(btVector3(0.0f, 0.0f, 0.0f)); else m_body->setGravity(btVector3(0.0f, 0.0f, 0.0f));
// Rotate velocity to point in the right direction // Rotate velocity to point in the right direction
btVector3 v=trans.getBasis()*velocity; btVector3 v=trans.getBasis()*velocity;
@ -105,7 +88,8 @@ void Flyable::createPhysics(float y_offset, const btVector3 velocity,
if(m_mass!=0.0f) // Don't set velocity for kinematic or static objects if(m_mass!=0.0f) // Don't set velocity for kinematic or static objects
{ {
m_body->setLinearVelocity(v); m_body->setLinearVelocity(v);
m_body->setAngularFactor(0.0f); // prevent rotations if(!rotates) m_body->setAngularFactor(0.0f); // prevent rotations
//else m_body->setAngularVelocity( btVector3(5,0,0) );
} }
m_body->setCollisionFlags(btCollisionObject::CF_NO_CONTACT_RESPONSE); m_body->setCollisionFlags(btCollisionObject::CF_NO_CONTACT_RESPONSE);

View File

@ -33,7 +33,7 @@ class Flyable : public Moveable, public TerrainInfo
bool m_exploded; bool m_exploded;
protected: protected:
const Kart* m_owner; // the kart which released this flyable Kart* m_owner; // the kart which released this flyable
btCollisionShape *m_shape; btCollisionShape *m_shape;
float m_max_height; float m_max_height;
float m_min_height; float m_min_height;
@ -57,10 +57,10 @@ protected:
btVector3 *minDelta) const; btVector3 *minDelta) const;
void createPhysics(float y_offset, void createPhysics(float y_offset,
const btVector3 velocity, const btVector3 velocity,
btCollisionShape *shape); btCollisionShape *shape, const bool gravity=false, const bool rotates=false);
public: public:
Flyable (Kart* kart, CollectableType type); Flyable (Kart* kart, CollectableType type, float mass=1.0f);
virtual ~Flyable (); virtual ~Flyable ();
static void init (const lisp::Lisp* lisp, ssgEntity *model, static void init (const lisp::Lisp* lisp, ssgEntity *model,
CollectableType type); CollectableType type);

View File

@ -78,7 +78,7 @@ HelpPageTwo::HelpPageTwo()
widget_manager->breakLine(); widget_manager->breakLine();
widget_manager->addImgWgt(WTOK_IMG3, 10, 12, widget_manager->addImgWgt(WTOK_IMG3, 10, 12,
collectable_manager->getIcon(COLLECT_SPARK)->getState()->getTextureHandle()); collectable_manager->getIcon(COLLECT_BOWLING)->getState()->getTextureHandle());
widget_manager->addTextWgt(WTOK_TXT3, 90, 12, widget_manager->addTextWgt(WTOK_TXT3, 90, 12,
_("Fuzzy blob/Spark - very slow, but bounces from walls")); _("Fuzzy blob/Spark - very slow, but bounces from walls"));

View File

@ -171,7 +171,7 @@ RaceGUI::handle(GameAction ga, int value)
if (race_manager->getNumPlayers() ==1 ) if (race_manager->getNumPlayers() ==1 )
{ {
Kart* kart = world->getPlayerKart(0); Kart* kart = world->getPlayerKart(0);
kart->setCollectable(COLLECT_SPARK, 10000); kart->setCollectable(COLLECT_BOWLING, 10000);
} }
break; break;
case GA_DEBUG_ADD_MISSILE: case GA_DEBUG_ADD_MISSILE:

View File

@ -102,7 +102,28 @@ Kart::Kart (const std::string& kart_name, int position,
reset(); reset();
} // Kart } // Kart
// -----------------------------------------------------------------------------v // -----------------------------------------------------------------------------
btTransform Kart::getKartHeading()
{
btTransform trans = this->getTrans();
// get heading=trans.getBasis*(0,1,0) ... so save the multiplication:
btVector3 direction(trans.getBasis()[0][1],
trans.getBasis()[1][1],
trans.getBasis()[2][1]);
float heading=atan2(-direction.getX(), direction.getY());
TerrainInfo::update(this->getXYZ());
float pitch = getTerrainPitch(heading);
btMatrix3x3 m;
m.setEulerZYX(pitch, 0.0f, heading);
trans.setBasis(m);
return trans;
}
void Kart::createPhysics(ssgEntity *obj) void Kart::createPhysics(ssgEntity *obj)
{ {
// First: Create the chassis of the kart // First: Create the chassis of the kart

View File

@ -153,6 +153,8 @@ public:
void getClosestKart (float *cdist, int *closest); void getClosestKart (float *cdist, int *closest);
void updatePhysics (float dt); void updatePhysics (float dt);
btTransform getKartHeading();
// Functions to access the current kart properties (which might get changed, // Functions to access the current kart properties (which might get changed,
// e.g. mass increase or air_friction increase depending on attachment etc.) // e.g. mass increase or air_friction increase depending on attachment etc.)
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------

View File

@ -23,10 +23,11 @@
#include <plib/ssg.h> #include <plib/ssg.h>
#include "vec3.hpp" #include "vec3.hpp"
#include "material.hpp"
#include "btBulletDynamicsCommon.h" #include "btBulletDynamicsCommon.h"
#include "user_pointer.hpp" #include "user_pointer.hpp"
class Material;
/* Limits of Kart performance */ /* Limits of Kart performance */
#define CRASH_PITCH -45.0f #define CRASH_PITCH -45.0f

View File

@ -129,7 +129,7 @@ Flyable *ProjectileManager::newProjectile(Kart *kart, CollectableType type)
{ {
Flyable *f; Flyable *f;
switch(type) { switch(type) {
case COLLECT_SPARK: f = new Spark(kart); break; case COLLECT_BOWLING: f = new Spark(kart); break;
case COLLECT_HOMING: f = new Homing(kart); break; case COLLECT_HOMING: f = new Homing(kart); break;
case COLLECT_MISSILE: f = new Missile(kart); break; case COLLECT_MISSILE: f = new Missile(kart); break;
default: return NULL; default: return NULL;

View File

@ -23,11 +23,11 @@
#include <vector> #include <vector>
#include <plib/ssg.h> #include <plib/ssg.h>
#include "vec3.hpp" #include "vec3.hpp"
#include "flyable.hpp"
#include "collectable_manager.hpp" #include "collectable_manager.hpp"
class Kart; class Kart;
class Explosion; class Explosion;
class Flyable;
class ProjectileManager class ProjectileManager
{ {

View File

@ -366,7 +366,7 @@ void DefaultRobot::handle_items( const float DELTA, const int STEPS )
} }
break; break;
case COLLECT_SPARK: case COLLECT_BOWLING:
if ( m_time_since_last_shot > 3.0f && m_crashes.m_kart != -1 ) if ( m_time_since_last_shot > 3.0f && m_crashes.m_kart != -1 )
{ {
m_controls.fire = true; m_controls.fire = true;

View File

@ -22,7 +22,7 @@ float Spark::m_st_max_distance; // maximum distance for a spark to be attracte
float Spark::m_st_force_to_target; float Spark::m_st_force_to_target;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
Spark::Spark(Kart *kart) : Flyable(kart, COLLECT_SPARK) Spark::Spark(Kart *kart) : Flyable(kart, COLLECT_BOWLING)
{ {
float y_offset = -0.5f*kart->getKartLength()-2.0f*m_extend.getY(); float y_offset = -0.5f*kart->getKartLength()-2.0f*m_extend.getY();
float speed = -m_speed; float speed = -m_speed;
@ -34,7 +34,7 @@ Spark::Spark(Kart *kart) : Flyable(kart, COLLECT_SPARK)
} }
createPhysics(y_offset, btVector3(0.0f, speed, 0.0f), createPhysics(y_offset, btVector3(0.0f, speed, 0.0f),
new btSphereShape(0.5f*m_extend.getY())); new btSphereShape(0.5f*m_extend.getY()), true /*gravity*/, true /*rotates*/);
// unset no_contact_response flags, so that the spark // unset no_contact_response flags, so that the spark
// will bounce off the track // will bounce off the track
@ -46,7 +46,7 @@ Spark::Spark(Kart *kart) : Flyable(kart, COLLECT_SPARK)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void Spark::init(const lisp::Lisp* lisp, ssgEntity *spark) void Spark::init(const lisp::Lisp* lisp, ssgEntity *spark)
{ {
Flyable::init(lisp, spark, COLLECT_SPARK); Flyable::init(lisp, spark, COLLECT_BOWLING);
m_st_max_distance = 20.0f; m_st_max_distance = 20.0f;
m_st_force_to_target = 10.0f; m_st_force_to_target = 10.0f;
@ -82,7 +82,7 @@ void Spark::update(float dt)
if(vlen<0.8*m_speed*m_speed) if(vlen<0.8*m_speed*m_speed)
{ // spark lost energy (less than 80%), i.e. it's too slow - speed it up: { // spark lost energy (less than 80%), i.e. it's too slow - speed it up:
if(vlen==0.0f) { if(vlen==0.0f) {
v = btVector3(.5f, .5f, .5f); // avoid 0 div. v = btVector3(.5f, .5f, 0.0f); // avoid 0 div.
} }
else else
{ {

View File

@ -19,6 +19,7 @@
#include "stk_config.hpp" #include "stk_config.hpp"
#include "file_manager.hpp" #include "file_manager.hpp"
#include "music_information.hpp"
STKConfig* stk_config=0; STKConfig* stk_config=0;
float STKConfig::UNDEFINED = -99.9f; float STKConfig::UNDEFINED = -99.9f;

View File

@ -21,9 +21,10 @@
#define HEADER_STKCONFIG_H #define HEADER_STKCONFIG_H
#include "kart_properties.hpp" #include "kart_properties.hpp"
#include "music_information.hpp"
#include "lisp/lisp.hpp" #include "lisp/lisp.hpp"
class MusicInformation;
class STKConfig : public KartProperties class STKConfig : public KartProperties
{ {
public: public: