fix(ScriptEventHandler): Filter rotate cam for current PlayerID

This commit is contained in:
Yimura 2022-03-31 01:06:15 +02:00
parent 169f09cdaf
commit b7db6b45dc
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682

View File

@ -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;
}