From 737985d0a3b03a044b2d23c9f0ca4a535c84dab7 Mon Sep 17 00:00:00 2001 From: iAmir Date: Sat, 12 Oct 2024 03:02:45 +0330 Subject: [PATCH 1/2] fix PlayerTeleport natives --- Server/Components/Pawn/Scripting/Player/Natives.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Server/Components/Pawn/Scripting/Player/Natives.cpp b/Server/Components/Pawn/Scripting/Player/Natives.cpp index 951f249f9..f15b3600e 100644 --- a/Server/Components/Pawn/Scripting/Player/Natives.cpp +++ b/Server/Components/Pawn/Scripting/Player/Natives.cpp @@ -879,15 +879,15 @@ SCRIPT_API(GetPlayerMarkerForPlayer, int(IPlayer& player, IPlayer& other)) return colour.RGBA(); } -SCRIPT_API(AllowPlayerTeleport, bool(IPlayer* player, bool allow)) +SCRIPT_API(AllowPlayerTeleport, bool(IPlayer& player, bool allow)) { - player->allowTeleport(allow); + player.allowTeleport(allow); return true; } -SCRIPT_API(IsPlayerTeleportAllowed, bool(IPlayer* player)) +SCRIPT_API(IsPlayerTeleportAllowed, bool(IPlayer& player)) { - return player->isTeleportAllowed(); + return player.isTeleportAllowed(); } SCRIPT_API(DisableRemoteVehicleCollisions, bool(IPlayer& player, bool disable)) From 944c2d5afbfb65b99997d64fa0236a6228f31a4e Mon Sep 17 00:00:00 2001 From: iAmir Date: Sat, 12 Oct 2024 03:17:21 +0330 Subject: [PATCH 2/2] fix player staying in query list after info change in disconnect event --- Server/Components/LegacyNetwork/legacy_network_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/Components/LegacyNetwork/legacy_network_impl.cpp b/Server/Components/LegacyNetwork/legacy_network_impl.cpp index 96ee258fb..5fb4b520f 100644 --- a/Server/Components/LegacyNetwork/legacy_network_impl.cpp +++ b/Server/Components/LegacyNetwork/legacy_network_impl.cpp @@ -795,7 +795,7 @@ void RakNetLegacyNetwork::init(ICore* c) core->getEventDispatcher().addEventHandler(this); core->getPlayers().getPlayerChangeDispatcher().addEventHandler(this); - core->getPlayers().getPlayerConnectDispatcher().addEventHandler(this); + core->getPlayers().getPlayerConnectDispatcher().addEventHandler(this, EventPriority_Lowest); } void RakNetLegacyNetwork::start()