1
This commit is contained in:
parent
e42fc2762a
commit
28b8b144ef
@ -125,11 +125,26 @@ void Bullet::OnHit(std::set<Entity*>& objects)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (auto& target : objects) {
|
for (auto& target : objects) {
|
||||||
bool old_is_dead = target->IsDead(room);
|
bool eat = false;
|
||||||
TriggerHitBuff(target);
|
if (!trace_target_id && !reporter_list) {
|
||||||
target->OnBulletHit(this);
|
if (mt::Param::s().bullet_through_wall_check) {
|
||||||
if (target->IsDead(room) && !old_is_dead) {
|
if (!room->BulletCanReach(born_pos.ToGlmVec3(), target->GetPos().ToGlmVec3())) {
|
||||||
OnKillTarget(target);
|
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_ = true;
|
||||||
lock_room_frameno_ = GetFrameNo();
|
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<AirRaid> GetAirRaid() { return air_raid_; }
|
||||||
std::shared_ptr<BatchSync> GetBatchSync() { return batch_sync_; }
|
std::shared_ptr<BatchSync> GetBatchSync() { return batch_sync_; }
|
||||||
void GMFastForward();
|
void GMFastForward();
|
||||||
|
bool BulletCanReach(const glm::vec3& start, const glm::vec3& end);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ShuaAndroid();
|
void ShuaAndroid();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user