Shouldn't this code from PlaceLightSource
Code: ags
be
Code: ags
?
As I understand the code, you're searching for the first unused light source, not one that already exists?
while ((countIndex<MaximumLightSources)&&(lightR[countIndex]==-1)) countIndex++;
be
while ((countIndex<MaximumLightSources)&&(lightR[countIndex]!=-1)) countIndex++;
?
As I understand the code, you're searching for the first unused light source, not one that already exists?