This commit is contained in:
aozhiwei 2022-09-27 11:15:13 +08:00
parent 9a085fc04f
commit cacdd34267

View File

@ -1111,6 +1111,16 @@ void Player::_CMCancelRevive(f8::MsgHdr& hdr, const cs::CMCancelRevive& msg)
void Player::_CMRequestBulletDmg(f8::MsgHdr& hdr, const cs::CMRequestBulletDmg& msg)
{
auto itr = trace_bullet_hash_.find(msg.bullet_uniid());
#ifdef DEBUG
a8::XPrintf("CMRequestBulletDmg bullet_uniid:%d shield_hit:%d strengthen_wall_uniid:%d target_uniid:%d found:%d\n",
{
msg.bullet_uniid(),
msg.shield_hit(),
msg.strengthen_wall_uniid(),
msg.target_uniid(),
itr == trace_bullet_hash_.end() ? 0 :1
});
#endif
if (itr == trace_bullet_hash_.end()) {
return;
}
@ -1149,6 +1159,13 @@ void Player::_CMRequestBulletDmg(f8::MsgHdr& hdr, const cs::CMRequestBulletDmg&
std::get<1>(tuple));
}
}
#ifdef DEBUG
a8::XPrintf("dmg:%f shield:%d\n",
{
dmg,
shield ? 1 : 0
});
#endif
}
}
trace_bullet_hash_.erase(itr);