home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Revista CD Expert 51
/
PCGamer51_17Demos.iso
/
games
/
colobotdemo
/
colobotdemo10e.exe
/
script
/
waspe1.txt
< prev
next >
Wrap
Text File
|
2001-06-10
|
556b
|
37 lines
extern void object::GuΩpes()
{
float p;// puissance max des moteurs
float r;// nombre alΘatoire
point c;// centre de la zone permise
c.x = 0;
c.y = 0;
c.z = 0;
p = 1;
jet( rand()*4 + 1);
while (true)
{
if (distance(position, c) > 275)
{
if (direction(c) > 0) motor(0.7*p, p); else motor(p, 0.7*p);
while (abs(direction(c)) > 30) wait(1);
}
motor(p,p);
r = rand();
if (r < 0.4)
{
motor(p, p-rand()*0.8);
}
if (r > 0.6)
{
motor(p-rand()*0.8, p);
}
if (r <= 0.7 and r >= 0.3) jet(rand()*4 + 1);
wait(1);
}
}