1
This commit is contained in:
parent
0094a8f732
commit
7b6eda38bd
@ -245,7 +245,7 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
|||||||
(
|
(
|
||||||
[this] (Human* hum) -> bool
|
[this] (Human* hum) -> bool
|
||||||
{
|
{
|
||||||
a8::SetBitFlag(hum->status, CS_NoDie);
|
//a8::SetBitFlag(hum->status, CS_NoDie);
|
||||||
hum->GetMovement()->ClearPath();
|
hum->GetMovement()->ClearPath();
|
||||||
hum->GetMutablePos().FromGlmVec3(GetPos().ToGlmVec3());
|
hum->GetMutablePos().FromGlmVec3(GetPos().ToGlmVec3());
|
||||||
room->grid_service->MoveCreature(hum);
|
room->grid_service->MoveCreature(hum);
|
||||||
@ -519,6 +519,31 @@ void Player::_CMExecCommand(f8::MsgHdr* hdr, const cs::CMExecCommand& msg)
|
|||||||
for (auto& str : strings) {
|
for (auto& str : strings) {
|
||||||
SendDebugMsg("数值: " + str);
|
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) {
|
} else if (cmd == "moba_pingju" && cmds.size() >= 0) {
|
||||||
if (room->IsMobaModeRoom() && !room->IsGameOver() && room->GetMobaOvertimeRaceFrameNo() <= 0) {
|
if (room->IsMobaModeRoom() && !room->IsGameOver() && room->GetMobaOvertimeRaceFrameNo() <= 0) {
|
||||||
room->TraverseTeams
|
room->TraverseTeams
|
||||||
|
@ -74,6 +74,7 @@ enum RoomSwitch_e
|
|||||||
kRoomSwitchDisableUseSkill,
|
kRoomSwitchDisableUseSkill,
|
||||||
kRoomSwitchDisableUseItem,
|
kRoomSwitchDisableUseItem,
|
||||||
kRoomSwitchDisableShot,
|
kRoomSwitchDisableShot,
|
||||||
|
kRoomSwitchPeaceMode,
|
||||||
};
|
};
|
||||||
|
|
||||||
class Room : public std::enable_shared_from_this<Room>
|
class Room : public std::enable_shared_from_this<Room>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user