diff options
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r-- | src/core/entity.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/entity.cc b/src/core/entity.cc index 7aa72fa..ebe4938 100644 --- a/src/core/entity.cc +++ b/src/core/entity.cc @@ -515,8 +515,7 @@ void Entity::reset() btVector3 modelscalevec(modelscale, modelscale, modelscale); meshshape->setLocalScaling(modelscalevec); - //meshshape->setMargin(0.0f); - //meshshape->updateBound(); + meshshape->setMargin(Cvar::sv_collisionmargin->value()); entity_collision_shape = meshshape; // con_debug << " " << label() << " attached collision mesh: " << model()->collisionmesh()->size() << " triangles" << std::endl; @@ -609,7 +608,7 @@ void EntityDynamic::reset() btVector3 modelscalevec(modelscale, modelscale, modelscale); meshshape->setLocalScaling(modelscalevec); - //meshshape->setMargin(0.0f); + meshshape->setMargin(Cvar::sv_collisionmargin->value()); meshshape->updateBound(); entity_collision_shape = meshshape; @@ -1027,10 +1026,10 @@ void EntityControlable::reset() btVector3 modelscalevec(modelscale, modelscale, modelscale); meshshape->setLocalScaling(modelscalevec); - //meshshape->setMargin(0.0f); + meshshape->setMargin(Cvar::sv_collisionmargin->value()); meshshape->updateBound(); - entity_collision_shape = meshshape; + entity_collision_shape = meshshape; } else { // use bounding box entity_collision_shape = new btBoxShape(to_btVector3(model()->box().max() * modelscale)); |