diff options
author | majestic <majesticcoding@gmail.com> | 2020-10-09 04:22:50 +0200 |
---|---|---|
committer | majestic <majesticcoding@gmail.com> | 2020-10-09 04:28:31 +0200 |
commit | c091a5c11a826665f083ee7e73635f03aa4b550d (patch) | |
tree | 21f0d517e5210b1bc28d39ebfe67c2b0bcbb2772 /src/render/Particle.cpp | |
parent | Merge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff) | |
parent | Fix POSIX streaming (diff) | |
download | re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.gz re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.bz2 re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.lz re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.xz re3-c091a5c11a826665f083ee7e73635f03aa4b550d.tar.zst re3-c091a5c11a826665f083ee7e73635f03aa4b550d.zip |
Diffstat (limited to 'src/render/Particle.cpp')
-rw-r--r-- | src/render/Particle.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp index 2f0c3809..6a42bc4d 100644 --- a/src/render/Particle.cpp +++ b/src/render/Particle.cpp @@ -1220,8 +1220,11 @@ void CParticle::Update() if ( psystem->m_Type == PARTICLE_HEATHAZE || psystem->m_Type == PARTICLE_HEATHAZE_IN_DIST ) { +#ifdef FIX_BUGS + int32 nSinCosIndex = (int32(DEGTORAD((float)particle->m_nRotation) * float(SIN_COS_TABLE_SIZE) / TWOPI) + SIN_COS_TABLE_SIZE) % SIN_COS_TABLE_SIZE; +#else int32 nSinCosIndex = int32(DEGTORAD((float)particle->m_nRotation) * float(SIN_COS_TABLE_SIZE) / TWOPI) % SIN_COS_TABLE_SIZE; - +#endif vecMoveStep.x = Sin(nSinCosIndex); vecMoveStep.y = Sin(nSinCosIndex); @@ -1233,8 +1236,11 @@ void CParticle::Update() if ( psystem->m_Type == PARTICLE_BEASTIE ) { +#ifdef FIX_BUGS + int32 nSinCosIndex = (int32(DEGTORAD((float)particle->m_nRotation) * float(SIN_COS_TABLE_SIZE) / TWOPI) + SIN_COS_TABLE_SIZE) % SIN_COS_TABLE_SIZE; +#else int32 nSinCosIndex = int32(DEGTORAD((float)particle->m_nRotation) * float(SIN_COS_TABLE_SIZE) / TWOPI) % SIN_COS_TABLE_SIZE; - +#endif particle->m_vecVelocity.x = 0.50f * Cos(nSinCosIndex); particle->m_vecVelocity.y = Cos(nSinCosIndex); particle->m_vecVelocity.z = 0.25f * Sin(nSinCosIndex); @@ -1750,7 +1756,11 @@ void CParticle::Update() } if ( particle->m_nRotationStep != 0 ) +#ifdef FIX_BUGS + particle->m_nRotation = CGeneral::LimitAngle(particle->m_nRotation + particle->m_nRotationStep); +#else particle->m_nRotation += particle->m_nRotationStep; +#endif if ( particle->m_fCurrentZRadius != 0.0f ) { @@ -2403,7 +2413,7 @@ void CParticle::HandleShootableBirdsStuff(CEntity *entity, CVector const&camPos) { float fHeadingRad = entity->GetForward().Heading(); float fHeading = RADTODEG(fHeadingRad); - float fBirdAngle = Cos(DEGTORAD(1.5f)); + float fBirdAngle = ::Cos(DEGTORAD(1.5f)); tParticleSystemData *psystem = &mod_ParticleSystemManager.m_aParticles[PARTICLE_BIRD_FRONT]; CParticle *particle = psystem->m_pParticles; |