Closed Vandest1 closed 2 years ago
Never a problem.
But, since you are doing this, I took a slightly deeper look and saw a few other "new" which might cause memory issues.
for example:
exhaustColor = new Color(exhaustRed, exhaustGreen, exhaustBlue);
Could you take a look at the others in that method and add checks if necessary?
Ok.
I found 3 other new instances in initEngineLights method that can be checked :
For the first two, I did it like I did until now. For the last one, it was roughly the same but I notice that make a new instance was not necessary, and I picked to just set the one that already exist. I thought that it's better to set an instance that already exist than create a new one. I'm right ? If it's the case, I could do the same for Color instances.
Always better to use an existing one rather than create a new one, as long as it works. Less overhead
Ok, that is what I thought. So, I will do it to Color instances also.
It's done ! I removed Color instances and I replaced them with settings of those that already exist.
Also, I remade config of solid fuel boosters. Emissive needed to be adjusted to match with nozzle. (This is what took me most time ...)
Tell me what do think about it.
Hello it's me again ! You know, the noob who doesn't drop it :-p
I'm back again because now we don't get emissive light anymore. It's because emissive colors check is never on "true" when it's compared to "null", so I propose to you to check if its alpha channel is equal to 0 (value when it's declared).
Also, I've made some solid fuel booster config, stock booster that were forgotten since a while. This could be the opportunity to add them.
Have good day