Author Topic: BATTUTA'S HUBRIS AROUSES PREPOSTEROUS BUG  (Read 1570 times)

0 Members and 1 Guest are viewing this topic.

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
BATTUTA'S HUBRIS AROUSES PREPOSTEROUS BUG
I have a tale of bomb-pumped lasers, boom distances, and coordinate systems to tell you once we figure out WHAT THE **** IS GOING ON

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: BATTUTA'S HUBRIS AROUSES PREPOSTEROUS BUG
But uh it seems that weapons with $Detonation Radius will detonate instantly inside your fighter if fired when within the $Detonation Radius of the mission origin?

More to follow

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: BATTUTA'S HUBRIS AROUSES PREPOSTEROUS BUG
Repro mission: http://pastebin.com/5aUG1418

You will need to use this weapon tbm: http://pastebin.com/uULWBDTj
 
(requires BP2 and a recent nightly, sorry)

I am on sprint for BP right now so I can't get this into Mantis right away but hopefully the repro mission is illuminating.


 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: BATTUTA'S HUBRIS AROUSES PREPOSTEROUS BUG
[18:54] <MageKing17> This may be a simple order-of-operations problem.
[18:57] <MageKing17> Basically, battuta, here's what's happening.
[18:58] <MageKing17> weapon_set_tracking_info() sets the homing object/subsystem, and then relies on weapon_home() to set the actual homing position.
[18:58] <MageKing17> weapon_home() is called in weapon_process_post().
[18:58] <MageKing17> Detonation radius is checked in weapon_process_pre().
[18:59] <MageKing17> So it's checking how far away from the missile homing_pos is before homing_pos has actually been set in the first place. :P
[18:59] <EatThePath> sounds noodly
[19:00] <Phantom__Hoover> no, it's pretty straightforward
[19:01] <MageKing17> It's tempting to just nuke the homing_pos check altogether, but then it would be absolute distance to the target ship's center regardless of how far away the targeted subsystem was, so that's obviously a no-go.
[19:01] <MageKing17> So instead weapon_set_tracking_info() will probably need to be modified to set homing_pos.

 

Offline headdie

  • i don't use punctuation lol
  • 212
  • Lawful Neutral with a Chaotic outook
    • Minecraft
    • Skype
    • Twitter
    • Headdie on Deviant Art
Minister of Interstellar Affairs Sol Union - Retired
quote General Battuta - "FRED is canon!"
Contact me at [email protected]
My Release Thread, Old Release Thread, Celestial Objects Thread, My rubbish attempts at art

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: BATTUTA'S HUBRIS AROUSES PREPOSTEROUS BUG
On the plus side, I have another quote for my forum sig:
Quote
<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.
Ph'nglui mglw'nafh Codethulhu GitHub wgah'nagl fhtagn.

schrödinbug (noun) - a bug that manifests itself in running software after a programmer notices that the code should never have worked in the first place.

When you gaze long into BMPMAN, BMPMAN also gazes into you.

"I am one of the best FREDders on Earth" -General Battuta

<Aesaar> literary criticism is vladimir putin

<MageKing17> "There's probably a reason the code is the way it is" is a very dangerous line of thought. :P
<MageKing17> Because the "reason" often turns out to be "nobody noticed it was wrong".
(the very next day)
<MageKing17> this ****ing code did it to me again
<MageKing17> "That doesn't really make sense to me, but I'll assume it was being done for a reason."
<MageKing17> **** ME
<MageKing17> THE REASON IS PEOPLE ARE STUPID
<MageKing17> ESPECIALLY ME

<MageKing17> God damn, I do not understand how this is breaking.
<MageKing17> Everything points to "this should work fine", and yet it's clearly not working.
<MjnMixael> 2 hours later... "God damn, how did this ever work at all?!"
(...)
<MageKing17> so
<MageKing17> more than two hours
<MageKing17> but once again we have reached the inevitable conclusion
<MageKing17> How did this code ever work in the first place!?

<@The_E> Welcome to OpenGL, where standards compliance is optional, and error reporting inconsistent

<MageKing17> It was all working perfectly until I actually tried it on an actual mission.

<IronWorks> I am useful for FSO stuff again. This is a red-letter day!
* z64555 erases "Thursday" and rewrites it in red ink

<MageKing17> TIL the entire homing code is held up by shoestrings and duct tape, basically.