diff options
author | aap <aap@papnet.eu> | 2020-05-06 17:13:46 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-06 17:13:46 +0200 |
commit | a2b89c6a18d43910e9626c23793a4935e2c0d08d (patch) | |
tree | b22ba4ad99611ddf75da0d13a6007be422ec729e /src/objects | |
parent | got rid of superfluous enum (diff) | |
download | re3-a2b89c6a18d43910e9626c23793a4935e2c0d08d.tar re3-a2b89c6a18d43910e9626c23793a4935e2c0d08d.tar.gz re3-a2b89c6a18d43910e9626c23793a4935e2c0d08d.tar.bz2 re3-a2b89c6a18d43910e9626c23793a4935e2c0d08d.tar.lz re3-a2b89c6a18d43910e9626c23793a4935e2c0d08d.tar.xz re3-a2b89c6a18d43910e9626c23793a4935e2c0d08d.tar.zst re3-a2b89c6a18d43910e9626c23793a4935e2c0d08d.zip |
Diffstat (limited to 'src/objects')
-rw-r--r-- | src/objects/Object.cpp | 16 | ||||
-rw-r--r-- | src/objects/Object.h | 29 |
2 files changed, 27 insertions, 18 deletions
diff --git a/src/objects/Object.cpp b/src/objects/Object.cpp index a450ca56..cd2cd688 100644 --- a/src/objects/Object.cpp +++ b/src/objects/Object.cpp @@ -173,12 +173,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; @@ -186,7 +186,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; } @@ -199,7 +199,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; @@ -222,7 +222,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; @@ -245,7 +245,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; @@ -270,7 +270,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; diff --git a/src/objects/Object.h b/src/objects/Object.h index dfaa60db..80b9015c 100644 --- a/src/objects/Object.h +++ b/src/objects/Object.h @@ -10,19 +10,28 @@ enum { CUTSCENE_OBJECT = 4, }; -enum { +enum CollisionSpecialResponseCase +{ COLLRESPONSE_NONE, - COLLRESPONSE_CHANGE_MODEL, - COLLRESPONSE_SPLIT_MODEL, - COLLRESPONSE_SMASH_COMPLETELY, - COLLRESPONSE_CHANGE_THEN_SMASH, - COLLRESPONSE_UNKNOWN5, + COLLRESPONSE_LAMPOST, + COLLRESPONSE_SMALLBOX, + COLLRESPONSE_BIGBOX, + COLLRESPONSE_FENCEPART, + COLLRESPONSE_UNKNOWN5 +}; - COLLRESPONSE_SMASH_CARDBOARD_COMPLETELY = 50, - COLLRESPONSE_SMASH_WOODENBOX_COMPLETELY = 60, - COLLRESPONSE_SMASH_TRAFFICCONE_COMPLETELY = 70, - COLLRESPONSE_SMASH_BARPOST_COMPLETELY = 80, +enum CollisionDamageEffect +{ + DAMAGE_EFFECT_NONE, + DAMAGE_EFFECT_CHANGE_MODEL, + DAMAGE_EFFECT_SPLIT_MODEL, + DAMAGE_EFFECT_SMASH_COMPLETELY, + DAMAGE_EFFECT_CHANGE_THEN_SMASH, + DAMAGE_EFFECT_SMASH_CARDBOARD_COMPLETELY = 50, + DAMAGE_EFFECT_SMASH_WOODENBOX_COMPLETELY = 60, + DAMAGE_EFFECT_SMASH_TRAFFICCONE_COMPLETELY = 70, + DAMAGE_EFFECT_SMASH_BARPOST_COMPLETELY = 80 }; class CVehicle; |