summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Plane.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-08-04 00:31:00 +0200
committeraap <aap@papnet.eu>2019-08-04 00:31:00 +0200
commita3e3527a3b8f260db285c76dc1044baab8a2f773 (patch)
tree17869d4d50729e13497f7769679bdec0fef0a069 /src/vehicles/Plane.cpp
parentMerge pull request #181 from Nick007J/master (diff)
downloadre3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar
re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.gz
re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.bz2
re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.lz
re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.xz
re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.tar.zst
re3-a3e3527a3b8f260db285c76dc1044baab8a2f773.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Plane.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp
index 8e0e313d..775cf572 100644
--- a/src/vehicles/Plane.cpp
+++ b/src/vehicles/Plane.cpp
@@ -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);
}