diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index e9eb312..d542794 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -318,7 +318,30 @@ bool Human::IsCollision() (last_collision_door == nullptr || last_collision_door != entity) && TestCollision(entity) ){ - objects.push_back(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;