Author Topic: Interval-Based Countermeasures  (Read 14704 times)

0 Members and 1 Guest are viewing this topic.

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Interval-Based Countermeasures
So retail countermeasure behavior was... counterintuitive, to put it mildly. Missiles would only be able to "ignore" one countermeasure at a time, and if two or more happened to be within their field of view but failed to decoy them, it would cause the missile to oscillate between ignoring each of them in turn, re-rolling the decoy chance each time. This behavior was fixed last November by Niffiwan. The other major oddity is that countermeasures operate on a global frame timer; for two frames after any countermeasure is created (yes, any countermeasure, and only for the following two frames), every countermeasure in the mission becomes active.

This is, to put it mildly, a complete cluster****, and has remained an unsolved issue... until now.

SSE2: http://deviance.duckish.net/downloads/fs2_fred2_open_interval_countermeasures_SSE2.7z
AVX: http://deviance.duckish.net/downloads/fs2_fred2_open_interval_countermeasures_AVX.7z

x64 SSE2: http://deviance.duckish.net/downloads/fs2_fred2_open_interval_countermeasures_x64_SSE2.7z
x64 AVX: http://deviance.duckish.net/downloads/fs2_fred2_open_interval_countermeasures_x64_AVX.7z

By default, countermeasures still operate on the global frame timer (so you shouldn't actually see any different behavior with unedited countermeasures; if there are any performance issues with existing mods/missions, compared to regular nightly builds, that's a regression and I'd appreciate it if you would let me know about it). If you add the new field "+Pulse Interval:" (specified in milliseconds) to a countermeasure, however, it will instead only become active every time its pulse interval has elapsed (note: due to the way timestamps work, setting a very small pulse interval won't allow it to pulse multiple times per frame). "+Pulse Interval:" goes at the end of the "$Countermeasure:" block, after "+Single Missile Kill:" (if defined).

Please report any problems with either old-style or new-style countermeasures when using this build.
« Last Edit: August 09, 2016, 03:55:16 am by AdmiralRalwood »
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.

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Interval-Based Countermeasures
Yaaaaay

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Interval-Based Countermeasures
Nice
(Now if I only I could actually test it...)
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Interval-Based Countermeasures
Now, having received a WoD build with this included, I shall conduct tests.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Interval-Based Countermeasures
Now, having received a WoD build with this included, I shall conduct tests.
In the future if you ever want a build to combine some feature with the WoD branch, I can oblige without much effort (I was actually confused by your first post about not being able to test it because I forgot WoD was still on its own branch).
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.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Interval-Based Countermeasures
Cheers
Swifty is usually my build dealer, and he does a good job of it. But he is also a busy productive member of society so should he ever be too busy to accomendate in the future, I'll keep you in mind. <3
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Interval-Based Countermeasures
I gave this a test last night with my countermeasures test mission, everything worked as expected and I didn't see any unexpected performance issues.
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Interval-Based Countermeasures
Quote
The other major oddity is that countermeasures operate on a global frame timer; for two frames after any countermeasure is created (yes, any countermeasure, and only for the following two frames), every countermeasure in the mission becomes active.
So I was puzzled why I couldn't actually notice this behavior ingame, I tried with the build WoD shipped with from 2015/04 and with the most recent build.
A Nordera CM has a lifetime of 5 seconds and seemed to draw in missiles the whole time, didn't noticed any difference between the old build, the new build, or the new build with a pulse interval of 2000 milliseconds. Turns out, I was testing with just heatseekers, with aspect seekers its a whole different story. Then CM's barely seem to do anything.

A picture frequently tells more of a story than a thousand words etc etc. So I recorded what I typed above: https://my.mixtape.moe/giptnw.webm
Note that the heatseeker (DHSM-3c) has a seeker strength of 5, while the aspect (VFAS-16) only has a strength of 2.
This was recorded with the old build.

Now the next video is also on the old build, but with the CM having a aspect effectiveness of 10(!)
https://my.mixtape.moe/aqzwtq.webm
Not a single **** is given by the aspects, so yeah, old cluster**** behavior confirmed there

This time with the new build, and an interval pulse of 500 miliseconds and an aspect effectiveness of 5 (and the pull aspect flag on the counter meassure to make it more clear they are spoofed), it's clear we've got some working CM's here.
https://my.mixtape.moe/ijfeec.webm

However, with Pulse interval enabled, but set to a higher number like 5000 miliseconds, heatseekers are still 100% spoofed by it.

In conclusion: Heatseeker countermeassuring was ****ed back then, is still ****ed now.
New flag is wonderful, but currently only working for aspect seekers.

Would it be possible for you coding wizards to take a look at the Heatseeker issue?
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline niffiwan

  • 211
  • Eluder Class
Re: Interval-Based Countermeasures
Ah... my tests were only with aspect seekers, I'll have to retest with heatseekers and see what happens.  Also, what were the Heat/Aspect effectiveness settings on the Nordera CM's?
Creating a fs2_open.log | Red Alert Bug = Hex Edit | MediaVPs 2014: Bigger HUD gauges | 32bit libs for 64bit Ubuntu
----
Debian Packages (testing/unstable): Freespace2 | wxLauncher
----
m|m: I think I'm suffering from Stockholm syndrome. Bmpman is starting to make sense and it's actually written reasonably well...

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Interval-Based Countermeasures
The heatseekers aren't actually being spoofed (unless I've misread the homing code again); they're losing their target and re-acquiring the first thing they see, which happens to be a countermeasure. That's why you get that behavior even without setting a pulse interval.
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.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Interval-Based Countermeasures
Ah... my tests were only with aspect seekers, I'll have to retest with heatseekers and see what happens.  Also, what were the Heat/Aspect effectiveness settings on the Nordera CM's?
$Countermeasure:
   +Heat Effectiveness:         1
   +Aspect Effectiveness:         1
   +Effective Radius:             200
So basically just a retail type one, only with 100 less effective radius

The heatseekers aren't actually being spoofed (unless I've misread the homing code again); they're losing their target and re-acquiring the first thing they see, which happens to be a countermeasure. That's why you get that behavior even without setting a pulse interval.
So heat seekerbehavior is super hosed then. Because Seeker strength literally does nothing, and Heat effectiveness means zat. Even with a strength of 15 they are 100% getting pulled in by the CM.

Not sure if this is a bugfix or a feature request anymore!
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Interval-Based Countermeasures
The heatseekers aren't actually being spoofed (unless I've misread the homing code again); they're losing their target and re-acquiring the first thing they see, which happens to be a countermeasure. That's why you get that behavior even without setting a pulse interval.
So heat seekerbehavior is super hosed then. Because Seeker strength literally does nothing, and Heat effectiveness means zat. Even with a strength of 15 they are 100% getting pulled in by the CM.
Well, of course adjusting seeker effectiveness wouldn't do anything; they're not being decoyed by the countermeasure at all, they're losing their original target and retargeting on the countermeasure. If you want to stop that from happening, you need to increase their view cone so that they stop losing track of their intended target.
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.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Interval-Based Countermeasures
Good sir, the DHSM-3c already has a viewcone of 300, so clearly that doesn't solve anything  :p

And if it's a matter of course that seeker effectiveness for heatseekers doesn't do anything then why do we even have Seeker strength and Heat Effectiveness setting for heatseekers at all? Heatseeker behavior is completely hosed. If they are 100% of the time attracted by a CM regardless of view cone, strength or heat effectiveness or effective radius, then something is clearly borked. I mean loving lol, just look at the launch at 0:18 https://my.mixtape.moe/giptnw.webm, the heatseekers get drawn away from the target that is at ~250 range to hit the CM that is like 600-800 away.

I ain't buying it  :p
« Last Edit: July 20, 2016, 09:26:06 am by Spoon »
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Interval-Based Countermeasures
Good sir, the DHSM-3c already has a viewcone of 300, so clearly that doesn't solve anything  :p
Do any subsystems on the target ship have "ignore if dead"? Does the missile have the "untargeted heat seeker" flag?

EDIT:
And if it's a matter of course that seeker effectiveness for heatseekers doesn't do anything
I didn't say that; I said it wasn't doing anything in this instance because the countermeasure isn't actively decoying the missile.
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.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Interval-Based Countermeasures
Do any subsystems on the target ship have "ignore if dead"? Does the missile have the "untargeted heat seeker" flag?
No and no
Incidently I already tested with an untargeted heat seeker missile (SMHS-15) and it behaves the same way. Nothing can resist the lure of the CM.

I didn't say that; I said it wasn't doing anything in this instance because the countermeasure isn't actively decoying the missile.
I don't know what you mean then. As far as I can see, it doesn't do anything in any instance for any type of heatseeker. I've already spend like an hour just testing different missile types with different flags and heatseekers are all attacted to the CM like a moth to the flame, regardless of any setting.
I've seen missiles dance between different CM's as they expired on their way there, but never do they reaquire on a hostile ship if there is but a single CM around.

I don't really care if its intended retail behavior (hosed if it is) or bugged retail behavior (also hosed :p ), I mean, I don't mean to sound like I'm trying to win an argument here. I'm just observing the ingame behavior and making note of it.

What I am trying to get at, I just want heatseekers to properly follow the rules that the law abiding aspect seekers are doing. :p
Can I make this into an official feature request (or bug fix, whatever it is) for you? Either a weapon flag or gamesettings.tbl flag would be amazing. It would improve WoD's missile play by a lot and I'd be extremely grateful.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Interval-Based Countermeasures
I didn't say that; I said it wasn't doing anything in this instance because the countermeasure isn't actively decoying the missile.
I don't know what you mean then.
Okay, let's try this: give the countermeasure some absurd pulse interval (like, say, 10000 milliseconds) and an effective radius of 0. This should render the countermeasure impotent: even if it pulses, it has no range, and so can't affect any missiles.

Your missiles will still go after this countermeasure (well, probably; might be worth actually testing it to confirm), so you know it has nothing to do with the countermeasure decoying them and everything to do with the missiles actively homing against the countermeasure instead of your target. This is more-or-less guaranteed to happen if the missile looks for a new target at all, because countermeasures are treated as being twice as close as they really are, for the purposes of homing missiles finding a new target. The odd thing is that with a view cone that large, and without those flags being set, there should be virtually no reason for the missile to be looking for a new target at any point. I've looked through the homing code looking for every piece of code that might make your missile either acquire a new target, or drop its current target (thereby making it acquire a new target); it basically should not be happening. Here's an exhaustive (as far as I can tell) list of the circumstances that could result in the missile looking for a new target: homing on a dead subsystem with the "ignore if dead" flag, fired with the "untargeted heat seeker" flag, fired from a ship with the "no-secondary-lock-on" flag, fired without a target, target's signature has changed, target does not exist, and target out of view cone.

That's it. I even checked the multilock branch, and it doesn't appear to affect weapon homing behavior (which makes sense, as it's not as though it makes individual missiles lock on to multiple things). If none of those conditions are being satisfied, something very, very strange is happening.
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.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Interval-Based Countermeasures
Quote
Your missiles will still go after this countermeasure (well, probably; might be worth actually testing it to confirm)
Tested and confirmed
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Interval-Based Countermeasures
Quote
Your missiles will still go after this countermeasure (well, probably; might be worth actually testing it to confirm)
Tested and confirmed
Could you pastebin the weapon's table entry so I can see if anything jumps out at me?
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.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline AdmiralRalwood

  • 211
  • The Cthulhu programmer himself!
    • Skype
    • Steam
    • Twitter
Re: Interval-Based Countermeasures
After a lot of headscratching, I'm pretty sure the problem lies with the multilock code: heatseekers don't draw lock indicators, so missile_locks[0].locked will always be false, so ship_queue_missile_locks() won't queue it into missile_locks_firing, so the secondary-firing code thinks you don't actually have anything targeted. Unfortunately, I'm not familiar enough with the multilock code to be able to suggest a proper fix at this time.
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.