summaryrefslogtreecommitdiffstats
path: root/src/render/SpecialFX.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-02-22 13:53:41 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-02-22 13:53:41 +0100
commita122d558a26b41041276ebf6580167d7675b7592 (patch)
tree16396b22fb0bf6ba3d9891dc1d61d2291fcdddfd /src/render/SpecialFX.cpp
parentmerge (diff)
downloadre3-a122d558a26b41041276ebf6580167d7675b7592.tar
re3-a122d558a26b41041276ebf6580167d7675b7592.tar.gz
re3-a122d558a26b41041276ebf6580167d7675b7592.tar.bz2
re3-a122d558a26b41041276ebf6580167d7675b7592.tar.lz
re3-a122d558a26b41041276ebf6580167d7675b7592.tar.xz
re3-a122d558a26b41041276ebf6580167d7675b7592.tar.zst
re3-a122d558a26b41041276ebf6580167d7675b7592.zip
Diffstat (limited to 'src/render/SpecialFX.cpp')
-rw-r--r--src/render/SpecialFX.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/render/SpecialFX.cpp b/src/render/SpecialFX.cpp
index e52222a2..76abcd5b 100644
--- a/src/render/SpecialFX.cpp
+++ b/src/render/SpecialFX.cpp
@@ -389,7 +389,8 @@ CMoneyMessages::RegisterOne(CVector vecPos, const char *pText, uint8 bRed, uint8
CRGBA FoamColour(255, 255, 255, 255);
unsigned int CSpecialParticleStuff::BoatFromStart;
-void CSpecialParticleStuff::CreateFoamAroundObject(CMatrix* pMatrix, float innerFw, float innerRg, float innerUp, int32 particles)
+void
+CSpecialParticleStuff::CreateFoamAroundObject(CMatrix* pMatrix, float innerFw, float innerRg, float innerUp, int32 particles)
{
float outerFw = innerFw + 5.0f;
float outerRg = innerRg + 5.0f;
@@ -397,8 +398,8 @@ void CSpecialParticleStuff::CreateFoamAroundObject(CMatrix* pMatrix, float inner
for (int attempts = 0; particles > 0 && attempts < 1000; attempts++) {
CVector pos;
int rnd = CGeneral::GetRandomNumber();
- pos.x = (int8)(rnd - 128) / 110.0f;
- pos.y = (int8)((rnd >> 8) - 128) / 110.0f;
+ pos.x = (int8)(rnd - 128) * innerFw / 110.0f;
+ pos.y = (int8)((rnd >> 8) - 128) * innerFw / 110.0f;
pos.z = 0.0f;
if (DotProduct2D(pos, TheCamera.GetForward()) >= 0)
continue;
@@ -421,12 +422,14 @@ void CSpecialParticleStuff::CreateFoamAroundObject(CMatrix* pMatrix, float inner
}
}
-void CSpecialParticleStuff::StartBoatFoamAnimation()
+void
+CSpecialParticleStuff::StartBoatFoamAnimation()
{
BoatFromStart = CTimer::GetTimeInMilliseconds();
}
-void CSpecialParticleStuff::UpdateBoatFoamAnimation(CMatrix* pMatrix)
+void
+CSpecialParticleStuff::UpdateBoatFoamAnimation(CMatrix* pMatrix)
{
static int32 FrameInAnimation = 0;
static float X, Y, Z, dX, dY, dZ;