mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-22 20:13:02 +00:00
fix infinite loop
This commit is contained in:
parent
2193aeaea1
commit
66391fcb58
1 changed files with 8 additions and 5 deletions
|
@ -381,13 +381,16 @@ namespace SanAndreasUnity.Behaviours.World
|
|||
{
|
||||
while (true)
|
||||
{
|
||||
var cam = Camera.current;
|
||||
if (null == cam)
|
||||
yield return null;
|
||||
yield return null;
|
||||
|
||||
for (int i = 0; i < m_lightSources.Count; i++)
|
||||
var cam = Camera.current;
|
||||
|
||||
if (cam != null)
|
||||
{
|
||||
m_lightSources[i].transform.forward = - cam.transform.forward;
|
||||
for (int i = 0; i < m_lightSources.Count; i++)
|
||||
{
|
||||
m_lightSources[i].transform.forward = - cam.transform.forward;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_trafficLightSources.Count % 3 == 0)
|
||||
|
|
Loading…
Reference in a new issue