summaryrefslogtreecommitdiffstats
path: root/src/objects/Object.cpp
diff options
context:
space:
mode:
authorshfil <filip.gawin@zoho.com>2020-04-20 19:50:12 +0200
committerGitHub <noreply@github.com>2020-04-20 19:50:12 +0200
commit7794cca429163429e9a4b216d717002ae1034040 (patch)
tree10f23f0a163b2a7b3011b5570eb9af93010a25a1 /src/objects/Object.cpp
parentupdated librw again (diff)
parentTry to build with mingw (diff)
downloadre3-7794cca429163429e9a4b216d717002ae1034040.tar
re3-7794cca429163429e9a4b216d717002ae1034040.tar.gz
re3-7794cca429163429e9a4b216d717002ae1034040.tar.bz2
re3-7794cca429163429e9a4b216d717002ae1034040.tar.lz
re3-7794cca429163429e9a4b216d717002ae1034040.tar.xz
re3-7794cca429163429e9a4b216d717002ae1034040.tar.zst
re3-7794cca429163429e9a4b216d717002ae1034040.zip
Diffstat (limited to 'src/objects/Object.cpp')
-rw-r--r--src/objects/Object.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp
index d03dd405..c0ce38f8 100644
--- a/src/objects/Object.cpp
+++ b/src/objects/Object.cpp
@@ -214,7 +214,7 @@ CObject::ObjectDamage(float amount)
++nFrameGen;
int32 currentFrame = nFrameGen & 3;
float fRandom = CGeneral::GetRandomNumberInRange(0.01f, 1.0f);
- RwRGBA randomColor = { color.red * fRandom, color.green * fRandom , color.blue, color.alpha };
+ RwRGBA randomColor = { uint8(color.red * fRandom), uint8(color.green * fRandom) , color.blue, color.alpha };
float fSize = CGeneral::GetRandomNumberInRange(0.02f, 0.18f);
int32 nRotationSpeed = CGeneral::GetRandomNumberInRange(-40, 80);
CParticle::AddParticle(PARTICLE_CAR_DEBRIS, vecPos, vecDir, nil, fSize, randomColor, nRotationSpeed, 0, currentFrame, 0);
@@ -237,7 +237,7 @@ CObject::ObjectDamage(float amount)
++nFrameGen;
int32 currentFrame = nFrameGen & 3;
float fRandom = CGeneral::GetRandomNumberInRange(0.5f, 0.5f);
- RwRGBA randomColor = { color.red * fRandom, color.green * fRandom , color.blue * fRandom, color.alpha };
+ RwRGBA randomColor = { uint8(color.red * fRandom), uint8(color.green * fRandom), uint8(color.blue * fRandom), color.alpha };
float fSize = CGeneral::GetRandomNumberInRange(0.02f, 0.18f);
int32 nRotationSpeed = CGeneral::GetRandomNumberInRange(-40, 80);
CParticle::AddParticle(PARTICLE_CAR_DEBRIS, vecPos, vecDir, nil, fSize, randomColor, nRotationSpeed, 0, currentFrame, 0);