summaryrefslogtreecommitdiff
path: root/src/ode
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-03-23 14:21:30 -0500
committersanine-a <sanine.not@pm.me>2023-03-23 14:21:30 -0500
commita2fcdef91e1e839e55d0db295abe80961a8a2dc0 (patch)
tree068d4b8ca7d729f419ee691a97c5cbc3b6ce90bc /src/ode
parentdc8f29206201fcc977443ce9c6138c2f3129c1c8 (diff)
fix dContact paramenters getting parsed as integers instead of numbers
Diffstat (limited to 'src/ode')
-rw-r--r--src/ode/joint.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/ode/joint.c b/src/ode/joint.c
index 7ff4c22..f735d6a 100644
--- a/src/ode/joint.c
+++ b/src/ode/joint.c
@@ -70,46 +70,46 @@ static int parse_surface_params(lua_State *L, struct dSurfaceParameters *surface
if (!lua_isnil(L, -1)) surface->mode = lua_tointeger(L, -1);
get_field(L, tbl, "mu", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->mu = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->mu = lua_tonumber(L, -1);
get_field(L, tbl, "mu2", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->mu2 = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->mu2 = lua_tonumber(L, -1);
get_field(L, tbl, "rho", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->rho = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->rho = lua_tonumber(L, -1);
get_field(L, tbl, "rho2", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->rho2 = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->rho2 = lua_tonumber(L, -1);
get_field(L, tbl, "rhoN", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->rhoN = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->rhoN = lua_tonumber(L, -1);
get_field(L, tbl, "bounce", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->bounce = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->bounce = lua_tonumber(L, -1);
get_field(L, tbl, "bounce_vel", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->bounce_vel = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->bounce_vel = lua_tonumber(L, -1);
get_field(L, tbl, "soft_erp", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->soft_erp = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->soft_erp = lua_tonumber(L, -1);
get_field(L, tbl, "soft_cfm", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->soft_cfm = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->soft_cfm = lua_tonumber(L, -1);
get_field(L, tbl, "motion1", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->motion1 = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->motion1 = lua_tonumber(L, -1);
get_field(L, tbl, "motion2", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->motion2 = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->motion2 = lua_tonumber(L, -1);
get_field(L, tbl, "motionN", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->motionN = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->motionN = lua_tonumber(L, -1);
get_field(L, tbl, "slip1", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->slip1 = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->slip1 = lua_tonumber(L, -1);
get_field(L, tbl, "slip2", LUA_TNUMBER);
- if (!lua_isnil(L, -1)) surface->slip2 = lua_tointeger(L, -1);
+ if (!lua_isnil(L, -1)) surface->slip2 = lua_tonumber(L, -1);
lua_pop(L, 15);
}