修复机器人自爆问题
This commit is contained in:
parent
0936d69779
commit
14f7e822d6
@ -318,9 +318,32 @@ bool Human::IsCollision()
|
||||
(last_collision_door == nullptr || last_collision_door != entity) &&
|
||||
TestCollision(entity)
|
||||
){
|
||||
Obstacle* obstacle = (Obstacle*)entity;
|
||||
if (!obstacle->dead &&
|
||||
obstacle->meta->i->attack_type() == 1 &&
|
||||
obstacle->meta->i->drop() != 0 &&
|
||||
room->gas_data.gas_mode != GasInactive &&
|
||||
!a8::HasBitFlag(status, HS_Fly) &&
|
||||
!a8::HasBitFlag(status, HS_Jump)
|
||||
) {
|
||||
obstacle->health = 0;
|
||||
obstacle->dead = obstacle->health <= 0.01f;
|
||||
obstacle->dead_frameno = room->frame_no;
|
||||
if (obstacle->dead) {
|
||||
#if 0
|
||||
if (obstacle->meta->i->damage_dia() > 0.01f &&
|
||||
obstacle->meta->i->damage() > 0.01f) {
|
||||
obstacle->Explosion(this);
|
||||
}
|
||||
#endif
|
||||
room->ScatterDrop(obstacle->pos, obstacle->meta->i->drop());
|
||||
}
|
||||
obstacle->BroadcastFullState();
|
||||
} else {
|
||||
objects.push_back(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ET_Building:
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user