implemented CHeli

This commit is contained in:
aap
2019-08-04 00:31:00 +02:00
parent 3b9b0646b8
commit a3e3527a3b
15 changed files with 1187 additions and 52 deletions

View File

@ -137,15 +137,16 @@ CPlane::ProcessControl(void)
colors[6] = CRGBA(0, 0, 0, 255);
colors[7] = CRGBA(224, 230, 238, 255);
CVector dir;
for(i = 0; i < 40; i++){
int rotSpeed = CGeneral::GetRandomNumberInRange(30.0f, 20.0f);
dir.x = CGeneral::GetRandomNumberInRange(-2.0f, 2.0f);
dir.y = CGeneral::GetRandomNumberInRange(-2.0f, 2.0f);
dir.z = CGeneral::GetRandomNumberInRange(0.0f, 2.0f);
int rotSpeed = CGeneral::GetRandomNumberInRange(10, 30);
if(CGeneral::GetRandomNumber() & 1)
rotSpeed = -rotSpeed;
int f = ++nFrameGen & 3;
CParticle::AddParticle(PARTICLE_HELI_DEBRIS, GetMatrix() * CVector(0.0f, 0.0f, 0.0f),
CVector(CGeneral::GetRandomNumberInRange(-2.0f, 2.0f),
CGeneral::GetRandomNumberInRange(-2.0f, 2.0f),
CGeneral::GetRandomNumberInRange(0.0f, 2.0f)),
CParticle::AddParticle(PARTICLE_HELI_DEBRIS, GetMatrix() * CVector(0.0f, 0.0f, 0.0f), dir,
nil, CGeneral::GetRandomNumberInRange(0.1f, 1.0f),
colors[nFrameGen], rotSpeed, 0, f, 0);
}