1
This commit is contained in:
parent
46b46871c4
commit
ab77a051d6
@ -493,9 +493,25 @@ void Bullet::Check(float distance)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (obstacle->meta->i->thing_type() == kObstacleStrengthenWall) {
|
} else if (obstacle->meta->i->thing_type() == kObstacleStrengthenWall) {
|
||||||
if (!strengthened_ && TestCollision(room, collider)) {
|
if (!strengthened_ && sender.Get() &&
|
||||||
strengthened_ = true;
|
sender.Get()->team_id == obstacle->GetTeamId(room)) {
|
||||||
OnStrengthen(obstacle);
|
bool ret = Check2dRotationRectangle
|
||||||
|
(GetPos().x,
|
||||||
|
GetPos().y,
|
||||||
|
gun_meta->i->bullet_rad(),
|
||||||
|
obstacle->GetPos().x,
|
||||||
|
obstacle->GetPos().y,
|
||||||
|
obstacle->meta->i->width(),
|
||||||
|
obstacle->meta->i->height(),
|
||||||
|
obstacle->GetRotate() * 180.0f
|
||||||
|
);
|
||||||
|
if (ret) {
|
||||||
|
strengthened_ = true;
|
||||||
|
OnStrengthen(obstacle);
|
||||||
|
#ifdef DEBUG
|
||||||
|
a8::XPrintf("命中能量墙\n", {});
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user