Skip to content

Commit

Permalink
Use MoveToWorld instead of ScheduleMoveToWorld
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiascode committed Mar 7, 2020
1 parent ad48620 commit e99030b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function TeleportToPlayer( a_SrcPlayer, a_DstPlayerName, a_TellDst )
else
-- If destination player is not in the same world, move to the correct world
if a_SrcPlayer:GetWorld() ~= a_DstPlayerName:GetWorld() then
a_SrcPlayer:ScheduleMoveToWorld( a_DstPlayerName:GetWorld(), Vector3d( a_DstPlayerName:GetPosX() + 0.5, a_DstPlayerName:GetPosY(), a_DstPlayerName:GetPosZ() + 0.5 ), false, true )
a_SrcPlayer:MoveToWorld( a_DstPlayerName:GetWorld(), true, Vector3d( a_DstPlayerName:GetPosX() + 0.5, a_DstPlayerName:GetPosY(), a_DstPlayerName:GetPosZ() + 0.5 ) )
else
a_SrcPlayer:TeleportToEntity( a_DstPlayerName )
end
Expand Down
2 changes: 1 addition & 1 deletion portal-worlds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function HandlePortalCommand(Split, Player)
elseif( World == nil ) then
SendMessageFailure( Player, "Could not find world " .. Split[2] .. "!" )
return true
elseif( Player:ScheduleMoveToWorld(World, Vector3d(World:GetSpawnX(), World:GetSpawnY(), World:GetSpawnZ()), false, true) == false ) then
elseif( Player:MoveToWorld(World, true, Vector3d(World:GetSpawnX(), World:GetSpawnY(), World:GetSpawnZ())) == false ) then
SendMessageFailure( Player, "Could not move to world " .. Split[2] .. "!" )
return true
end
Expand Down

0 comments on commit e99030b

Please sign in to comment.