diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-21 10:55:39 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-21 10:55:39 +0200 |
commit | 7cc3410846796a7bb0946384c7e22652f2bb60e6 (patch) | |
tree | 0b3d6d0675c44c21c83541f9f9c71e6244c6cf06 /src/objects | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
parent | librw skin pipe (diff) | |
download | re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.gz re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.bz2 re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.lz re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.xz re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.zst re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.zip |
Diffstat (limited to 'src/objects')
-rw-r--r-- | src/objects/Object.cpp | 4 | ||||
-rw-r--r-- | src/objects/ParticleObject.h | 5 |
2 files changed, 5 insertions, 4 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); diff --git a/src/objects/ParticleObject.h b/src/objects/ParticleObject.h index 9e28d272..34a672bb 100644 --- a/src/objects/ParticleObject.h +++ b/src/objects/ParticleObject.h @@ -1,6 +1,8 @@ #pragma once -#include "Placeable.h" + #include "AudioManager.h" +#include "ParticleType.h" +#include "Placeable.h" #define MAX_PARTICLEOBJECTS 100 #define MAX_AUDIOHYDRANTS 8 @@ -37,7 +39,6 @@ enum eParticleObjectState POBJECTSTATE_FREE, }; -enum tParticleType; class CParticle; class CParticleObject : public CPlaceable |