1
This commit is contained in:
parent
07306fe97e
commit
193073bf9d
@ -586,16 +586,12 @@ bool Human::IsCollisionInMapService()
|
||||
case ET_Obstacle:
|
||||
{
|
||||
Obstacle* obstacle = (Obstacle*)collider->owner;
|
||||
#if 1
|
||||
if (!obstacle->IsDead(room) &&
|
||||
(
|
||||
(collider->type == CT_Aabb && aabb_box.Intersect((ColliderComponent*)collider)) ||
|
||||
(collider->type == CT_Circle && self_collider_->Intersect((ColliderComponent*)collider))
|
||||
)
|
||||
) {
|
||||
#else
|
||||
if (!collider->owner->dead && TestCollision((ColliderComponent*)collider)) {
|
||||
#endif
|
||||
) &&
|
||||
!obstacle->CanThroughable(this)) {
|
||||
if (last_collision_door_ != collider->owner) {
|
||||
if (!obstacle->IsDead(room) &&
|
||||
obstacle->Attackable() &&
|
||||
|
@ -37,6 +37,7 @@ class Obstacle : public Entity
|
||||
virtual long long GetDeadFrameNo(Room* room) override;
|
||||
virtual void OnPreCollision(Room* room) override;
|
||||
virtual bool IsTerminatorAirDropBox(Room* room) { return false; }
|
||||
virtual bool CanThroughable(Human* num) { return false; }
|
||||
void Explosion(Bullet* bullet);
|
||||
void SetDoorInfo(Building* building, int door_id_x);
|
||||
bool IsDoor();
|
||||
|
@ -82,3 +82,8 @@ void RoomObstacle::RecalcSelfCollider()
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool RoomObstacle::CanThroughable(Human* num)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ class RoomObstacle : public Obstacle
|
||||
virtual void Initialize() override;
|
||||
virtual void RecalcSelfCollider() override;
|
||||
virtual bool IsTerminatorAirDropBox(Room* room) override { return is_terminator_airdrop_box; }
|
||||
virtual bool CanThroughable(Human* num) override;
|
||||
|
||||
protected:
|
||||
RoomObstacle();
|
||||
|
@ -102,6 +102,7 @@ message Equip
|
||||
optional string param1 = 43;
|
||||
optional int32 reloadtype = 46;
|
||||
optional float Recoil_force = 47;
|
||||
optional float missiles_time = 48;
|
||||
|
||||
optional string inventory_slot = 31; //库存槽位
|
||||
optional int32 _inventory_slot = 32; //库存槽位
|
||||
|
Loading…
x
Reference in New Issue
Block a user