Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuho Vepsalainen <bebraw@gmail.com>2007-11-16 15:23:00 +0300
committerJuho Vepsalainen <bebraw@gmail.com>2007-11-16 15:23:00 +0300
commitfd3764f9a4cf197d220f5ec993178f2a4ff29326 (patch)
tree1d71df91a6d06b46ca2518153c685adb18a6a4ed /source/blender/blenkernel/intern
parent6dbe7453969fd2bcb64df8ed85b3b211c627fc0e (diff)
= Fix for softbody collision mode selector =
This commit makes all softbody collision modes work as they should. Thanks to Genscher for noticing the issue. bjornmose, please check this commit.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/softbody.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index 19dcee676cb..36d114cf023 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -782,21 +782,21 @@ static void calculate_collision_balls(Object *ob)
}
if (akku_count > 0) {
- if (sb->sbc_mode == 0){
+ if (sb->sbc_mode == SBC_MODE_MANUAL){
bp->colball=sb->colball;
- }
- if (sb->sbc_mode == 1){
- bp->colball = akku/(float)akku_count*sb->colball;
}
- if (sb->colball == 2){
+ if (sb->sbc_mode == SBC_MODE_AVG){
+ bp->colball = akku/(float)akku_count*sb->colball;
+ }
+ if (sb->sbc_mode == SBC_MODE_MIN){
bp->colball=min*sb->colball;
- }
- if (sb->colball == 3){
+ }
+ if (sb->sbc_mode == SBC_MODE_MAX){
bp->colball=max*sb->colball;
- }
- if (sb->colball == 4){
- bp->colball = (min + max)/2.0f*sb->colball;
- }
+ }
+ if (sb->sbc_mode == SBC_MODE_AVGMINMAX){
+ bp->colball = (min + max)/2.0f*sb->colball;
+ }
}
else bp->colball=0;
}/*for bp*/