Fractal Softworks Forum
Starsector => Mods => Modding => Topic started by: Debido on August 29, 2014, 05:22:41 AM
-
For future reference, when you get NPEs and other bugs in the refit menu with an EveryFrameWeaponEffectPlugin. You can check if weapon.getShip().getOriginalOwner() == -1
If this is true, then you're in the refit menu.
if (weapon.getShip().getOriginalOwner() == -1){
return;
}
-
Yes! This should allow me to fix a long-standing bug in my faction. Many thanks :D
How'd you figure this out?
-
I was getting a NPE in the refit menu. So I attached a NetBeans debugger to the crashing EveryFrameWeaponEffectPlugin, and was looking at the variables and noticed that value when looking for possible null values. I thought it could be useful to others experiencing similar issues.
-
Well you were right :)
-
It's great that you were able to find that out, now my edited version of the weapon mirroring script could be fixed and that would make left and right variants of my melee weapons obsolete.