summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-10-08 20:46:00 +0200
committereray orçunus <erayorcunus@gmail.com>2020-10-08 21:41:51 +0200
commit73a3e9d5bb3a12812926b487a17c36dd4381ebc2 (patch)
tree598f7ad80dceb628edd3c6c7943f1b54a3374208
parentMerge pull request #750 from erorcun/miami (diff)
downloadre3-73a3e9d5bb3a12812926b487a17c36dd4381ebc2.tar
re3-73a3e9d5bb3a12812926b487a17c36dd4381ebc2.tar.gz
re3-73a3e9d5bb3a12812926b487a17c36dd4381ebc2.tar.bz2
re3-73a3e9d5bb3a12812926b487a17c36dd4381ebc2.tar.lz
re3-73a3e9d5bb3a12812926b487a17c36dd4381ebc2.tar.xz
re3-73a3e9d5bb3a12812926b487a17c36dd4381ebc2.tar.zst
re3-73a3e9d5bb3a12812926b487a17c36dd4381ebc2.zip
Diffstat (limited to '')
-rw-r--r--src/core/Pad.cpp6
-rw-r--r--src/render/Occlusion.cpp8
-rw-r--r--src/render/Particle.cpp16
3 files changed, 23 insertions, 7 deletions
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index aa6e5cc8..b723eb1d 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -3209,7 +3209,7 @@ int16 CPad::SniperModeLookLeftRight(void)
if ( Abs(axis) > Abs(dpad) ) {
if ( Abs(axis) > 35.0f ) {
- return (axis > 0.f ? axis - 35.f : axis + 35.f) * 1.3763441f;
+ return (axis > 0.f ? axis - 35.f : axis + 35.f) * (128.f / (128 - 35));
} else {
return 0;
}
@@ -3231,7 +3231,7 @@ int16 CPad::SniperModeLookUpDown(void)
if ( Abs(axis) > Abs(dpad) ) {
if ( Abs(axis) > 35.0f ) {
- return (axis > 0.f ? axis - 35.f : axis + 35.f) * 1.3763441f;
+ return (axis > 0.f ? axis - 35.f : axis + 35.f) * (128.f / (128 - 35));
} else {
return 0;
}
@@ -3573,4 +3573,4 @@ void CPad::FixPadsAfterSave(void)
bObsoleteControllerMessage = false;
GetPad(0)->Phase = 0;
}
-} \ No newline at end of file
+}
diff --git a/src/render/Occlusion.cpp b/src/render/Occlusion.cpp
index 1ea9da50..79ce0461 100644
--- a/src/render/Occlusion.cpp
+++ b/src/render/Occlusion.cpp
@@ -366,6 +366,12 @@ COcclusion::ProcessBeforeRendering(void)
}
NumActiveOccluders--;
i--;
+ // Taken from Mobile!
+#ifdef FIX_BUGS
+ if (i == -1) {
+ i = 0;
+ }
+#endif
}
}
}
@@ -481,4 +487,4 @@ void COcclusion::Render() {
DefinedState();
}
-#endif \ No newline at end of file
+#endif
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;