diff --git a/server/gameserver/room.cc b/server/gameserver/room.cc index 1b343f7..81076d9 100644 --- a/server/gameserver/room.cc +++ b/server/gameserver/room.cc @@ -1094,6 +1094,21 @@ void Room::TouchAlivePlayers(a8::XParams param, } } +void Room::BroadcastDebugMsg(const std::string& debug_msg) +{ + #ifdef DEBUG + TouchHumanList + ( + a8::XParams() + .SetParam1(debug_msg), + [] (Human* hum, a8::XParams& param) -> bool + { + hum->SendDebugMsg(param.param1); + return true; + }); + #endif +} + void Room::UpdateGas() { switch (gas_data_.gas_mode) { diff --git a/server/gameserver/room.h b/server/gameserver/room.h index a115992..8703f1d 100644 --- a/server/gameserver/room.h +++ b/server/gameserver/room.h @@ -101,6 +101,7 @@ public: std::function func); void TouchAlivePlayers(a8::XParams param, std::function func); + void BroadcastDebugMsg(const std::string& debug_msg); void ScatterDrop(a8::Vec2 center, int drop_id); void DropItem(a8::Vec2 pos, int item_id, int item_count, int item_lv);