1
This commit is contained in:
parent
6bcb50de9e
commit
8c7006d072
@ -499,3 +499,9 @@ int Team::GetKillCount()
|
|||||||
{
|
{
|
||||||
return kill_count_;
|
return kill_count_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Team::IncKillCount()
|
||||||
|
{
|
||||||
|
++kill_count_;
|
||||||
|
last_kill_frameno_ = room->GetFrameNo();
|
||||||
|
}
|
||||||
|
@ -52,7 +52,9 @@ class Team
|
|||||||
void RunAway(Human* hum);
|
void RunAway(Human* hum);
|
||||||
bool AllIsRunAway();
|
bool AllIsRunAway();
|
||||||
bool IsViewTeam() { return is_view_; }
|
bool IsViewTeam() { return is_view_; }
|
||||||
|
void IncKillCount();
|
||||||
int GetKillCount();
|
int GetKillCount();
|
||||||
|
long long GetLastKillFrameNo() { return last_kill_frameno_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int team_id_ = 0;
|
int team_id_ = 0;
|
||||||
@ -63,4 +65,5 @@ class Team
|
|||||||
Human* first_member_ = nullptr;
|
Human* first_member_ = nullptr;
|
||||||
bool auto_fill_ = false;
|
bool auto_fill_ = false;
|
||||||
int kill_count_ = 0;
|
int kill_count_ = 0;
|
||||||
|
long long last_kill_frameno_ = 0;
|
||||||
};
|
};
|
||||||
|
@ -148,6 +148,7 @@ void Trigger::Kill(Creature* target, int weapon_id)
|
|||||||
owner_hum->CalcAssists(target_hum);
|
owner_hum->CalcAssists(target_hum);
|
||||||
if (target->GetUniId() != owner_->GetUniId()) {
|
if (target->GetUniId() != owner_->GetUniId()) {
|
||||||
owner_->AsHuman()->stats->kills++;
|
owner_->AsHuman()->stats->kills++;
|
||||||
|
owner_->AsHuman()->GetTeam()->IncKillCount();
|
||||||
}
|
}
|
||||||
owner_->AsHuman()->stats->last_kill_frameno = owner_->room->GetFrameNo();
|
owner_->AsHuman()->stats->last_kill_frameno = owner_->room->GetFrameNo();
|
||||||
owner_->AsHuman()->kill_humans.insert(target->AsHuman());
|
owner_->AsHuman()->kill_humans.insert(target->AsHuman());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user