Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Blog post: Skills and Story Points (07/08/19)

Author Topic: [BUG] beams that pierce missiles tags them as their damage target  (Read 561 times)

Tartiflette

  • Admiral
  • *****
  • Posts: 2781
  • Kickstarter is NOT a magic spring of free money!
    • View Profile

I have a beam that pierce missiles and use it's "damage target" for some scripted shenanigans. Problem is, if a missile goes through the beam, the damage target swap to that missile rather than the ship/asteroid/fighter that is still being hit just behind. I think it would be more logical if the damage target would always be the CombatEntity hit the farther away from the source (then most of the time that target will be an entity that actually stops the beam).
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 15346
    • View Profile
Re: [BUG] beams that pierce missiles tags them as their damage target
« Reply #1 on: February 17, 2019, 09:08:06 AM »

Hmm - are you sure? I just tested this - with a Sunder with a HIL sweeping up missiles shot by a Buffalo Mk.II - and getDamageTarget() for the HIL's ray never returned a missile. Not even when the missile was the only thing hit; getDamageTarget() only returns a target that stopped the beam (or, more precisely, a target that's not in the beam's pierce set).
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 2781
  • Kickstarter is NOT a magic spring of free money!
    • View Profile
Re: [BUG] beams that pierce missiles tags them as their damage target
« Reply #2 on: February 18, 2019, 12:08:22 AM »

Aw my bad. I was using an invisible beam and missed one pierce tag. Sorry about that, I'm rushing a surprise for the tournament's finals but I shouldn't cut corners nonetheless.
Logged
 

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 15346
    • View Profile
Re: [BUG] beams that pierce missiles tags them as their damage target
« Reply #3 on: February 18, 2019, 09:32:33 AM »

No worries, it's all good :) Looking forward to the next round!
Logged