This commit is contained in:
aozhiwei 2023-04-02 14:39:36 +08:00
parent 76a4cd945e
commit bf281fee0f

View File

@ -1196,8 +1196,7 @@ void Player::_CMCancelRevive(f8::MsgHdr& hdr, const cs::CMCancelRevive& msg)
void Player::_CMRequestBulletDmg(f8::MsgHdr& hdr, const cs::CMRequestBulletDmg& msg) void Player::_CMRequestBulletDmg(f8::MsgHdr& hdr, const cs::CMRequestBulletDmg& msg)
{ {
#if 0 auto itr = room->report_bullet_hash.find(msg.bullet_uniid());
auto itr = trace_bullet_hash_.find(msg.bullet_uniid());
#ifdef DEBUG #ifdef DEBUG
a8::XPrintf("CMRequestBulletDmg bullet_uniid:%d shield_hit:%d strengthen_wall_uniid:%d target_uniid:%d found:%d\n", a8::XPrintf("CMRequestBulletDmg bullet_uniid:%d shield_hit:%d strengthen_wall_uniid:%d target_uniid:%d found:%d\n",
{ {
@ -1205,13 +1204,12 @@ void Player::_CMRequestBulletDmg(f8::MsgHdr& hdr, const cs::CMRequestBulletDmg&
msg.shield_hit(), msg.shield_hit(),
msg.strengthen_wall_uniid(), msg.strengthen_wall_uniid(),
msg.target_uniid(), msg.target_uniid(),
itr == trace_bullet_hash_.end() ? 0 :1 itr == room->report_bullet_hash.end() ? 0 :1
}); });
#endif #endif
if (itr == trace_bullet_hash_.end()) { if (itr == room->report_bullet_hash.end()) {
return; return;
} }
auto& tuple = itr->second;
Entity* bullet_entity = room->GetEntityByUniId(msg.bullet_uniid()); Entity* bullet_entity = room->GetEntityByUniId(msg.bullet_uniid());
if (bullet_entity && bullet_entity->GetEntityType() == ET_Bullet) { if (bullet_entity && bullet_entity->GetEntityType() == ET_Bullet) {
@ -1262,8 +1260,7 @@ void Player::_CMRequestBulletDmg(f8::MsgHdr& hdr, const cs::CMRequestBulletDmg&
#endif #endif
} }
} }
trace_bullet_hash_.erase(itr); room->report_bullet_hash.erase(msg.bullet_uniid());
#endif
} }
void Player::_CMRequestThrowDmg(f8::MsgHdr& hdr, const cs::CMRequestThrowDmg& msg) void Player::_CMRequestThrowDmg(f8::MsgHdr& hdr, const cs::CMRequestThrowDmg& msg)