This commit is contained in:
aozhiwei 2024-03-21 10:36:35 +08:00
parent ef3bdcf123
commit bbb019c1fd
2 changed files with 11 additions and 0 deletions

View File

@ -3554,6 +3554,7 @@ void Human::InternalBeKill(int killer_id, const std::string& killer_name, int we
}
}
SendViewerUiMemberUpdate({GetUniId(), killer_id, real_killer_id});
room->NotifyUiUpdate();
}
int Human::GetTeamMode()
@ -3577,6 +3578,7 @@ void Human::CalcAssists(Human* target)
if (hum->room->GetFrameNo() - itr->second <
SERVER_FRAME_RATE * assist_time) {
++hum->stats->assist;
room->NotifyUiUpdate();
}
}
return true;

View File

@ -1779,6 +1779,8 @@ void Human::SendUIUpdate()
cs::SMUiUpdate notifymsg;
notifymsg.set_alive_count(room->AliveCount());
notifymsg.set_kill_count(stats->kills);
notifymsg.set_dead_count(stats->dead_times);
notifymsg.set_assist_count(stats->assist);
room->FillSMUiUpdate(notifymsg);
if (room->IsPveRoom()) {
notifymsg.set_score(stats->pve_rank_score);
@ -2545,6 +2547,7 @@ void Team::FillMFTeamFull(cs::MFTeamFull* p)
[p] (Human* hum) -> bool
{
hum->FillMFTeamMemberNew(p->add_members());
return true;
});
}
@ -2648,6 +2651,9 @@ void Room::SendSMTeamFull(Human* hum)
(
[&notify_msg] (Player* hum) -> bool
{
#ifdef MYDEBUG1
a8::XPrintf("SMTeamFull:%s\n", {f8::PbToJson(&notify_msg)});
#endif
hum->SendNotifyMsg(notify_msg);
return true;
});
@ -2673,6 +2679,9 @@ void Room::OnTeamPartChg(Human* hum)
(
[&notify_msg] (Player* hum) -> bool
{
#ifdef MYDEBUG1
a8::XPrintf("SMTeamPart:%s\n", {f8::PbToJson(&notify_msg)});
#endif
hum->SendNotifyMsg(notify_msg);
return true;
});