diff options
author | saml1er <danishroar@gmail.com> | 2020-04-11 19:31:32 +0200 |
---|---|---|
committer | saml1er <danishroar@gmail.com> | 2020-04-11 19:31:32 +0200 |
commit | ff16ba7801a3532e8bb982238f3d3124f6154e55 (patch) | |
tree | 6a91143eb2d88eb305c0a5601dc37f2a651474eb | |
parent | Addendum to previous commit (diff) | |
download | re3-ff16ba7801a3532e8bb982238f3d3124f6154e55.tar re3-ff16ba7801a3532e8bb982238f3d3124f6154e55.tar.gz re3-ff16ba7801a3532e8bb982238f3d3124f6154e55.tar.bz2 re3-ff16ba7801a3532e8bb982238f3d3124f6154e55.tar.lz re3-ff16ba7801a3532e8bb982238f3d3124f6154e55.tar.xz re3-ff16ba7801a3532e8bb982238f3d3124f6154e55.tar.zst re3-ff16ba7801a3532e8bb982238f3d3124f6154e55.zip |
Diffstat (limited to '')
-rw-r--r-- | src/objects/Object.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index ca0ebf86..867624c7 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -98,7 +98,7 @@ CObject::ProcessControl(void) m_vecTurnSpeed *= fTimeStep; } if ((m_modelIndex == MI_EXPLODINGBARREL || m_modelIndex == MI_PETROLPUMP) && bHasBeenDamaged && bIsVisible - && CGeneral::GetRandomNumberInRange(0, 31) == 10) { + && (CGeneral::GetRandomNumber() & 0x1F) == 10) { bExplosionProof = true; bIsVisible = false; bUsesCollision = false; @@ -183,8 +183,8 @@ CObject::ObjectDamage(float amount) bUsesCollision = false; bIsStatic = true; bExplosionProof = true; - m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); - m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); + SetMoveSpeed(0.0f, 0.0f, 0.0f); + SetTurnSpeed(0.0f, 0.0f, 0.0f); break; case COLDAMAGE_EFFECT_CHANGE_THEN_SMASH: if (!bRenderDamaged) { @@ -195,8 +195,8 @@ CObject::ObjectDamage(float amount) bUsesCollision = false; bIsStatic = true; bExplosionProof = true; - m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); - m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); + SetMoveSpeed(0.0f, 0.0f, 0.0f); + SetTurnSpeed(0.0f, 0.0f, 0.0f); } break; case COLDAMAGE_EFFECT_SMASH_CARDBOX_COMPLETELY: { @@ -204,8 +204,8 @@ CObject::ObjectDamage(float amount) bUsesCollision = false; bIsStatic = true; bExplosionProof = true; - m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); - m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); + SetMoveSpeed(0.0f, 0.0f, 0.0f); + SetTurnSpeed(0.0f, 0.0f, 0.0f); const RwRGBA color = { 96, 48, 0, 255 }; for (int32 i = 0; i < 25; i++) { CVector vecDir(CGeneral::GetRandomNumberInRange(-0.35f, 0.7f), @@ -227,8 +227,8 @@ CObject::ObjectDamage(float amount) bUsesCollision = false; bIsStatic = true; bExplosionProof = true; - m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); - m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); + SetMoveSpeed(0.0f, 0.0f, 0.0f); + SetTurnSpeed(0.0f, 0.0f, 0.0f); const RwRGBA color = { 128, 128, 128, 255 }; for (int32 i = 0; i < 45; i++) { CVector vecDir(CGeneral::GetRandomNumberInRange(-0.35f, 0.7f), @@ -250,8 +250,8 @@ CObject::ObjectDamage(float amount) bUsesCollision = false; bIsStatic = true; bExplosionProof = true; - m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); - m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); + SetMoveSpeed(0.0f, 0.0f, 0.0f); + SetTurnSpeed(0.0f, 0.0f, 0.0f); const RwRGBA color1 = { 200, 0, 0, 255 }; const RwRGBA color2 = { 200, 200, 200, 255 }; for (int32 i = 0; i < 10; i++) { @@ -275,8 +275,8 @@ CObject::ObjectDamage(float amount) bUsesCollision = false; bIsStatic = true; bExplosionProof = true; - m_vecMoveSpeed = CVector(0.0f, 0.0f, 0.0f); - m_vecTurnSpeed = CVector(0.0f, 0.0f, 0.0f); + SetMoveSpeed(0.0f, 0.0f, 0.0f); + SetTurnSpeed(0.0f, 0.0f, 0.0f); const RwRGBA color1 = { 200, 0, 0, 255 }; const RwRGBA color2 = { 200, 200, 200, 255 }; for (int32 i = 0; i < 32; i++) { |