@DR: Yup. Several times. While saying atrocious things
@LW: Huh, that's weird. I just tried putting in jinput (that would make sense, IIRC there's a keybinding involved somewhere in the code here, and I have the lwjgl stuff in use to support Combat Radar).
Still getting a red flag. Still compiles. Bizarre.
Anyhow... did a few more tests. Must sleep now.
AddLight works, and it's cool... but there are some features I'd like to have.
1. I'd like to be able to create relationships between StandardLights and WeaponAPIs and be able to move them.Once a light is created via StandardLight, there doesn't appear to be a way to move it around easily or attach it to something that's not a CombatEntityAPI's center point.
You can attach it to a CombatEntityAPI, but not to a WeaponAPI or an offset, and you can't give it a velocity once it's been passed to LightShader.
That's a bit inconvenient, as a rapidly-moving ship may move well out of the area the light effects well before the light does anything, or, worse, if the TTL is too long, cause artifacts.
So for things like weapon lights or special FX with invisible WeaponAPIs, you have to use a very short-duration light, which means creating more lights per second; I don't know how expensive it is to create a light, but surely it's cheaper to move it; then the light could be created a lot less frequently and be faded out immediately if it can't find its attachment.
Or perhaps this needs another type of solution entirely, specifically for attached point lights, beams and cones; I realize that LightShader's primarily about pew-pew stuff
2. Shot creation lights would look even nicer if they used the barrel offset of the weapon, not the position of the bullet.Oh, and... one minor thing about the pew-pew system that came up in early testing; when shot lights are being created, they're being created at the projectile's point, not the barrel offset of the weapon. This can lead to some issues with getting the light well-matched with the barrel for a nice look, especially with big projectiles.
Take a look at the code I wrote for the Autofire AIs; it shows how to get the barrel lengths, and those could be stored in an array, or we could input that manually into the CSV.