1
This commit is contained in:
parent
e42fc2762a
commit
28b8b144ef
@ -125,11 +125,26 @@ void Bullet::OnHit(std::set<Entity*>& objects)
|
||||
}
|
||||
} else {
|
||||
for (auto& target : objects) {
|
||||
bool old_is_dead = target->IsDead(room);
|
||||
TriggerHitBuff(target);
|
||||
target->OnBulletHit(this);
|
||||
if (target->IsDead(room) && !old_is_dead) {
|
||||
OnKillTarget(target);
|
||||
bool eat = false;
|
||||
if (!trace_target_id && !reporter_list) {
|
||||
if (mt::Param::s().bullet_through_wall_check) {
|
||||
if (!room->BulletCanReach(born_pos.ToGlmVec3(), target->GetPos().ToGlmVec3())) {
|
||||
eat = true;
|
||||
}
|
||||
if (sender.Get() && sender.Get()->IsPlayer()) {
|
||||
#ifdef DEBUG
|
||||
a8::XPrintf("eat %d xxxxxxxxxxxxxxxxxxxxxxxx\n", {eat});
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!eat) {
|
||||
bool old_is_dead = target->IsDead(room);
|
||||
TriggerHitBuff(target);
|
||||
target->OnBulletHit(this);
|
||||
if (target->IsDead(room) && !old_is_dead) {
|
||||
OnKillTarget(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3492,3 +3492,8 @@ void Room::LockRoom()
|
||||
lock_room_ = true;
|
||||
lock_room_frameno_ = GetFrameNo();
|
||||
}
|
||||
|
||||
bool Room::BulletCanReach(const glm::vec3& start, const glm::vec3& end)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -260,6 +260,7 @@ public:
|
||||
std::shared_ptr<AirRaid> GetAirRaid() { return air_raid_; }
|
||||
std::shared_ptr<BatchSync> GetBatchSync() { return batch_sync_; }
|
||||
void GMFastForward();
|
||||
bool BulletCanReach(const glm::vec3& start, const glm::vec3& end);
|
||||
|
||||
private:
|
||||
void ShuaAndroid();
|
||||
|
Loading…
x
Reference in New Issue
Block a user