This commit is contained in:
aozhiwei 2023-04-12 17:50:23 +08:00
parent e070f8df3b
commit 5aec58c788

View File

@ -121,9 +121,9 @@ void Player::_CMExecCommand(f8::MsgHdr& hdr, const cs::CMExecCommand& msg)
Human* target = nullptr;
room->TraverseHumanList
(
[weapon_id, &target] (Human* hum) mutable
[this, weapon_id, &target] (Human* hum) mutable
{
if (hum->IsAndroid() && !hum->dead) {
if (hum->IsAndroid() && !hum->dead && hum->team_id != team_id) {
if (hum->AsAndroid()->robot_meta->weapon_id() == weapon_id) {
target = hum;
return false;