From 224727c14d315bcd053ade72017a2f1232ad6a1a Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 6 May 2020 16:56:59 +0200 Subject: got rid of superfluous enum --- src/objects/Object.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/objects/Object.cpp') diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index fb1ab1a7..de883b89 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -174,12 +174,12 @@ CObject::ObjectDamage(float amount) const float fDirectionZ = 0.0002f * amount; switch (m_nCollisionDamageEffect) { - case COLDAMAGE_EFFECT_CHANGE_MODEL: + case COLLRESPONSE_CHANGE_MODEL: bRenderDamaged = true; break; - case COLDAMAGE_EFFECT_SPLIT_MODEL: + case COLLRESPONSE_SPLIT_MODEL: break; - case COLDAMAGE_EFFECT_SMASH_COMPLETELY: + case COLLRESPONSE_SMASH_COMPLETELY: bIsVisible = false; bUsesCollision = false; bIsStatic = true; @@ -187,7 +187,7 @@ CObject::ObjectDamage(float amount) SetMoveSpeed(0.0f, 0.0f, 0.0f); SetTurnSpeed(0.0f, 0.0f, 0.0f); break; - case COLDAMAGE_EFFECT_CHANGE_THEN_SMASH: + case COLLRESPONSE_CHANGE_THEN_SMASH: if (!bRenderDamaged) { bRenderDamaged = true; } @@ -200,7 +200,7 @@ CObject::ObjectDamage(float amount) SetTurnSpeed(0.0f, 0.0f, 0.0f); } break; - case COLDAMAGE_EFFECT_SMASH_CARDBOX_COMPLETELY: { + case COLLRESPONSE_SMASH_CARDBOARD_COMPLETELY: { bIsVisible = false; bUsesCollision = false; bIsStatic = true; @@ -223,7 +223,7 @@ CObject::ObjectDamage(float amount) PlayOneShotScriptObject(_SCRSOUND_CARDBOARD_BOX_SMASH, vecPos); break; } - case COLDAMAGE_EFFECT_SMASH_WOODENBOX_COMPLETELY: { + case COLLRESPONSE_SMASH_WOODENBOX_COMPLETELY: { bIsVisible = false; bUsesCollision = false; bIsStatic = true; @@ -246,7 +246,7 @@ CObject::ObjectDamage(float amount) PlayOneShotScriptObject(_SCRSOUND_WOODEN_BOX_SMASH, vecPos); break; } - case COLDAMAGE_EFFECT_SMASH_TRAFFICCONE_COMPLETELY: { + case COLLRESPONSE_SMASH_TRAFFICCONE_COMPLETELY: { bIsVisible = false; bUsesCollision = false; bIsStatic = true; @@ -271,7 +271,7 @@ CObject::ObjectDamage(float amount) PlayOneShotScriptObject(_SCRSOUND_TYRE_BUMP, vecPos); break; } - case COLDAMAGE_EFFECT_SMASH_BARPOST_COMPLETELY: { + case COLLRESPONSE_SMASH_BARPOST_COMPLETELY: { bIsVisible = false; bUsesCollision = false; bIsStatic = true; -- cgit v1.2.3 From c11912a8ecf13bb664d8ee3dba1ac55eb363176f Mon Sep 17 00:00:00 2001 From: aap Date: Wed, 6 May 2020 17:13:46 +0200 Subject: sorted out object collision enums --- src/objects/Object.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/objects/Object.cpp') diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index de883b89..a5896975 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -174,12 +174,12 @@ CObject::ObjectDamage(float amount) const float fDirectionZ = 0.0002f * amount; switch (m_nCollisionDamageEffect) { - case COLLRESPONSE_CHANGE_MODEL: + case DAMAGE_EFFECT_CHANGE_MODEL: bRenderDamaged = true; break; - case COLLRESPONSE_SPLIT_MODEL: + case DAMAGE_EFFECT_SPLIT_MODEL: break; - case COLLRESPONSE_SMASH_COMPLETELY: + case DAMAGE_EFFECT_SMASH_COMPLETELY: bIsVisible = false; bUsesCollision = false; bIsStatic = true; @@ -187,7 +187,7 @@ CObject::ObjectDamage(float amount) SetMoveSpeed(0.0f, 0.0f, 0.0f); SetTurnSpeed(0.0f, 0.0f, 0.0f); break; - case COLLRESPONSE_CHANGE_THEN_SMASH: + case DAMAGE_EFFECT_CHANGE_THEN_SMASH: if (!bRenderDamaged) { bRenderDamaged = true; } @@ -200,7 +200,7 @@ CObject::ObjectDamage(float amount) SetTurnSpeed(0.0f, 0.0f, 0.0f); } break; - case COLLRESPONSE_SMASH_CARDBOARD_COMPLETELY: { + case DAMAGE_EFFECT_SMASH_CARDBOARD_COMPLETELY: { bIsVisible = false; bUsesCollision = false; bIsStatic = true; @@ -223,7 +223,7 @@ CObject::ObjectDamage(float amount) PlayOneShotScriptObject(_SCRSOUND_CARDBOARD_BOX_SMASH, vecPos); break; } - case COLLRESPONSE_SMASH_WOODENBOX_COMPLETELY: { + case DAMAGE_EFFECT_SMASH_WOODENBOX_COMPLETELY: { bIsVisible = false; bUsesCollision = false; bIsStatic = true; @@ -246,7 +246,7 @@ CObject::ObjectDamage(float amount) PlayOneShotScriptObject(_SCRSOUND_WOODEN_BOX_SMASH, vecPos); break; } - case COLLRESPONSE_SMASH_TRAFFICCONE_COMPLETELY: { + case DAMAGE_EFFECT_SMASH_TRAFFICCONE_COMPLETELY: { bIsVisible = false; bUsesCollision = false; bIsStatic = true; @@ -271,7 +271,7 @@ CObject::ObjectDamage(float amount) PlayOneShotScriptObject(_SCRSOUND_TYRE_BUMP, vecPos); break; } - case COLLRESPONSE_SMASH_BARPOST_COMPLETELY: { + case DAMAGE_EFFECT_SMASH_BARPOST_COMPLETELY: { bIsVisible = false; bUsesCollision = false; bIsStatic = true; -- cgit v1.2.3