This commit is contained in:
aozhiwei 2023-12-21 17:22:38 +08:00
parent e29d44858b
commit 1d8f252695

View File

@ -1831,6 +1831,18 @@ void Player::_CMReportSpecShotHitPos(f8::MsgHdr* hdr, const cs::CMReportSpecShot
Buff* buff = GetBuffByEffectId(kBET_Floating);
if (buff && buff->meta->GetBuffParam4(buff) > 0) {
if (buff->GetV(0) < buff->meta->GetBuffParam5(buff)) {
for (int target_uniid : msg.target_list()) {
Creature* target = room->GetCreatureByUniId(target_uniid);
if (target && IsProperTarget(target)) {
glm::vec3 pos;
TypeConvert::FromPb(pos, &msg.bullet_pos());
if (target->GetPos().Distance2D2(pos) < 200) {
float real_dmg_out = 0.0f;
target->DecHP(100, GetUniId(), GetName(), VW_Weapon,
GetUniId(), GetName(), real_dmg_out);
}
}
}
buff->IncV(0, 1);
}
}