修复0宽高物件碰撞问题
This commit is contained in:
parent
79c355239c
commit
34264ab423
@ -193,6 +193,9 @@ void MapService::GetColliders(Room* room,
|
|||||||
}
|
}
|
||||||
struct CellNode *node, *tmp;
|
struct CellNode *node, *tmp;
|
||||||
list_for_each_entry_safe(node, tmp, head, entry) {
|
list_for_each_entry_safe(node, tmp, head, entry) {
|
||||||
|
if (!node->collider->active) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (node->collider->tag != 0 && !a8::HasBitFlag(node->collider->tag, kHalfWallTag)) {
|
if (node->collider->tag != 0 && !a8::HasBitFlag(node->collider->tag, kHalfWallTag)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,12 @@ void Obstacle::RecalcSelfCollider()
|
|||||||
if (IsHalfWallCollider()) {
|
if (IsHalfWallCollider()) {
|
||||||
a8::SetBitFlag(collider->tag, kHalfWallTag);
|
a8::SetBitFlag(collider->tag, kHalfWallTag);
|
||||||
}
|
}
|
||||||
|
#if 1
|
||||||
|
//长宽为0的物件
|
||||||
|
if (meta->i->width() <= 0 && meta->i->height() <= 0) {
|
||||||
|
collider->active = false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user