Merge remote-tracking branch 'refs/remotes/origin/master' into enet_wip_nothing_to_see_here
This commit is contained in:
@@ -41,7 +41,7 @@ namespace Nz
|
|||||||
cpSpace* GetHandle() const;
|
cpSpace* GetHandle() const;
|
||||||
float GetStepSize() const;
|
float GetStepSize() const;
|
||||||
|
|
||||||
bool NearestBodyQuery(const Vector2f& from, float maxDistance, Nz::UInt32 collisionGroup, Nz::UInt32 categoryMask, Nz::UInt32 collisionMask, RigidBody2D** nearestBody);
|
bool NearestBodyQuery(const Vector2f& from, float maxDistance, Nz::UInt32 collisionGroup, Nz::UInt32 categoryMask, Nz::UInt32 collisionMask, RigidBody2D** nearestBody = nullptr);
|
||||||
bool NearestBodyQuery(const Vector2f& from, float maxDistance, Nz::UInt32 collisionGroup, Nz::UInt32 categoryMask, Nz::UInt32 collisionMask, NearestQueryResult* result);
|
bool NearestBodyQuery(const Vector2f& from, float maxDistance, Nz::UInt32 collisionGroup, Nz::UInt32 categoryMask, Nz::UInt32 collisionMask, NearestQueryResult* result);
|
||||||
|
|
||||||
void RegisterCallbacks(unsigned int collisionId, const Callback& callbacks);
|
void RegisterCallbacks(unsigned int collisionId, const Callback& callbacks);
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ namespace Nz
|
|||||||
m_mass(object.m_mass)
|
m_mass(object.m_mass)
|
||||||
{
|
{
|
||||||
cpBodySetUserData(m_handle, this);
|
cpBodySetUserData(m_handle, this);
|
||||||
|
for (cpShape* shape : m_shapes)
|
||||||
|
cpShapeSetUserData(shape, this);
|
||||||
|
|
||||||
object.m_handle = nullptr;
|
object.m_handle = nullptr;
|
||||||
|
|
||||||
@@ -312,6 +314,8 @@ namespace Nz
|
|||||||
m_world = object.m_world;
|
m_world = object.m_world;
|
||||||
|
|
||||||
cpBodySetUserData(m_handle, this);
|
cpBodySetUserData(m_handle, this);
|
||||||
|
for (cpShape* shape : m_shapes)
|
||||||
|
cpShapeSetUserData(shape, this);
|
||||||
|
|
||||||
object.m_handle = nullptr;
|
object.m_handle = nullptr;
|
||||||
|
|
||||||
@@ -324,6 +328,7 @@ namespace Nz
|
|||||||
{
|
{
|
||||||
m_handle = cpBodyNew(mass, moment);
|
m_handle = cpBodyNew(mass, moment);
|
||||||
cpBodySetUserData(m_handle, this);
|
cpBodySetUserData(m_handle, this);
|
||||||
|
|
||||||
cpSpaceAddBody(m_world->GetHandle(), m_handle);
|
cpSpaceAddBody(m_world->GetHandle(), m_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user