Skip to content

Commit

Permalink
fixed collision filter; updated Room_IsJoined(...) function;
Browse files Browse the repository at this point in the history
  • Loading branch information
TeslaRus committed Nov 8, 2016
1 parent 53674d1 commit 7b8956c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/physics_bullet.cpp
Expand Up @@ -69,6 +69,10 @@ class bt_engine_ClosestRayResultCallback : public btCollisionWorld::ClosestRayRe
if(r0 && r1)
{
room_sector_p rs = NULL;
if(Room_IsOverlapped(r0, r1))
{
return 1.0f;
}
if((m_cont->object_type == OBJECT_ENTITY) && (m_cont->object))
{
entity_p ent = (entity_p)m_cont->object;
Expand Down Expand Up @@ -125,6 +129,10 @@ class bt_engine_ClosestConvexResultCallback : public btCollisionWorld::ClosestCo
if(r0 && r1)
{
room_sector_p rs = NULL;
if(Room_IsOverlapped(r0, r1))
{
return 1.0f;
}
if((m_cont->object_type == OBJECT_ENTITY) && (m_cont->object))
{
entity_p ent = (entity_p)m_cont->object;
Expand Down
2 changes: 0 additions & 2 deletions src/room.cpp
Expand Up @@ -449,8 +449,6 @@ void Room_AddToNearRoomsList(struct room_s *room, struct room_s *r)

int Room_IsJoined(struct room_s *r1, struct room_s *r2)
{
r1 = r1->real_room;
r2 = r2->real_room;
portal_p p = r1->portals;
for(uint16_t i = 0; i < r1->portals_count; i++, p++)
{
Expand Down

0 comments on commit 7b8956c

Please sign in to comment.