diff --git a/server/gameserver/commands.cc b/server/gameserver/commands.cc index 9af7dbad..062f4986 100644 --- a/server/gameserver/commands.cc +++ b/server/gameserver/commands.cc @@ -245,7 +245,7 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) ( [this] (Human* hum) -> bool { - a8::SetBitFlag(hum->status, CS_NoDie); + //a8::SetBitFlag(hum->status, CS_NoDie); hum->GetMovement()->ClearPath(); hum->GetMutablePos().FromGlmVec3(GetPos().ToGlmVec3()); room->grid_service->MoveCreature(hum); @@ -519,6 +519,31 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg) for (auto& str : strings) { SendDebugMsg("数值: " + str); } + } else if (cmd == "down_teammate") { + Human* target = nullptr; + GetTeam()->TraverseMembers + ( + [this, &target] (Human *hum) -> bool + { + if (!hum->dead && hum != this) { + if (!target) { + target = hum; + } else if (GetPos().Distance2D2(hum->GetPos()) < + GetPos().Distance2D2(target->GetPos())) { + target = hum; + } + } + return true; + }); + if (target) { + float dmg_out = 0.0f; + target->DecHP(100000.0f, VP_Gas, TEXT("battle_server_killer_gas", "毒圈"), VW_Gas, + VP_Gas, + TEXT("battle_server_killer_gas", "毒圈"), + dmg_out, + 0, + 0); + } } else if (cmd == "moba_pingju" && cmds.size() >= 0) { if (room->IsMobaModeRoom() && !room->IsGameOver() && room->GetMobaOvertimeRaceFrameNo() <= 0) { room->TraverseTeams diff --git a/server/gameserver/room.h b/server/gameserver/room.h index 944f9fae..2b250a60 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -74,6 +74,7 @@ enum RoomSwitch_e kRoomSwitchDisableUseSkill, kRoomSwitchDisableUseItem, kRoomSwitchDisableShot, + kRoomSwitchPeaceMode, }; class Room : public std::enable_shared_from_this