Merge pull request #329 from jmiskovic/fix/damping-threshold

Change default damping threshold to zero
This commit is contained in:
Bjorn 2020-11-12 18:09:17 -07:00 committed by GitHub
commit 4ec1494d29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -301,7 +301,7 @@ static int l_lovrColliderGetLinearDamping(lua_State* L) {
static int l_lovrColliderSetLinearDamping(lua_State* L) {
Collider* collider = luax_checktype(L, 1, Collider);
float damping = luax_checkfloat(L, 2);
float threshold = luax_optfloat(L, 3, .01f);
float threshold = luax_optfloat(L, 3, 0.0f);
lovrColliderSetLinearDamping(collider, damping, threshold);
return 0;
}
@ -318,7 +318,7 @@ static int l_lovrColliderGetAngularDamping(lua_State* L) {
static int l_lovrColliderSetAngularDamping(lua_State* L) {
Collider* collider = luax_checktype(L, 1, Collider);
float damping = luax_checkfloat(L, 2);
float threshold = luax_optfloat(L, 3, .01f);
float threshold = luax_optfloat(L, 3, 0.0f);
lovrColliderSetAngularDamping(collider, damping, threshold);
return 0;
}

View File

@ -267,7 +267,7 @@ static int l_lovrWorldGetLinearDamping(lua_State* L) {
static int l_lovrWorldSetLinearDamping(lua_State* L) {
World* world = luax_checktype(L, 1, World);
float damping = luax_checkfloat(L, 2);
float threshold = luax_optfloat(L, 3, .01f);
float threshold = luax_optfloat(L, 3, 0.0f);
lovrWorldSetLinearDamping(world, damping, threshold);
return 0;
}
@ -284,7 +284,7 @@ static int l_lovrWorldGetAngularDamping(lua_State* L) {
static int l_lovrWorldSetAngularDamping(lua_State* L) {
World* world = luax_checktype(L, 1, World);
float damping = luax_checkfloat(L, 2);
float threshold = luax_optfloat(L, 3, .01f);
float threshold = luax_optfloat(L, 3, 0.0f);
lovrWorldSetAngularDamping(world, damping, threshold);
return 0;
}