Fix NRE in minimap when camera is null

This commit is contained in:
in0finite 2019-05-23 00:24:55 +02:00
parent 47c7c5a694
commit 5a4d82de13
2 changed files with 4 additions and 4 deletions

View file

@ -552,7 +552,7 @@ namespace SanAndreasUnity.Behaviours
lerpedZoomCounter = 0; lerpedZoomCounter = 0;
} }
float relAngle = Camera.main.transform.eulerAngles.y; float relAngle = Camera.main != null ? Camera.main.transform.eulerAngles.y : 0f;
if (maskTransform != null) if (maskTransform != null)
maskTransform.localRotation = Quaternion.Euler(0, 0, relAngle); maskTransform.localRotation = Quaternion.Euler(0, 0, relAngle);

View file

@ -10,7 +10,7 @@
- **Async geometry loading** - currently, geometry is loaded synchronously, which seems like the main performance bottleneck - **Async geometry loading** - currently, geometry is loaded synchronously, which seems like the main performance bottleneck
- Make everything networked - Multiplayer - see [Multiplayer.md](Multiplayer.md)
- Map - better info area ; input mouse position is not always correct ; see [Map.md](Map.md) ; - Map - better info area ; input mouse position is not always correct ; see [Map.md](Map.md) ;
@ -18,12 +18,12 @@
- Crouching: adjust camera aim offset ? ; - Crouching: adjust camera aim offset ? ;
- Add option to disable camera
- don't fade high LOD meshes - don't fade high LOD meshes
- Validate path to GTA ? - Validate path to GTA ?
- Split code into separate assemblies (using asmdef files)
- Anims must be played by their name - Anims must be played by their name
- Vehicles window: it's too slow - use pages ; display additional info ; - Vehicles window: it's too slow - use pages ; display additional info ;