This commit is contained in:
aozhiwei 2021-06-18 16:44:16 +08:00
parent 4796473090
commit 4022545a6e
2 changed files with 5 additions and 2 deletions

View File

@ -154,8 +154,8 @@ bool Hero::IsCollisionInMapService()
(
(collider->type == CT_Aabb && aabb_box.Intersect((ColliderComponent*)collider)) ||
(collider->type == CT_Circle && self_collider_->Intersect((ColliderComponent*)collider))
)
) {
) &&
!obstacle->CanThroughable(this)) {
if (last_collision_door_ != collider->owner) {
OptResult opt_result = kOptPass;
obstacle->OnCollisionTrigger(this, opt_result);

View File

@ -507,6 +507,9 @@ void RoomObstacle::Die(Room* room)
bool RoomObstacle::CanThroughable(Creature* c)
{
if (meta->i->thing_type() == kObstacleOilBucket) {
return true;
}
if (master.Get()) {
return master.Get()->team_id == c->team_id && temp_through_;
} else {