From 0f91d2cec9fce85c5557c5669da6685180b756cb Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Tue, 22 Apr 2014 16:38:34 -0700 Subject: Fix T39458: Switching physics type from Character to Dynamic enables ghost flag silently Enabling ghost for Sensors and Characters is now done in conversion rather than when setting the RNA. --- source/blender/makesrna/intern/rna_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_object.c') diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 4a817806b89..38073293df8 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -987,7 +987,7 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value) switch (ob->body_type) { case OB_BODY_TYPE_SENSOR: - ob->gameflag |= OB_SENSOR | OB_COLLISION | OB_GHOST; + ob->gameflag |= OB_SENSOR | OB_COLLISION; ob->gameflag &= ~(OB_OCCLUDER | OB_CHARACTER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR | OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH); break; @@ -1009,7 +1009,7 @@ static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value) ob->gameflag &= ~(OB_SENSOR | OB_RIGID_BODY | OB_SOFT_BODY | OB_COLLISION | OB_CHARACTER | OB_OCCLUDER | OB_DYNAMIC | OB_NAVMESH); break; case OB_BODY_TYPE_CHARACTER: - ob->gameflag |= OB_COLLISION | OB_GHOST | OB_CHARACTER; + ob->gameflag |= OB_COLLISION | OB_CHARACTER; ob->gameflag &= ~(OB_SENSOR | OB_OCCLUDER | OB_DYNAMIC | OB_RIGID_BODY | OB_SOFT_BODY | OB_ACTOR | OB_ANISOTROPIC_FRICTION | OB_DO_FH | OB_ROT_FH | OB_COLLISION_RESPONSE | OB_NAVMESH); break; -- cgit v1.2.3