diff --git a/src/modules/physics/box2d/World.cpp b/src/modules/physics/box2d/World.cpp index bc919fda6..957fc8b20 100644 --- a/src/modules/physics/box2d/World.cpp +++ b/src/modules/physics/box2d/World.cpp @@ -396,12 +396,12 @@ int World::getGravity(lua_State *L) return 2; } -void World::setAllowSleeping(bool allow) +void World::setSleepingAllowed(bool allow) { world->SetAllowSleeping(allow); } -bool World::getAllowSleeping() const +bool World::isSleepingAllowed() const { return world->GetAllowSleeping(); } diff --git a/src/modules/physics/box2d/World.h b/src/modules/physics/box2d/World.h index 47eaca921..f86b94467 100644 --- a/src/modules/physics/box2d/World.h +++ b/src/modules/physics/box2d/World.h @@ -185,13 +185,13 @@ public: * Sets whether this World allows sleep. * @param allow True to allow, false to disallow. **/ - void setAllowSleeping(bool allow); + void setSleepingAllowed(bool allow); /** * Returns whether this World allows sleep. * @return True if allowed, false if disallowed. **/ - bool getAllowSleeping() const; + bool isSleepingAllowed() const; /** * Returns whether this World is currently locked. diff --git a/src/modules/physics/box2d/wrap_World.cpp b/src/modules/physics/box2d/wrap_World.cpp index aed67ee22..6039e65be 100644 --- a/src/modules/physics/box2d/wrap_World.cpp +++ b/src/modules/physics/box2d/wrap_World.cpp @@ -87,18 +87,18 @@ int w_World_getGravity(lua_State *L) return t->getGravity(L); } -int w_World_setAllowSleeping(lua_State *L) +int w_World_setSleepingAllowed(lua_State *L) { World *t = luax_checkworld(L, 1); bool b = luax_toboolean(L, 2); - t->setAllowSleeping(b); + t->setSleepingAllowed(b); return 0; } -int w_World_getAllowSleeping(lua_State *L) +int w_World_isSleepingAllowed(lua_State *L) { World *t = luax_checkworld(L, 1); - luax_pushboolean(L, t->getAllowSleeping()); + luax_pushboolean(L, t->isSleepingAllowed()); return 1; } @@ -189,8 +189,8 @@ static const luaL_Reg functions[] = { "getContactFilter", w_World_getContactFilter }, { "setGravity", w_World_setGravity }, { "getGravity", w_World_getGravity }, - { "setAllowSleeping", w_World_setAllowSleeping }, - { "getAllowSleeping", w_World_getAllowSleeping }, + { "setSleepingAllowed", w_World_setSleepingAllowed }, + { "isSleepingAllowed", w_World_isSleepingAllowed }, { "isLocked", w_World_isLocked }, { "getBodyCount", w_World_getBodyCount }, { "getJointCount", w_World_getJointCount }, diff --git a/src/modules/physics/box2d/wrap_World.h b/src/modules/physics/box2d/wrap_World.h index 8946fe620..aa642c306 100644 --- a/src/modules/physics/box2d/wrap_World.h +++ b/src/modules/physics/box2d/wrap_World.h @@ -42,8 +42,8 @@ int w_World_setContactFilter(lua_State *L); int w_World_getContactFilter(lua_State *L); int w_World_setGravity(lua_State *L); int w_World_getGravity(lua_State *L); -int w_World_setAllowSleeping(lua_State *L); -int w_World_getAllowSleeping(lua_State *L); +int w_World_setSleepingAllowed(lua_State *L); +int w_World_isSleepingAllowed(lua_State *L); int w_World_isLocked(lua_State *L); int w_World_getBodyCount(lua_State *L); int w_World_getJointCount(lua_State *L);