mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-22 12:03:04 +00:00
map window works when there is no local ped
This commit is contained in:
parent
b7a09ee1eb
commit
c58421be3c
3 changed files with 13 additions and 11 deletions
|
@ -347,8 +347,6 @@ namespace SanAndreasUnity.UI {
|
|||
|
||||
if (null == MiniMap.Instance)
|
||||
return;
|
||||
if (null == Ped.Instance)
|
||||
return;
|
||||
|
||||
|
||||
int uiSize = (int) this.windowRect.width;
|
||||
|
@ -547,10 +545,13 @@ namespace SanAndreasUnity.UI {
|
|||
// second row - info
|
||||
GUILayout.BeginHorizontal (GUILayout.MaxWidth (infoAreaRect.width));
|
||||
|
||||
GUILayout.Label ("Player world pos: " + Ped.Instance.transform.position);
|
||||
GUILayout.Space (5);
|
||||
GUILayout.Label ("Player minimap pos: " + MiniMap.WorldPosToMapPos (Ped.Instance.transform.position));
|
||||
GUILayout.Space (5);
|
||||
if (Ped.Instance != null)
|
||||
{
|
||||
GUILayout.Label ("Player world pos: " + Ped.Instance.transform.position);
|
||||
GUILayout.Space (5);
|
||||
GUILayout.Label ("Player minimap pos: " + MiniMap.WorldPosToMapPos (Ped.Instance.transform.position));
|
||||
GUILayout.Space (5);
|
||||
}
|
||||
GUILayout.Label ("Focus pos: " + this.GetFocusPosition ());
|
||||
GUILayout.Space (5);
|
||||
Vector2 cursorMapPos;
|
||||
|
@ -592,9 +593,10 @@ namespace SanAndreasUnity.UI {
|
|||
onDrawMapItems();
|
||||
|
||||
// draw player pointer
|
||||
this.DrawItemOnMapRotated( MiniMap.Instance.PlayerBlip, Ped.Instance.transform.position, Ped.Instance.transform.forward, (int) m_playerPointerSize );
|
||||
// this.DrawItemOnMapRotated( MiniMap.Instance.PlayerBlip, Player.Instance.transform.position, Player.Instance.transform.forward, 10 );
|
||||
// this.DrawItemOnMap( blackPixel, Player.Instance.transform.position, 50 );
|
||||
if (Ped.Instance != null)
|
||||
{
|
||||
this.DrawItemOnMapRotated( MiniMap.Instance.PlayerBlip, Ped.Instance.transform.position, Ped.Instance.transform.forward, (int) m_playerPointerSize );
|
||||
}
|
||||
|
||||
// draw all zones
|
||||
if (m_drawZones) {
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
- shooting is inaccurate - clients should send fire event with fire pos and fire dir
|
||||
|
||||
- add dates to logs
|
||||
|
||||
- remove spamming logs:
|
||||
|
||||
- sometimes, current vehicle is null on client
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
- Check how much RAM textures use
|
||||
|
||||
- Map window: increase buttons' height ; add shortcut for teleport (key 'T') ; draw vehicles ;
|
||||
|
||||
- Script execution order: HUD before pause menu and windows ; fps counter after all ;
|
||||
|
||||
- Add option to change fixed delta time ?
|
||||
|
|
Loading…
Reference in a new issue