Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-02-09 16:01:17 +0000
committerStijn Buys <ingar@osirion.org>2011-02-09 16:01:17 +0000
commita255dbc032d15a4f5024bc60baa19c45ebceecc6 (patch)
treeca5517aae243957b824767169674248c70f7b1d3 /src/core/entity.cc
parent38eb51c26ab0d9dbebc974c7a21f96a429ce3098 (diff)
added sv_collisionmargin Cvar and applied the value to mesh collisions,
added seconds parameter to sys::get_datetime(), added con_timestamps Cvar, enabled console timestamps on the dedicated server by default.
Diffstat (limited to 'src/core/entity.cc')
-rw-r--r--src/core/entity.cc9
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));