修复自杀统计问题
This commit is contained in:
parent
e369305fbe
commit
1163463151
@ -508,6 +508,13 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
|
||||
if (!dead && !room->game_over) {
|
||||
Entity* hum = room->GetEntityByUniId(killer_id);
|
||||
if (hum && hum->entity_type == ET_Player) {
|
||||
if (killer_id == entity_uniid) {
|
||||
std::string msg = a8::Format("%s 自杀",
|
||||
{
|
||||
killer_name,
|
||||
});
|
||||
SendRollMsg(msg);
|
||||
} else {
|
||||
((Human*)hum)->stats.kills++;
|
||||
((Human*)hum)->kill_humans.insert(this);
|
||||
MetaData::Equip* equip_meta = MetaMgr::Instance()->GetEquip(weapon_id);
|
||||
@ -520,6 +527,7 @@ void Human::BeKill(int killer_id, const std::string& killer_name, int weapon_id)
|
||||
});
|
||||
SendRollMsg(msg);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch (weapon_id) {
|
||||
case VW_SafeArea:
|
||||
|
Loading…
x
Reference in New Issue
Block a user