mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-02-24 19:27:16 +00:00
client can teleport from map window
This commit is contained in:
parent
01b103c34d
commit
25d5ec17dd
1 changed files with 9 additions and 1 deletions
|
@ -244,7 +244,15 @@ namespace SanAndreasUnity.UI {
|
|||
if (!m_isWaypointPlaced)
|
||||
return;
|
||||
|
||||
Ped.Instance.Teleport (MiniMap.MapPosToWorldPos (m_waypointMapPos));
|
||||
if (null == Ped.Instance)
|
||||
return;
|
||||
|
||||
Vector3 worldPos = MiniMap.MapPosToWorldPos (m_waypointMapPos);
|
||||
|
||||
if (Utilities.NetUtils.IsServer)
|
||||
Ped.Instance.Teleport (worldPos);
|
||||
else if (Net.PlayerRequests.Local != null)
|
||||
Net.PlayerRequests.Local.RequestTeleport(worldPos, Ped.Instance.transform.rotation);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue