diff options
author | Dmitry Kostenko <codeforsmile@gmail.com> | 2022-07-13 22:45:05 +0200 |
---|---|---|
committer | Dmitry Kostenko <codeforsmile@gmail.com> | 2022-07-13 22:45:05 +0200 |
commit | 6df69f9b5bea5b438498bbae7e9873bb99434439 (patch) | |
tree | 6ab985c2b01572ff2b83a263bbcee498b1abf9a3 /src/client | |
parent | 20bd6bdb685af11548c35d3a48e5aa33f4222397 (diff) | |
download | minetest-6df69f9b5bea5b438498bbae7e9873bb99434439.tar.gz minetest-6df69f9b5bea5b438498bbae7e9873bb99434439.tar.bz2 minetest-6df69f9b5bea5b438498bbae7e9873bb99434439.zip |
Make BlendMode::alpha the fallback for unknown future blend modes
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/particles.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/particles.cpp b/src/client/particles.cpp index a1de1bb98..818cdc8cc 100644 --- a/src/client/particles.cpp +++ b/src/client/particles.cpp @@ -63,12 +63,6 @@ Particle::Particle( : ParticleParamTypes::BlendMode::alpha; switch (blendmode) { - case ParticleParamTypes::BlendMode::alpha: - bfsrc = video::EBF_SRC_ALPHA; - bfdst = video::EBF_ONE_MINUS_SRC_ALPHA; - blendop = video::EBO_ADD; - break; - case ParticleParamTypes::BlendMode::add: bfsrc = video::EBF_SRC_ALPHA; bfdst = video::EBF_DST_ALPHA; @@ -87,7 +81,11 @@ Particle::Particle( blendop = video::EBO_ADD; break; - default: assert(false); + default: // includes ParticleParamTypes::BlendMode::alpha + bfsrc = video::EBF_SRC_ALPHA; + bfdst = video::EBF_ONE_MINUS_SRC_ALPHA; + blendop = video::EBO_ADD; + break; } // Texture |