From 5c03e8868ae40e92b9c02719c95e890b9badf52d Mon Sep 17 00:00:00 2001 From: Yimura Date: Thu, 31 Mar 2022 01:06:15 +0200 Subject: [PATCH] fix(ScriptEventHandler): Filter rotate cam for current PlayerID --- BigBaseV2/src/hooks/script_event_handler.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BigBaseV2/src/hooks/script_event_handler.cpp b/BigBaseV2/src/hooks/script_event_handler.cpp index 179f1338..178d2f11 100644 --- a/BigBaseV2/src/hooks/script_event_handler.cpp +++ b/BigBaseV2/src/hooks/script_event_handler.cpp @@ -1,4 +1,5 @@ #include "hooking.hpp" +#include "gta_util.hpp" namespace big { @@ -115,7 +116,9 @@ namespace big case eRemoteEvent::RotateCam: if (g->protections.script_events.rotate_cam) { - format_string(player_name, "Rotate Cam", notify.rotate_cam.log, notify.rotate_cam.notify); + if (CNetworkPlayerMgr* player_mgr = gta_util::get_network_player_mgr(); player_mgr != nullptr) + if (args[2] == player_mgr->m_local_net_player->m_player_id) + format_string(player_name, "Rotate Cam", notify.rotate_cam.log, notify.rotate_cam.notify); return true; }