While attempting to figure out a script for "Prioritised Auto Targeting" (think of the default "Auto Target" but in the order bombs->bombers->fighters), I hit a snag - couldn't figure out a *generic* method of detecting which weapon was a bomb. Originally thought that a TargetLOD > -1 would do it, until a harpoon missile ended up targeted.
In the end I ended up figuring out a patch to add an isBomb function to the weapon class - easier than I expected. (see attachment for patch)
If anyone can think of another way, I'm all ears.
---
*generic* -- meaning would work with mods that alter the weapons as well the standard FS2 weapons.
"Prioritised Auto Targeting" - I'm not a good pilot
so trying to gain a little in game assist
[attachment deleted by ninja]