summaryrefslogtreecommitdiffstats
path: root/src/render/Particle.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2019-07-24 19:59:16 +0200
committerGitHub <noreply@github.com>2019-07-24 19:59:16 +0200
commitb79f77634dbb33627c390243d7cf2e7611d35d0a (patch)
treed836f70678f2ce7b5d86a6745f34b45232ff71d0 /src/render/Particle.cpp
parentimplemented cBuoyancy (diff)
parentupdate (diff)
downloadre3-b79f77634dbb33627c390243d7cf2e7611d35d0a.tar
re3-b79f77634dbb33627c390243d7cf2e7611d35d0a.tar.gz
re3-b79f77634dbb33627c390243d7cf2e7611d35d0a.tar.bz2
re3-b79f77634dbb33627c390243d7cf2e7611d35d0a.tar.lz
re3-b79f77634dbb33627c390243d7cf2e7611d35d0a.tar.xz
re3-b79f77634dbb33627c390243d7cf2e7611d35d0a.tar.zst
re3-b79f77634dbb33627c390243d7cf2e7611d35d0a.zip
Diffstat (limited to 'src/render/Particle.cpp')
-rw-r--r--src/render/Particle.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index 63545dff..23e23f93 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -226,6 +226,10 @@ int32 Randomizer;
int32 nParticleCreationInterval = 1;
float fParticleScaleLimit = 0.5f;
+SETTWEAKPATH("Particle");
+TWEAKINT32(nParticleCreationInterval, 0, 5, 1);
+TWEAKFLOAT(fParticleScaleLimit, 0.0f, 1.0f, 0.1f);
+TWEAKFUNC(CParticle::ReloadConfig);
void CParticle::ReloadConfig()
{
@@ -1143,7 +1147,7 @@ void CParticle::Update()
{
bRemoveParticle = true;
- int32 randVal = int32(CGeneral::GetRandomNumber());
+ int32 randVal = CGeneral::GetRandomNumber();
if ( randVal & 1 )
{
@@ -1188,23 +1192,19 @@ void CParticle::Update()
if ( randVal == 5 )
{
- int32 randTime = int32(CGeneral::GetRandomNumber());
-
CShadows::AddPermanentShadow(1, gpBloodPoolTex, &vecPosn,
0.1f, 0.0f, 0.0f, -0.1f,
255,
255, 0, 0,
- 4.0f, (randTime & 0xFFF) + 2000, 1.0f);
+ 4.0f, (CGeneral::GetRandomNumber() & 4095) + 2000, 1.0f);
}
else if ( randVal == 2 )
{
- int32 randTime = int32(CGeneral::GetRandomNumber());
-
CShadows::AddPermanentShadow(1, gpBloodPoolTex, &vecPosn,
0.2f, 0.0f, 0.0f, -0.2f,
255,
255, 0, 0,
- 4.0f, (randTime & 0xFFF) + 8000, 1.0f);
+ 4.0f, (CGeneral::GetRandomNumber() & 4095) + 8000, 1.0f);
}
continue;
}
@@ -1600,7 +1600,7 @@ void CParticle::Render()
fTrailLength = fDist;
//Float fRot = Atan2( vecDist.x / fDist, Sqrt(1.0f - vecDist.x / fDist * (vecDist.x / fDist)) );
- float fRot = asinf(vecDist.x / fDist);
+ float fRot = Asin(vecDist.x / fDist);
fRotation = fRot;
@@ -1652,7 +1652,7 @@ void CParticle::Render()
fTrailLength = fDist;
//Float fRot = Atan2(vecDist.x / fDist, Sqrt(1.0f - vecDist.x / fDist * (vecDist.x / fDist)));
- float fRot = asinf(vecDist.x / fDist);
+ float fRot = Asin(vecDist.x / fDist);
fRotation = fRot;