minimap properly follows ped

This commit is contained in:
in0finite 2019-06-24 00:52:03 +02:00
parent f40c15c195
commit 2c03d76d4d
2 changed files with 2 additions and 11 deletions

View file

@ -203,9 +203,9 @@ namespace SanAndreasUnity.Behaviours
#region Private fields #region Private fields
// Texture & control flags // Texture & control flags
private Ped m_ped; private Ped m_ped => Ped.Instance;
private PlayerController playerController; private PlayerController playerController => PlayerController.Instance;
private TextureDictionary huds; private TextureDictionary huds;
@ -261,13 +261,6 @@ namespace SanAndreasUnity.Behaviours
{ {
loadTextures(); loadTextures();
GameObject playerObj = GameObject.FindGameObjectWithTag("Player");
if (playerObj != null)
{
m_ped = playerObj.GetComponent<Ped>();
playerController = playerObj.GetComponent<PlayerController>();
}
if (canvas != null && canvas.enabled) if (canvas != null && canvas.enabled)
canvas.enabled = false; canvas.enabled = false;

View file

@ -14,8 +14,6 @@
- OutOfRangeDestroyer script should be destroyed on clients (for vehicles) ; when player controls a vehicle, it should not be destroyed ; or simply make the script destroy objects only on server (if they are network objects) ; - OutOfRangeDestroyer script should be destroyed on clients (for vehicles) ; when player controls a vehicle, it should not be destroyed ; or simply make the script destroy objects only on server (if they are network objects) ;
- "Kill all peds" button should also kill local ped ; "Destroy all vehicles" button should also destroy controlled vehicle ;
- max num players should be configurable - max num players should be configurable
- display players on minimap - display players on minimap