summaryrefslogtreecommitdiffstats
path: root/src/render/Particle.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-08-17 14:46:19 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-08-17 14:46:19 +0200
commit13233ccaed3fd7aad37c99326beee3ddfaf437f3 (patch)
tree82f5205ffe573d41060ec29646e821841f651837 /src/render/Particle.cpp
parentmore CCarCtrl (diff)
parentMerge pull request #193 from erorcun/erorcun (diff)
downloadre3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.gz
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.bz2
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.lz
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.xz
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.tar.zst
re3-13233ccaed3fd7aad37c99326beee3ddfaf437f3.zip
Diffstat (limited to '')
-rw-r--r--src/render/Particle.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp
index 23e23f93..e2db55c7 100644
--- a/src/render/Particle.cpp
+++ b/src/render/Particle.cpp
@@ -1261,7 +1261,7 @@ void CParticle::Update()
nil,
particle->m_fSize, color, particle->m_nRotationStep, 0, 0, 0);
- PlayOneShotScriptObject(_SOUND_BULLET_SHELL_HIT_GROUND_1, particle->m_vecPosition);
+ PlayOneShotScriptObject(_SCRSOUND_BULLET_SHELL_HIT_GROUND_1, particle->m_vecPosition);
}
break;
@@ -1280,7 +1280,7 @@ void CParticle::Update()
nil,
particle->m_fSize, color, 0, 0, 0, 0);
- PlayOneShotScriptObject(_SOUND_BULLET_SHELL_HIT_GROUND_2, particle->m_vecPosition);
+ PlayOneShotScriptObject(_SCRSOUND_BULLET_SHELL_HIT_GROUND_2, particle->m_vecPosition);
}
break;
@@ -1410,13 +1410,11 @@ void CParticle::Update()
if ( particle->m_fCurrentZRadius != 0.0f )
{
- int32 nSinCosIndex = particle->m_nCurrentZRotation % (SIN_COS_TABLE_SIZE - 1);
+ int32 nRot = particle->m_nCurrentZRotation % (SIN_COS_TABLE_SIZE - 1);
- float fX = (m_CosTable[nSinCosIndex] - m_SinTable[nSinCosIndex])
- * particle->m_fCurrentZRadius;
+ float fX = (Cos(nRot) - Sin(nRot)) * particle->m_fCurrentZRadius;
- float fY = (m_SinTable[nSinCosIndex] + m_CosTable[nSinCosIndex])
- * particle->m_fCurrentZRadius;
+ float fY = (Sin(nRot) + Cos(nRot)) * particle->m_fCurrentZRadius;
moveStep -= particle->m_vecParticleMovementOffset;