diff options
author | Ulysse Martin <you.le@live.fr> | 2015-10-28 04:02:31 +0300 |
---|---|---|
committer | Jorge Bernal <jbernalmartinez@gmail.com> | 2015-10-28 04:04:30 +0300 |
commit | 40b2e75b2018a2ff348013ee8322ad2e30734a94 (patch) | |
tree | f23c89771b9962f493f6b320c4991b9e9c715c80 /source/blender/blenloader | |
parent | 9eb7eb5379cdb2f8584aa90d0bec0ffef2f91023 (diff) |
BGE: Fix T46557: Empty collision bounds option with character physics
- Fix in rna_object.c rna_GameObjectSettings_physics_type_set->The
collision bounds type can't be empty for character physics
- Add do_version for the .blends already saved with collision bounds
option empty (characters)
Reviewers: campbellbarton, panzergame, lordloki
Reviewed By: panzergame, lordloki
Subscribers: lordloki
Projects: #game_engine
Maniphest Tasks: T46557
Differential Revision: https://developer.blender.org/D1576
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 72f9897730a..b5199e123c6 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -909,6 +909,15 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) #undef LA_YF_PHOTON } + { + Object *ob; + for (ob = main->object.first; ob; ob = ob->id.next) { + if (ob->body_type == OB_BODY_TYPE_CHARACTER && (ob->gameflag & OB_BOUNDS) && ob->collision_boundtype == OB_BOUND_TRIANGLE_MESH) { + ob->boundtype = ob->collision_boundtype = OB_BOUND_BOX; + } + } + } + } { @@ -925,4 +934,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + } |