mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-04 00:23:27 +08:00
Radio Sync Fix (#2973)
This commit is contained in:
parent
2c55564d1a
commit
03fb470983
@ -2,6 +2,7 @@
|
|||||||
#include "backend/context/chat_command_context.hpp"
|
#include "backend/context/chat_command_context.hpp"
|
||||||
#include "backend/player_command.hpp"
|
#include "backend/player_command.hpp"
|
||||||
#include "core/data/packet_types.hpp"
|
#include "core/data/packet_types.hpp"
|
||||||
|
#include "gta/enums.hpp"
|
||||||
#include "gta/net_game_event.hpp"
|
#include "gta/net_game_event.hpp"
|
||||||
#include "gta_util.hpp"
|
#include "gta_util.hpp"
|
||||||
#include "hooking/hooking.hpp"
|
#include "hooking/hooking.hpp"
|
||||||
@ -9,9 +10,8 @@
|
|||||||
#include "natives.hpp"
|
#include "natives.hpp"
|
||||||
#include "script/scriptIdBase.hpp"
|
#include "script/scriptIdBase.hpp"
|
||||||
#include "services/players/player_service.hpp"
|
#include "services/players/player_service.hpp"
|
||||||
#include "util/session.hpp"
|
|
||||||
#include "util/chat.hpp"
|
#include "util/chat.hpp"
|
||||||
#include "gta/enums.hpp"
|
#include "util/session.hpp"
|
||||||
|
|
||||||
#include <network/Network.hpp>
|
#include <network/Network.hpp>
|
||||||
#include <network/netTime.hpp>
|
#include <network/netTime.hpp>
|
||||||
@ -235,7 +235,21 @@ namespace big
|
|||||||
switch (msgType)
|
switch (msgType)
|
||||||
{
|
{
|
||||||
case rage::eNetMessage::MsgScriptMigrateHost: return true;
|
case rage::eNetMessage::MsgScriptMigrateHost: return true;
|
||||||
case rage::eNetMessage::MsgRadioStationSyncRequest: return true;
|
case rage::eNetMessage::MsgRadioStationSyncRequest:
|
||||||
|
{
|
||||||
|
static rate_limiter unk_player_radio_requests{2s, 2};
|
||||||
|
|
||||||
|
if (unk_player_radio_requests.process())
|
||||||
|
{
|
||||||
|
if (unk_player_radio_requests.exceeded_last_process())
|
||||||
|
{
|
||||||
|
// Make a translation for this new OOM kick protection
|
||||||
|
g_notification_service.push_error("PROTECTIONS"_T.data(), "OOM_KICK"_T.data());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user