Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix player teleport natives and query player list #1003

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Server/Components/LegacyNetwork/legacy_network_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions Server/Components/Pawn/Scripting/Player/Natives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Loading