1
This commit is contained in:
parent
e29d44858b
commit
1d8f252695
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user