Is there better way of adding components?
#4

The most resource intensive thing here is for sure the fexist() part. It solely depends on the disk speed which may vary at times.
I'm certain it doesn't need to check the file on every spawn, you could save that in the array as well. Especially when looping.

Furthermore you can use break; when the vehicle is found, that reduces the length of the loop.
Reply


Messages In This Thread
Is there better way of adding components? - by maksicnm - 27.02.2019, 09:29
Re: Is there better way of adding components? - by RoboN1X - 27.02.2019, 09:53
Re: Is there better way of adding components? - by maksicnm - 27.02.2019, 09:56
Re: Is there better way of adding components? - by NaS - 27.02.2019, 10:40

Forum Jump:


Users browsing this thread: 2 Guest(s)